From aa4cceb57bb0cec260bd31ecf9b6d6c2bef285c4 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 13 Nov 2025 17:42:35 +0000 Subject: [PATCH] Configurations: 'specification/managednetworkfabric/ManagedNetworkFabric.ResourceManager.Management/tspconfig.yaml', API Version: 2024-06-15-preview, SDK Release Type: beta, and CommitSHA: 'ffb44955dd40f9a1826b6d4243678234a7449352' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5569103 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 2411 +++++++++- .../README.md | 14 +- .../SAMPLE.md | 3912 ++++++++------- .../pom.xml | 7 +- ...ricManager.java => FilesharesManager.java} | 131 +- .../fluent/AccessControlListsClient.java | 172 +- .../fluent/ExternalNetworksClient.java | 177 +- ...i.java => FilesharesManagementClient.java} | 55 +- .../fluent/InternalNetworksClient.java | 214 +- .../fluent/InternetGatewayRulesClient.java | 124 +- .../fluent/InternetGatewaysClient.java | 120 +- .../fluent/IpCommunitiesClient.java | 120 +- .../fluent/IpExtendedCommunitiesClient.java | 122 +- .../fluent/IpPrefixesClient.java | 118 +- .../fluent/L2IsolationDomainsClient.java | 252 +- .../fluent/L3IsolationDomainsClient.java | 172 +- .../fluent/NeighborGroupsClient.java | 122 +- .../fluent/NetworkDeviceSkusClient.java | 14 +- .../fluent/NetworkDevicesClient.java | 317 +- .../NetworkFabricControllersClient.java | 130 +- .../fluent/NetworkFabricSkusClient.java | 14 +- .../fluent/NetworkFabricsClient.java | 566 ++- .../fluent/NetworkInterfacesClient.java | 132 +- .../fluent/NetworkMonitorsClient.java | 336 ++ .../fluent/NetworkPacketBrokersClient.java | 122 +- .../fluent/NetworkRacksClient.java | 124 +- .../fluent/NetworkTapRulesClient.java | 170 +- .../fluent/NetworkTapsClient.java | 151 +- .../NetworkToNetworkInterconnectsClient.java | 192 +- .../fluent/OperationsClient.java | 6 +- .../fluent/RoutePoliciesClient.java | 160 +- .../fluent/models/AccessControlListInner.java | 235 +- .../AccessControlListPatchProperties.java | 178 - .../ArmConfigurationDiffResponseInner.java | 93 + .../CommitBatchStatusResponseInner.java | 131 + ...eROCommandsOperationStatusResultInner.java | 206 + ...ctionResponseForDeviceRWCommandsInner.java | 113 + ...ostActionResponseForDeviceUpdateInner.java | 83 +- ...PostActionResponseForStateUpdateInner.java | 49 +- .../DiscardCommitBatchResponseInner.java | 93 + ...rkBfdAdministrativeStateResponseInner.java | 118 + .../fluent/models/ExternalNetworkInner.java | 296 +- ...rkBfdAdministrativeStateResponseInner.java | 102 + ...rkBgpAdministrativeStateResponseInner.java | 102 + .../fluent/models/InternalNetworkInner.java | 436 +- .../fluent/models/InternetGatewayInner.java | 169 +- .../models/InternetGatewayRuleInner.java | 116 +- .../fluent/models/IpCommunityInner.java | 126 +- .../models/IpExtendedCommunityInner.java | 128 +- .../fluent/models/IpPrefixInner.java | 125 +- .../fluent/models/L2IsolationDomainInner.java | 170 +- .../L2IsolationDomainPatchProperties.java | 107 - .../fluent/models/L3IsolationDomainInner.java | 223 +- .../fluent/models/NeighborGroupInner.java | 124 +- .../fluent/models/NetworkDeviceInner.java | 218 +- .../fluent/models/NetworkDeviceSkuInner.java | 172 +- .../models/NetworkFabricControllerInner.java | 314 +- .../fluent/models/NetworkFabricInner.java | 411 +- .../models/NetworkFabricPatchProperties.java | 289 -- .../fluent/models/NetworkFabricSkuInner.java | 130 +- .../fluent/models/NetworkInterfaceInner.java | 137 +- .../NetworkInterfacePatchProperties.java | 79 - .../fluent/models/NetworkMonitorInner.java | 181 + .../models/NetworkPacketBrokerInner.java | 120 +- .../fluent/models/NetworkRackInner.java | 138 +- .../fluent/models/NetworkTapInner.java | 184 +- .../models/NetworkTapPatchableParameters.java | 144 - .../fluent/models/NetworkTapRuleInner.java | 241 +- .../NetworkToNetworkInterconnectInner.java | 318 +- ...niBfdAdministrativeStateResponseInner.java | 116 + .../fluent/models/OperationInner.java | 42 +- .../fluent/models/RoutePolicyInner.java | 201 +- .../ValidateConfigurationResponseInner.java | 72 +- .../ViewDeviceConfigurationResponseInner.java | 94 + .../fluent/models/package-info.java | 4 +- .../fluent/package-info.java | 4 +- .../implementation/AccessControlListImpl.java | 155 +- .../AccessControlListsClientImpl.java | 1574 +++--- .../AccessControlListsImpl.java | 8 +- .../ArmConfigurationDiffResponseImpl.java | 37 + .../CommitBatchStatusResponseImpl.java | 47 + ...ceROCommandsOperationStatusResultImpl.java | 65 + ...ActionResponseForDeviceRWCommandsImpl.java | 43 + ...PostActionResponseForDeviceUpdateImpl.java | 16 +- ...nPostActionResponseForStateUpdateImpl.java | 16 +- .../DiscardCommitBatchResponseImpl.java | 37 + ...orkBfdAdministrativeStateResponseImpl.java | 44 + .../implementation/ExternalNetworkImpl.java | 191 +- .../ExternalNetworksClientImpl.java | 1453 ++---- .../implementation/ExternalNetworksImpl.java | 34 +- ...=> FilesharesManagementClientBuilder.java} | 63 +- ...va => FilesharesManagementClientImpl.java} | 148 +- ...orkBfdAdministrativeStateResponseImpl.java | 46 + ...orkBgpAdministrativeStateResponseImpl.java | 46 + .../implementation/InternalNetworkImpl.java | 289 +- .../InternalNetworksClientImpl.java | 1696 +++---- .../implementation/InternalNetworksImpl.java | 54 +- .../implementation/InternetGatewayImpl.java | 82 +- .../InternetGatewayRuleImpl.java | 60 +- .../InternetGatewayRulesClientImpl.java | 1064 ++--- .../InternetGatewayRulesImpl.java | 8 +- .../InternetGatewaysClientImpl.java | 1053 ++-- .../implementation/InternetGatewaysImpl.java | 8 +- .../IpCommunitiesClientImpl.java | 1046 ++-- .../implementation/IpCommunitiesImpl.java | 8 +- .../implementation/IpCommunityImpl.java | 78 +- .../IpExtendedCommunitiesClientImpl.java | 1063 ++--- .../IpExtendedCommunitiesImpl.java | 8 +- .../IpExtendedCommunityImpl.java | 81 +- .../implementation/IpPrefixImpl.java | 85 +- .../implementation/IpPrefixesClientImpl.java | 1020 ++-- .../implementation/IpPrefixesImpl.java | 8 +- .../implementation/L2IsolationDomainImpl.java | 89 +- .../L2IsolationDomainsClientImpl.java | 1806 +++---- .../L2IsolationDomainsImpl.java | 50 +- .../implementation/L3IsolationDomainImpl.java | 128 +- .../L3IsolationDomainsClientImpl.java | 1561 +++--- .../L3IsolationDomainsImpl.java | 8 +- .../implementation/NeighborGroupImpl.java | 88 +- .../NeighborGroupsClientImpl.java | 1046 ++-- .../implementation/NeighborGroupsImpl.java | 8 +- .../implementation/NetworkDeviceImpl.java | 141 +- .../implementation/NetworkDeviceSkuImpl.java | 58 +- .../NetworkDeviceSkusClientImpl.java | 248 +- .../implementation/NetworkDeviceSkusImpl.java | 8 +- .../NetworkDevicesClientImpl.java | 2355 +++++---- .../implementation/NetworkDevicesImpl.java | 58 +- .../NetworkFabricControllerImpl.java | 167 +- .../NetworkFabricControllersClientImpl.java | 1078 ++--- .../NetworkFabricControllersImpl.java | 8 +- .../implementation/NetworkFabricImpl.java | 248 +- .../implementation/NetworkFabricSkuImpl.java | 46 +- .../NetworkFabricSkusClientImpl.java | 249 +- .../implementation/NetworkFabricSkusImpl.java | 8 +- .../NetworkFabricsClientImpl.java | 4230 +++++++++-------- .../implementation/NetworkFabricsImpl.java | 127 +- .../implementation/NetworkInterfaceImpl.java | 76 +- .../NetworkInterfacesClientImpl.java | 1180 ++--- .../implementation/NetworkInterfacesImpl.java | 8 +- .../implementation/NetworkMonitorImpl.java | 195 + .../NetworkMonitorsClientImpl.java | 1326 ++++++ .../implementation/NetworkMonitorsImpl.java | 171 + .../NetworkPacketBrokerImpl.java | 77 +- .../NetworkPacketBrokersClientImpl.java | 1059 ++--- .../NetworkPacketBrokersImpl.java | 8 +- .../implementation/NetworkRackImpl.java | 72 +- .../NetworkRacksClientImpl.java | 1053 ++-- .../implementation/NetworkRacksImpl.java | 8 +- .../implementation/NetworkTapImpl.java | 106 +- .../implementation/NetworkTapRuleImpl.java | 152 +- .../NetworkTapRulesClientImpl.java | 1573 +++--- .../implementation/NetworkTapRulesImpl.java | 8 +- .../implementation/NetworkTapsClientImpl.java | 1367 ++---- .../implementation/NetworkTapsImpl.java | 8 +- .../NetworkToNetworkInterconnectImpl.java | 199 +- ...tworkToNetworkInterconnectsClientImpl.java | 1517 ++---- .../NetworkToNetworkInterconnectsImpl.java | 42 +- ...NniBfdAdministrativeStateResponseImpl.java | 43 + .../implementation/OperationImpl.java | 8 +- .../implementation/OperationsClientImpl.java | 145 +- .../implementation/OperationsImpl.java | 8 +- .../implementation/ResourceManagerUtils.java | 2 +- .../RoutePoliciesClientImpl.java | 1520 +++--- .../implementation/RoutePoliciesImpl.java | 8 +- .../implementation/RoutePolicyImpl.java | 106 +- .../ValidateConfigurationResponseImpl.java | 16 +- .../ViewDeviceConfigurationResponseImpl.java | 37 + .../models/AccessControlListListResult.java | 96 + .../models/ExternalNetworkListResult.java | 96 + .../models/InternalNetworkListResult.java | 96 + .../models/InternetGatewayListResult.java | 96 + .../models/InternetGatewayRuleListResult.java | 97 + .../models/IpCommunityListResult.java | 95 + .../models/IpExtendedCommunityListResult.java | 54 +- .../models/IpPrefixListResult.java | 95 + .../models/L2IsolationDomainListResult.java | 96 + .../models/L3IsolationDomainListResult.java | 96 + .../models/NeighborGroupListResult.java | 95 + .../models/NetworkDeviceListResult.java | 95 + .../models/NetworkDeviceSkuListResult.java | 96 + .../NetworkFabricControllerListResult.java | 97 + .../models/NetworkFabricListResult.java | 95 + .../models/NetworkFabricSkuListResult.java | 96 + .../models/NetworkInterfaceListResult.java | 96 + .../models/NetworkMonitorListResult.java | 96 + .../models/NetworkPacketBrokerListResult.java | 97 + .../models/NetworkRackListResult.java | 95 + .../models/NetworkTapListResult.java | 95 + .../models/NetworkTapRuleListResult.java | 96 + ...etworkToNetworkInterconnectListResult.java | 98 + .../models/OperationListResult.java | 28 +- .../models/RoutePolicyListResult.java | 95 + .../implementation/package-info.java | 4 +- .../models/AccessControlList.java | 288 +- .../models/AccessControlListAction.java | 58 +- .../models/AccessControlListActionPatch.java | 171 + .../AccessControlListMatchCondition.java | 179 +- .../AccessControlListMatchConditionPatch.java | 382 ++ .../AccessControlListMatchConfiguration.java | 24 +- ...essControlListMatchConfigurationPatch.java | 208 + .../models/AccessControlListPatch.java | 187 +- .../AccessControlListPatchProperties.java | 327 ++ .../AccessControlListPatchableProperties.java | 227 - .../AccessControlListPortCondition.java | 145 +- .../AccessControlListPortConditionPatch.java | 211 + .../models/AccessControlListProperties.java | 261 +- .../models/AccessControlLists.java | 58 +- .../models/AccessControlListsListResult.java | 128 - .../models/AclActionType.java | 18 +- .../managednetworkfabric/models/AclType.java | 56 + .../managednetworkfabric/models/Action.java | 6 +- .../ActionIpCommunityPatchProperties.java | 142 + .../models/ActionIpCommunityProperties.java | 61 +- ...ionIpExtendedCommunityPatchProperties.java | 146 + .../ActionIpExtendedCommunityProperties.java | 62 +- .../models/ActionType.java | 6 +- .../models/AddressFamilyType.java | 6 +- .../models/AdministrativeState.java | 15 +- .../models/AggregateRoute.java | 17 +- .../models/AggregateRouteConfiguration.java | 16 +- .../AggregateRoutePatchConfiguration.java | 117 + .../models/AllowASOverride.java | 6 +- .../models/AnnotationResource.java | 93 - .../models/ArmConfigurationDiffResponse.java | 35 + .../models/BfdAdministrativeState.java | 10 +- .../models/BfdConfiguration.java | 10 +- .../models/BfdPatchConfiguration.java | 130 + .../models/BgpAdministrativeState.java | 51 + .../models/BgpConfiguration.java | 179 +- .../models/BgpPatchConfiguration.java | 459 ++ .../managednetworkfabric/models/BitRate.java | 113 + .../models/BitRateUnit.java | 61 + .../BmpConfigurationPatchProperties.java | 381 ++ .../models/BmpConfigurationProperties.java | 380 ++ .../models/BmpConfigurationState.java | 51 + .../models/BmpExportPolicy.java | 56 + .../models/BmpMonitoredAddressFamily.java | 66 + .../models/BooleanEnumProperty.java | 8 +- .../models/BurstSize.java | 113 + .../models/BurstSizeUnit.java | 61 + .../models/CommitBatchDetails.java | 77 + .../models/CommitBatchState.java | 56 + .../models/CommitBatchStatusRequest.java | 87 + .../models/CommitBatchStatusResponse.java | 49 + .../CommonDynamicMatchConfiguration.java | 19 +- .../CommonDynamicMatchConfigurationPatch.java | 150 + .../models/CommonMatchConditions.java | 158 - ...PostActionResponseForDeviceROCommands.java | 111 + ...DeviceROCommandsOperationStatusResult.java | 80 + ...PostActionResponseForDeviceRWCommands.java | 43 + ...mmonPostActionResponseForDeviceUpdate.java | 16 +- ...ommonPostActionResponseForStateUpdate.java | 14 +- .../models/CommunityActionTypes.java | 8 +- .../models/Condition.java | 10 +- .../ConditionalDefaultRouteProperties.java | 119 + .../models/ConfigurationState.java | 26 +- .../models/ConfigurationType.java | 6 +- .../models/ConnectedSubnet.java | 61 +- .../models/ConnectedSubnetPatch.java | 114 + .../models/ConnectedSubnetRoutePolicy.java | 45 +- .../ConnectedSubnetRoutePolicyPatch.java | 87 + .../models/ControllerServices.java | 40 +- .../models/DestinationPatchProperties.java | 203 + .../models/DestinationProperties.java | 16 +- .../models/DestinationType.java | 6 +- .../models/DeviceAdministrativeState.java | 35 +- .../models/DeviceInterfaceProperties.java | 53 +- .../models/DeviceRoCommand.java | 85 + .../models/DeviceRole.java | 61 + .../models/DeviceRwCommand.java | 85 + .../models/DiscardCommitBatchRequest.java | 87 + .../models/DiscardCommitBatchResponse.java | 35 + .../models/EnableDisableOnResources.java | 95 - .../models/EnableDisableState.java | 11 +- .../models/Encapsulation.java | 6 +- .../models/EncapsulationType.java | 6 +- .../models/ExportRoutePolicy.java | 10 +- .../models/ExportRoutePolicyInformation.java | 10 +- .../ExportRoutePolicyInformationPatch.java | 114 + .../models/ExportRoutePolicyPatch.java | 113 + .../ExpressRouteConnectionInformation.java | 23 +- .../models/ExtendedVlan.java | 51 + .../models/Extension.java | 6 +- .../models/ExtensionEnumProperty.java | 93 - .../models/ExternalNetwork.java | 375 +- ...lNetworkBfdAdministrativeStateRequest.java | 119 + ...NetworkBfdAdministrativeStateResponse.java | 43 + .../ExternalNetworkBmpPatchProperties.java | 88 + .../models/ExternalNetworkBmpProperties.java | 87 + .../models/ExternalNetworkPatch.java | 239 +- .../ExternalNetworkPatchProperties.java | 251 +- ...tworkPatchPropertiesOptionAProperties.java | 321 +- .../ExternalNetworkPatchableProperties.java | 221 - .../models/ExternalNetworkProperties.java | 307 +- ...nalNetworkPropertiesOptionAProperties.java | 327 +- .../models/ExternalNetworkRouteType.java | 51 + ...ternalNetworkStaticRouteConfiguration.java | 149 + ...lNetworkStaticRoutePatchConfiguration.java | 149 + .../models/ExternalNetworks.java | 55 +- .../models/ExternalNetworksList.java | 128 - .../models/FabricLockProperties.java | 91 + .../models/FabricSkuType.java | 6 +- .../models/FeatureFlagProperties.java | 91 + .../models/GatewayType.java | 6 +- ...ccessControlListActionPatchProperties.java | 88 + ...obalAccessControlListActionProperties.java | 88 + ...alNetworkTapRuleActionPatchProperties.java | 116 + .../GlobalNetworkTapRuleActionProperties.java | 116 + .../models/HeaderAddressProperties.java | 115 + .../models/IPAddressType.java | 51 + .../IcmpConfigurationPatchProperties.java | 88 + .../models/IcmpConfigurationProperties.java | 87 + .../models/IdentitySelector.java | 117 + .../models/IdentitySelectorPatch.java | 116 + .../models/ImportRoutePolicy.java | 10 +- .../models/ImportRoutePolicyInformation.java | 10 +- .../ImportRoutePolicyInformationPatch.java | 114 + .../models/ImportRoutePolicyPatch.java | 113 + .../models/InterfaceType.java | 6 +- .../models/InternalNetwork.java | 565 +-- ...lNetworkBfdAdministrativeStateRequest.java | 149 + ...NetworkBfdAdministrativeStateResponse.java | 37 + ...lNetworkBgpAdministrativeStateRequest.java | 120 + ...NetworkBgpAdministrativeStateResponse.java | 37 + .../InternalNetworkBmpPatchProperties.java | 119 + .../models/InternalNetworkBmpProperties.java | 118 + .../models/InternalNetworkPatch.java | 329 +- .../InternalNetworkPatchProperties.java | 282 +- .../InternalNetworkPatchableProperties.java | 373 -- .../models/InternalNetworkProperties.java | 419 +- ...rnalNetworkPropertiesBgpConfiguration.java | 235 - ...orkPropertiesStaticRouteConfiguration.java | 146 - .../models/InternalNetworkRouteType.java | 51 + .../models/InternalNetworks.java | 72 +- .../models/InternalNetworksList.java | 128 - .../models/InternetGateway.java | 127 +- .../models/InternetGatewayPatch.java | 69 +- .../InternetGatewayPatchProperties.java} | 40 +- .../models/InternetGatewayProperties.java | 169 +- .../models/InternetGatewayRule.java | 67 +- .../models/InternetGatewayRulePatch.java | 34 +- .../models/InternetGatewayRuleProperties.java | 87 +- .../models/InternetGatewayRules.java | 34 +- .../InternetGatewayRulesListResult.java | 129 - .../models/InternetGateways.java | 34 +- .../models/InternetGatewaysListResult.java | 128 - .../models/IpAddressType.java | 51 - .../models/IpCommunities.java | 34 +- .../models/IpCommunitiesListResult.java | 127 - .../models/IpCommunity.java | 103 +- .../IpCommunityAddOperationProperties.java | 97 - .../IpCommunityDeleteOperationProperties.java | 97 - .../models/IpCommunityIdList.java | 12 +- .../models/IpCommunityPatch.java | 69 +- .../IpCommunityPatchableProperties.java | 18 +- .../models/IpCommunityProperties.java | 121 +- .../models/IpCommunityRule.java | 22 +- .../IpCommunitySetOperationProperties.java | 97 - .../models/IpExtendedCommunities.java | 34 +- .../models/IpExtendedCommunity.java | 100 +- ...tendedCommunityAddOperationProperties.java | 99 - ...dedCommunityDeleteOperationProperties.java | 99 - .../models/IpExtendedCommunityIdList.java | 12 +- .../models/IpExtendedCommunityPatch.java | 91 +- .../IpExtendedCommunityPatchProperties.java | 60 +- ...pExtendedCommunityPatchableProperties.java | 112 - .../models/IpExtendedCommunityProperties.java | 119 +- .../models/IpExtendedCommunityRule.java | 22 +- ...tendedCommunitySetOperationProperties.java | 99 - .../models/IpGroupPatchProperties.java | 143 + .../models/IpGroupProperties.java | 18 +- .../models/IpMatchCondition.java | 10 +- .../models/IpMatchConditionPatch.java | 173 + .../managednetworkfabric/models/IpPrefix.java | 116 +- .../models/IpPrefixPatch.java | 90 +- .../models/IpPrefixPatchProperties.java | 57 +- .../models/IpPrefixPatchableProperties.java | 98 - .../models/IpPrefixProperties.java | 119 +- .../models/IpPrefixRule.java | 21 +- .../models/IpPrefixes.java | 34 +- .../models/IpPrefixesListResult.java | 127 - .../models/IsManagementType.java | 6 +- .../models/IsMonitoringEnabled.java | 6 +- .../IsWorkloadManagementNetworkEnabled.java | 6 +- .../IsolationDomainPatchProperties.java | 118 + .../models/IsolationDomainProperties.java | 10 +- .../models/L2IsolationDomain.java | 162 +- .../models/L2IsolationDomainPatch.java | 90 +- .../L2IsolationDomainPatchProperties.java | 173 + .../models/L2IsolationDomainProperties.java | 144 +- .../models/L2IsolationDomains.java | 120 +- .../models/L2IsolationDomainsListResult.java | 128 - .../models/L3ExportRoutePolicy.java | 10 +- .../models/L3ExportRoutePolicyPatch.java | 113 + .../models/L3IsolationDomain.java | 241 +- .../models/L3IsolationDomainPatch.java | 162 +- .../L3IsolationDomainPatchProperties.java | 120 +- .../L3IsolationDomainPatchableProperties.java | 194 - .../models/L3IsolationDomainProperties.java | 278 +- .../models/L3IsolationDomains.java | 54 +- .../models/L3IsolationDomainsListResult.java | 128 - .../models/L3OptionAProperties.java | 263 - .../models/L3OptionBPatchProperties.java | 146 + .../models/L3OptionBProperties.java | 13 +- .../L3UniqueRouteDistinguisherProperties.java | 77 + .../models/LastOperationProperties.java | 73 + .../models/Layer2Configuration.java | 10 +- .../models/Layer2ConfigurationPatch.java | 115 + .../models/Layer3IpPrefixProperties.java | 177 - .../models/Layer4Protocol.java | 11 +- .../models/LockConfigurationState.java | 51 + .../ManagedResourceGroupConfiguration.java | 10 +- .../models/ManagedServiceIdentity.java | 154 + .../models/ManagedServiceIdentityPatch.java | 119 + .../ManagedServiceIdentitySelectorType.java | 52 + .../models/ManagedServiceIdentityType.java | 62 + ...agementNetworkConfigurationProperties.java | 27 +- ... ManagementNetworkPatchConfiguration.java} | 52 +- .../models/MicroBfdState.java | 51 + ...eRouteDistinguisherConfigurationState.java | 52 + .../NativeIpv4PrefixLimitPatchProperties.java | 90 + .../NativeIpv4PrefixLimitProperties.java | 89 + .../NativeIpv6PrefixLimitPatchProperties.java | 90 + .../NativeIpv6PrefixLimitProperties.java | 89 + .../models/NeighborAddress.java | 44 +- ...eighborAddressBfdAdministrativeStatus.java | 113 + ...eighborAddressBgpAdministrativeStatus.java | 113 + .../models/NeighborAddressPatch.java | 138 + .../models/NeighborGroup.java | 116 +- .../models/NeighborGroupDestination.java | 10 +- .../models/NeighborGroupDestinationPatch.java | 119 + .../models/NeighborGroupPatch.java | 89 +- .../models/NeighborGroupPatchProperties.java | 62 +- .../NeighborGroupPatchableProperties.java | 98 - .../models/NeighborGroupProperties.java | 107 +- .../models/NeighborGroups.java | 34 +- .../models/NeighborGroupsListResult.java | 127 - .../models/NetworkDevice.java | 288 +- .../models/NetworkDevicePatchParameters.java | 114 +- ...etworkDevicePatchParametersProperties.java | 78 +- .../NetworkDevicePatchableProperties.java | 124 - .../models/NetworkDeviceProperties.java | 206 +- .../models/NetworkDeviceRole.java | 12 +- .../models/NetworkDeviceRoleName.java | 12 +- .../models/NetworkDeviceSku.java | 50 +- .../models/NetworkDeviceSkuProperties.java | 91 +- .../models/NetworkDeviceSkus.java | 14 +- .../models/NetworkDeviceSkusListResult.java | 128 - .../models/NetworkDevices.java | 122 +- .../models/NetworkDevicesListResult.java | 127 - .../models/NetworkFabric.java | 588 +-- .../models/NetworkFabricController.java | 300 +- .../models/NetworkFabricControllerPatch.java | 104 +- ...tworkFabricControllerPatchProperties.java} | 57 +- .../NetworkFabricControllerProperties.java | 262 +- .../models/NetworkFabricControllers.java | 38 +- .../NetworkFabricControllersListResult.java | 129 - .../models/NetworkFabricLockAction.java | 51 + .../models/NetworkFabricLockRequest.java | 115 + .../models/NetworkFabricLockType.java | 51 + .../models/NetworkFabricPatch.java | 233 +- .../models/NetworkFabricPatchProperties.java | 438 ++ .../NetworkFabricPatchableProperties.java | 275 -- ...PropertiesTerminalServerConfiguration.java | 226 - .../models/NetworkFabricProperties.java | 362 +- .../models/NetworkFabricSku.java | 51 +- .../models/NetworkFabricSkuProperties.java | 43 +- .../models/NetworkFabricSkus.java | 14 +- .../models/NetworkFabricSkusListResult.java | 128 - .../models/NetworkFabricUpgradeAction.java | 6 +- .../models/NetworkFabrics.java | 239 +- .../models/NetworkFabricsListResult.java | 127 - .../models/NetworkInterface.java | 117 +- .../models/NetworkInterfacePatch.java | 49 +- .../NetworkInterfacePatchProperties.java | 142 + .../models/NetworkInterfaceProperties.java | 126 +- .../models/NetworkInterfaces.java | 34 +- .../models/NetworkInterfacesList.java | 128 - .../models/NetworkMonitor.java | 288 ++ .../models/NetworkMonitorPatch.java | 115 + .../models/NetworkMonitorPatchProperties.java | 87 + .../models/NetworkMonitorProperties.java | 180 + .../models/NetworkMonitors.java | 187 + .../models/NetworkPacketBroker.java | 67 +- .../models/NetworkPacketBrokerPatch.java | 34 +- .../models/NetworkPacketBrokerProperties.java | 37 +- .../models/NetworkPacketBrokers.java | 34 +- .../NetworkPacketBrokersListResult.java | 129 - .../models/NetworkRack.java | 88 +- ...{TagsUpdate.java => NetworkRackPatch.java} | 40 +- .../models/NetworkRackProperties.java | 83 +- .../models/NetworkRackType.java | 8 +- .../models/NetworkRacks.java | 34 +- .../models/NetworkRacksListResult.java | 127 - .../models/NetworkTap.java | 182 +- .../models/NetworkTapPatch.java | 113 +- .../models/NetworkTapPatchProperties.java | 144 + ...apPatchableParametersDestinationsItem.java | 133 - .../models/NetworkTapProperties.java | 105 +- .../NetworkTapPropertiesDestinationsItem.java | 132 - .../models/NetworkTapRule.java | 277 +- .../models/NetworkTapRuleAction.java | 17 +- .../models/NetworkTapRuleActionPatch.java | 203 + .../models/NetworkTapRuleMatchCondition.java | 133 +- .../NetworkTapRuleMatchConditionPatch.java | 204 + .../NetworkTapRuleMatchConfiguration.java | 24 +- ...NetworkTapRuleMatchConfigurationPatch.java | 208 + .../models/NetworkTapRulePatch.java | 160 +- .../models/NetworkTapRulePatchProperties.java | 114 +- .../NetworkTapRulePatchableProperties.java | 196 - .../models/NetworkTapRuleProperties.java | 269 +- .../models/NetworkTapRules.java | 58 +- .../models/NetworkTapRulesListResult.java | 128 - .../models/NetworkTaps.java | 50 +- .../models/NetworkTapsListResult.java | 127 - .../models/NetworkToNetworkInterconnect.java | 360 +- .../NetworkToNetworkInterconnectPatch.java | 250 +- ...ToNetworkInterconnectPatchProperties.java} | 189 +- ...etworkToNetworkInterconnectProperties.java | 174 +- ...tPropertiesOptionBLayer3Configuration.java | 168 - .../models/NetworkToNetworkInterconnects.java | 65 +- .../NetworkToNetworkInterconnectsList.java | 129 - .../managednetworkfabric/models/NfcSku.java | 8 +- .../NniBfdAdministrativeStateRequest.java | 116 + .../NniBfdAdministrativeStateResponse.java | 42 + .../models/NniBmpPatchProperties.java | 87 + .../models/NniBmpProperties.java | 88 + .../models/NniStaticRouteConfiguration.java | 146 + .../NniStaticRoutePatchConfiguration.java | 148 + .../managednetworkfabric/models/NniType.java | 6 +- .../models/NpbStaticRouteConfiguration.java | 19 +- .../NpbStaticRouteConfigurationPatch.java | 148 + .../models/Operation.java | 8 +- .../models/OperationDisplay.java | 14 +- .../models/Operations.java | 6 +- .../models/OptionAProperties.java | 180 - .../models/OptionBLayer3Configuration.java | 261 +- ...onBLayer3ConfigurationPatchProperties.java | 337 ++ ...tionBLayer3PrefixLimitPatchProperties.java | 88 + .../OptionBLayer3PrefixLimitProperties.java | 87 + .../managednetworkfabric/models/Origin.java | 8 +- .../models/PeeringOption.java | 6 +- .../PoliceRateConfigurationProperties.java | 114 + .../models/PollingIntervalInSeconds.java | 60 +- .../models/PollingType.java | 6 +- .../models/PortCondition.java | 19 +- .../models/PortConditionPatch.java | 174 + .../models/PortGroupPatchProperties.java | 115 + .../models/PortGroupProperties.java | 10 +- .../managednetworkfabric/models/PortType.java | 11 +- .../models/PrefixLimitPatchProperties.java | 141 + .../models/PrefixLimitProperties.java | 141 + .../models/PrefixType.java | 6 +- .../models/ProvisioningState.java | 14 +- .../models/RebootProperties.java | 10 +- .../models/RebootType.java | 10 +- .../models/RedistributeConnectedSubnets.java | 6 +- .../models/RedistributeStaticRoutes.java | 6 +- .../models/RoutePolicies.java | 54 +- .../models/RoutePoliciesListResult.java | 127 - .../models/RoutePolicy.java | 188 +- .../models/RoutePolicyActionType.java | 8 +- .../models/RoutePolicyConditionType.java | 6 +- .../models/RoutePolicyPatch.java | 92 +- .../RoutePolicyPatchableProperties.java | 29 +- .../models/RoutePolicyProperties.java | 208 +- .../RoutePolicyStatementPatchProperties.java | 174 + .../RoutePolicyStatementProperties.java | 73 +- .../RoutePrefixLimitPatchProperties.java | 114 + .../models/RoutePrefixLimitProperties.java | 113 + .../models/RouteTargetInformation.java | 10 +- .../models/RouteTargetPatchInformation.java | 178 + .../models/RouteType.java | 51 + .../models/RuleCondition.java | 51 + .../models/RuleProperties.java | 130 +- .../models/SourceDestinationType.java | 11 +- .../StatementActionPatchProperties.java | 177 + .../models/StatementActionProperties.java | 24 +- .../StatementConditionPatchProperties.java | 176 + .../models/StatementConditionProperties.java | 102 +- .../models/StaticRouteConfiguration.java | 39 +- .../models/StaticRoutePatchConfiguration.java | 147 + .../models/StaticRoutePatchProperties.java | 116 + .../models/StaticRouteProperties.java | 21 +- .../models/StaticRouteRoutePolicy.java | 85 + .../models/StaticRouteRoutePolicyPatch.java | 86 + .../models/StationConfigurationState.java | 51 + .../models/StationConnectionMode.java | 51 + .../StationConnectionPatchProperties.java | 143 + .../models/StationConnectionProperties.java | 141 + .../models/StorageAccountConfiguration.java | 116 + .../StorageAccountPatchConfiguration.java | 118 + .../models/SupportedConnectorProperties.java | 38 +- .../models/SupportedVersionProperties.java | 61 +- .../models/TapRuleActionType.java | 16 +- .../models/TerminalServerConfiguration.java | 143 +- .../TerminalServerPatchConfiguration.java | 254 + .../TerminalServerPatchableProperties.java | 150 - ...eRouteDistinguisherConfigurationState.java | 52 + ...iqueRouteDistinguisherPatchProperties.java | 125 + .../UniqueRouteDistinguisherProperties.java | 142 + .../models/UpdateAdministrativeState.java | 50 +- .../UpdateDeviceAdministrativeState.java | 50 +- .../models/UpdateVersion.java | 12 +- .../UpgradeNetworkFabricProperties.java | 52 +- .../models/UserAssignedIdentity.java | 89 + .../models/V4OverV6BgpSessionState.java | 51 + .../models/V6OverV4BgpSessionState.java | 51 + .../models/ValidateAction.java | 8 +- .../ValidateConfigurationProperties.java | 10 +- .../models/ValidateConfigurationResponse.java | 16 +- .../ViewDeviceConfigurationResponse.java | 35 + .../models/VlanGroupPatchProperties.java | 115 + .../models/VlanGroupProperties.java | 10 +- .../models/VlanMatchCondition.java | 24 +- .../models/VlanMatchConditionPatch.java | 148 + .../VpnConfigurationPatchableProperties.java | 33 +- ...nPatchablePropertiesOptionAProperties.java | 239 - .../models/VpnConfigurationProperties.java | 42 +- ...figurationPropertiesOptionAProperties.java | 233 - .../models/VpnOptionAPatchProperties.java | 281 ++ .../models/VpnOptionAProperties.java | 282 ++ .../models/VpnOptionBPatchProperties.java | 150 + ...perties.java => VpnOptionBProperties.java} | 51 +- .../models/WellKnownCommunities.java | 12 +- .../models/package-info.java | 4 +- .../managednetworkfabric/package-info.java | 4 +- .../src/main/java/module-info.java | 3 +- ...nagednetworkfabric_apiview_properties.json | 724 +++ ...manager-managednetworkfabric_metadata.json | 1 + .../proxy-config.json | 2 +- .../reflect-config.json | 2 +- ...rcemanager-managednetworkfabric.properties | 1 + .../AccessControlListsCreateSamples.java | 108 +- .../AccessControlListsDeleteSamples.java | 10 +- ...ControlListsGetByResourceGroupSamples.java | 12 +- ...ontrolListsListByResourceGroupSamples.java | 10 +- .../AccessControlListsListSamples.java | 10 +- .../AccessControlListsResyncSamples.java | 10 +- ...ListsUpdateAdministrativeStateSamples.java | 10 +- .../AccessControlListsUpdateSamples.java | 131 +- ...trolListsValidateConfigurationSamples.java | 10 +- .../ExternalNetworksCreateSamples.java | 106 +- .../ExternalNetworksDeleteSamples.java | 14 +- .../generated/ExternalNetworksGetSamples.java | 14 +- ...etworksListByL3IsolationDomainSamples.java | 12 +- ...worksUpdateAdministrativeStateSamples.java | 12 +- ...ksUpdateBfdAdministrativeStateSamples.java | 31 + .../ExternalNetworksUpdateSamples.java | 121 +- ...ticRouteBfdAdministrativeStateSamples.java | 32 - .../InternalNetworksCreateSamples.java | 115 +- .../InternalNetworksDeleteSamples.java | 14 +- .../generated/InternalNetworksGetSamples.java | 14 +- ...etworksListByL3IsolationDomainSamples.java | 12 +- ...worksUpdateAdministrativeStateSamples.java | 12 +- ...ksUpdateBfdAdministrativeStateSamples.java | 32 + ...ksUpdateBgpAdministrativeStateSamples.java | 20 +- .../InternalNetworksUpdateSamples.java | 120 +- ...ticRouteBfdAdministrativeStateSamples.java | 32 - .../InternetGatewayRulesCreateSamples.java | 26 +- .../InternetGatewayRulesDeleteSamples.java | 10 +- ...GatewayRulesGetByResourceGroupSamples.java | 12 +- ...atewayRulesListByResourceGroupSamples.java | 10 +- .../InternetGatewayRulesListSamples.java | 10 +- .../InternetGatewayRulesUpdateSamples.java | 12 +- .../InternetGatewaysCreateSamples.java | 28 +- .../InternetGatewaysDeleteSamples.java | 12 +- ...rnetGatewaysGetByResourceGroupSamples.java | 12 +- ...netGatewaysListByResourceGroupSamples.java | 10 +- .../InternetGatewaysListSamples.java | 10 +- .../InternetGatewaysUpdateSamples.java | 19 +- .../generated/IpCommunitiesCreateSamples.java | 25 +- .../generated/IpCommunitiesDeleteSamples.java | 12 +- ...pCommunitiesGetByResourceGroupSamples.java | 12 +- ...CommunitiesListByResourceGroupSamples.java | 10 +- .../generated/IpCommunitiesListSamples.java | 10 +- .../generated/IpCommunitiesUpdateSamples.java | 37 +- .../IpExtendedCommunitiesCreateSamples.java | 23 +- .../IpExtendedCommunitiesDeleteSamples.java | 10 +- ...dCommunitiesGetByResourceGroupSamples.java | 10 +- ...CommunitiesListByResourceGroupSamples.java | 10 +- .../IpExtendedCommunitiesListSamples.java | 10 +- .../IpExtendedCommunitiesUpdateSamples.java | 22 +- .../generated/IpPrefixesCreateSamples.java | 27 +- .../generated/IpPrefixesDeleteSamples.java | 12 +- .../IpPrefixesGetByResourceGroupSamples.java | 10 +- .../IpPrefixesListByResourceGroupSamples.java | 10 +- .../generated/IpPrefixesListSamples.java | 10 +- .../generated/IpPrefixesUpdateSamples.java | 27 +- ...tionDomainsCommitConfigurationSamples.java | 10 +- .../L2IsolationDomainsCreateSamples.java | 27 +- .../L2IsolationDomainsDeleteSamples.java | 12 +- ...ationDomainsGetByResourceGroupSamples.java | 14 +- ...tionDomainsListByResourceGroupSamples.java | 10 +- .../L2IsolationDomainsListSamples.java | 10 +- ...mainsUpdateAdministrativeStateSamples.java | 14 +- .../L2IsolationDomainsUpdateSamples.java | 21 +- ...onDomainsValidateConfigurationSamples.java | 10 +- ...tionDomainsCommitConfigurationSamples.java | 10 +- .../L3IsolationDomainsCreateSamples.java | 46 +- .../L3IsolationDomainsDeleteSamples.java | 10 +- ...ationDomainsGetByResourceGroupSamples.java | 12 +- ...tionDomainsListByResourceGroupSamples.java | 10 +- .../L3IsolationDomainsListSamples.java | 10 +- ...mainsUpdateAdministrativeStateSamples.java | 12 +- .../L3IsolationDomainsUpdateSamples.java | 50 +- ...onDomainsValidateConfigurationSamples.java | 10 +- .../NeighborGroupsCreateSamples.java | 25 +- .../NeighborGroupsDeleteSamples.java | 12 +- ...ighborGroupsGetByResourceGroupSamples.java | 12 +- ...ghborGroupsListByResourceGroupSamples.java | 10 +- .../generated/NeighborGroupsListSamples.java | 10 +- .../NeighborGroupsUpdateSamples.java | 27 +- .../NetworkDeviceSkusGetSamples.java | 12 +- .../NetworkDeviceSkusListSamples.java | 10 +- .../NetworkDevicesCreateSamples.java | 23 +- .../NetworkDevicesDeleteSamples.java | 12 +- ...tworkDevicesGetByResourceGroupSamples.java | 12 +- ...workDevicesListByResourceGroupSamples.java | 10 +- .../generated/NetworkDevicesListSamples.java | 10 +- .../NetworkDevicesRebootSamples.java | 12 +- ...orkDevicesRefreshConfigurationSamples.java | 10 +- .../NetworkDevicesRunRoCommandSamples.java | 27 + .../NetworkDevicesRunRwCommandSamples.java | 27 + ...vicesUpdateAdministrativeStateSamples.java | 10 +- .../NetworkDevicesUpdateSamples.java | 21 +- .../NetworkDevicesUpgradeSamples.java | 12 +- ...NetworkFabricControllersCreateSamples.java | 56 +- ...NetworkFabricControllersDeleteSamples.java | 10 +- ...cControllersGetByResourceGroupSamples.java | 10 +- ...ControllersListByResourceGroupSamples.java | 10 +- .../NetworkFabricControllersListSamples.java | 10 +- ...NetworkFabricControllersUpdateSamples.java | 40 +- .../NetworkFabricSkusGetSamples.java | 14 +- .../NetworkFabricSkusListSamples.java | 10 +- ...orkFabricsArmConfigurationDiffSamples.java | 23 + ...etworkFabricsCommitBatchStatusSamples.java | 27 + ...workFabricsCommitConfigurationSamples.java | 13 +- .../NetworkFabricsCreateSamples.java | 159 +- .../NetworkFabricsDeleteSamples.java | 12 +- .../NetworkFabricsDeprovisionSamples.java | 12 +- ...tworkFabricsDiscardCommitBatchSamples.java | 27 + ...tworkFabricsGetByResourceGroupSamples.java | 12 +- .../NetworkFabricsGetTopologySamples.java | 10 +- ...workFabricsListByResourceGroupSamples.java | 10 +- .../generated/NetworkFabricsListSamples.java | 10 +- .../NetworkFabricsLockFabricSamples.java | 31 + .../NetworkFabricsProvisionSamples.java | 14 +- ...orkFabricsRefreshConfigurationSamples.java | 12 +- ...nfraManagementBfdConfigurationSamples.java | 10 +- .../NetworkFabricsUpdateSamples.java | 150 +- ...loadManagementBfdConfigurationSamples.java | 10 +- .../NetworkFabricsUpgradeSamples.java | 14 +- ...rkFabricsValidateConfigurationSamples.java | 10 +- ...FabricsViewDeviceConfigurationSamples.java | 24 + .../NetworkInterfacesCreateSamples.java | 18 +- .../NetworkInterfacesDeleteSamples.java | 15 +- .../NetworkInterfacesGetSamples.java | 12 +- ...kInterfacesListByNetworkDeviceSamples.java | 10 +- ...facesUpdateAdministrativeStateSamples.java | 10 +- .../NetworkInterfacesUpdateSamples.java | 19 +- .../NetworkMonitorsCreateSamples.java | 68 + .../NetworkMonitorsDeleteSamples.java | 23 + ...workMonitorsGetByResourceGroupSamples.java | 24 + ...orkMonitorsListByResourceGroupSamples.java | 23 + .../generated/NetworkMonitorsListSamples.java | 23 + ...itorsUpdateAdministrativeStateSamples.java | 30 + .../NetworkMonitorsUpdateSamples.java | 68 + .../NetworkPacketBrokersCreateSamples.java | 17 +- .../NetworkPacketBrokersDeleteSamples.java | 10 +- ...acketBrokersGetByResourceGroupSamples.java | 12 +- ...cketBrokersListByResourceGroupSamples.java | 10 +- .../NetworkPacketBrokersListSamples.java | 10 +- .../NetworkPacketBrokersUpdateSamples.java | 12 +- .../generated/NetworkRacksCreateSamples.java | 23 +- .../generated/NetworkRacksDeleteSamples.java | 12 +- ...NetworkRacksGetByResourceGroupSamples.java | 12 +- ...etworkRacksListByResourceGroupSamples.java | 10 +- .../generated/NetworkRacksListSamples.java | 10 +- .../generated/NetworkRacksUpdateSamples.java | 14 +- .../NetworkTapRulesCreateSamples.java | 101 +- .../NetworkTapRulesDeleteSamples.java | 12 +- ...workTapRulesGetByResourceGroupSamples.java | 12 +- ...orkTapRulesListByResourceGroupSamples.java | 10 +- .../generated/NetworkTapRulesListSamples.java | 10 +- .../NetworkTapRulesResyncSamples.java | 12 +- ...RulesUpdateAdministrativeStateSamples.java | 10 +- .../NetworkTapRulesUpdateSamples.java | 102 +- ...kTapRulesValidateConfigurationSamples.java | 10 +- .../generated/NetworkTapsCreateSamples.java | 44 +- .../generated/NetworkTapsDeleteSamples.java | 12 +- .../NetworkTapsGetByResourceGroupSamples.java | 12 +- ...NetworkTapsListByResourceGroupSamples.java | 10 +- .../generated/NetworkTapsListSamples.java | 10 +- .../generated/NetworkTapsResyncSamples.java | 12 +- ...kTapsUpdateAdministrativeStateSamples.java | 10 +- .../generated/NetworkTapsUpdateSamples.java | 43 +- ...rkToNetworkInterconnectsCreateSamples.java | 97 +- ...rkToNetworkInterconnectsDeleteSamples.java | 12 +- ...tworkToNetworkInterconnectsGetSamples.java | 12 +- ...terconnectsListByNetworkFabricSamples.java | 12 +- ...nectsUpdateAdministrativeStateSamples.java | 14 +- ...tsUpdateBfdAdministrativeStateSamples.java | 31 + ...eNpbStaticRouteBfdAdministrativeState.java | 32 - ...rkToNetworkInterconnectsUpdateSamples.java | 102 +- .../generated/OperationsListSamples.java | 12 +- ...utePoliciesCommitConfigurationSamples.java | 10 +- .../generated/RoutePoliciesCreateSamples.java | 75 +- .../generated/RoutePoliciesDeleteSamples.java | 12 +- ...outePoliciesGetByResourceGroupSamples.java | 12 +- ...utePoliciesListByResourceGroupSamples.java | 10 +- .../generated/RoutePoliciesListSamples.java | 10 +- ...iciesUpdateAdministrativeStateSamples.java | 10 +- .../generated/RoutePoliciesUpdateSamples.java | 77 +- ...ePoliciesValidateConfigurationSamples.java | 10 +- .../AccessControlListActionPatchTests.java | 49 + .../AccessControlListActionTests.java | 36 +- .../AccessControlListInnerTests.java | 487 +- .../AccessControlListListResultTests.java | 41 + ...ssControlListMatchConditionPatchTests.java | 95 + .../AccessControlListMatchConditionTests.java | 121 +- ...ntrolListMatchConfigurationPatchTests.java | 142 + ...essControlListMatchConfigurationTests.java | 222 +- ...AccessControlListPatchPropertiesTests.java | 794 ++-- .../AccessControlListPatchTests.java | 372 +- ...ssControlListPatchablePropertiesTests.java | 303 -- ...essControlListPortConditionPatchTests.java | 42 + .../AccessControlListPortConditionTests.java | 31 +- .../AccessControlListPropertiesTests.java | 892 ++-- .../AccessControlListsCreateMockTests.java | 101 +- ...tByResourceGroupWithResponseMockTests.java | 43 +- ...trolListsListByResourceGroupMockTests.java | 46 +- .../AccessControlListsListMockTests.java | 45 +- .../AccessControlListsListResultTests.java | 236 - ...ActionIpCommunityPatchPropertiesTests.java | 36 + .../ActionIpCommunityPropertiesTests.java | 25 +- ...ExtendedCommunityPatchPropertiesTests.java | 37 + ...ionIpExtendedCommunityPropertiesTests.java | 23 +- .../AggregateRouteConfigurationTests.java | 18 +- ...AggregateRoutePatchConfigurationTests.java | 32 + .../generated/AggregateRouteTests.java | 10 +- .../generated/AnnotationResourceTests.java | 25 - .../generated/BfdConfigurationTests.java | 14 +- .../generated/BfdPatchConfigurationTests.java | 29 + .../generated/BgpConfigurationTests.java | 84 +- .../generated/BgpPatchConfigurationTests.java | 81 + .../generated/BitRateTests.java | 28 + .../BmpConfigurationPatchPropertiesTests.java | 69 + .../BmpConfigurationPropertiesTests.java | 69 + .../generated/BurstSizeTests.java | 28 + .../generated/CommitBatchDetailsTests.java | 18 + .../CommitBatchStatusRequestTests.java | 25 + ...onDynamicMatchConfigurationPatchTests.java | 65 + .../CommonDynamicMatchConfigurationTests.java | 65 +- .../generated/CommonMatchConditionsTests.java | 53 - ...ctionResponseForDeviceROCommandsTests.java | 20 + ...onditionalDefaultRoutePropertiesTests.java | 47 + .../generated/ConnectedSubnetPatchTests.java | 29 + .../ConnectedSubnetRoutePolicyPatchTests.java | 31 + .../ConnectedSubnetRoutePolicyTests.java | 19 +- .../generated/ConnectedSubnetTests.java | 14 +- .../generated/ControllerServicesTests.java | 19 +- .../DestinationPatchPropertiesTests.java | 45 + .../generated/DestinationPropertiesTests.java | 40 +- .../DeviceInterfacePropertiesTests.java | 29 +- .../generated/DeviceRoCommandTests.java | 24 + .../generated/DeviceRwCommandTests.java | 24 + .../DiscardCommitBatchRequestTests.java | 25 + .../EnableDisableOnResourcesTests.java | 28 - ...xportRoutePolicyInformationPatchTests.java | 30 + .../ExportRoutePolicyInformationTests.java | 17 +- .../ExportRoutePolicyPatchTests.java | 29 + .../generated/ExportRoutePolicyTests.java | 16 +- .../generated/ExtensionEnumPropertyTests.java | 26 - ...orkBfdAdministrativeStateRequestTests.java | 32 + ...xternalNetworkBmpPatchPropertiesTests.java | 27 + .../ExternalNetworkBmpPropertiesTests.java | 27 + .../generated/ExternalNetworkInnerTests.java | 276 +- .../ExternalNetworkListResultTests.java | 75 + ...PatchPropertiesOptionAPropertiesTests.java | 123 +- .../ExternalNetworkPatchPropertiesTests.java | 259 +- .../generated/ExternalNetworkPatchTests.java | 281 +- ...ternalNetworkPatchablePropertiesTests.java | 47 - ...tworkPropertiesOptionAPropertiesTests.java | 115 +- .../ExternalNetworkPropertiesTests.java | 236 +- ...lNetworkStaticRouteConfigurationTests.java | 53 + ...orkStaticRoutePatchConfigurationTests.java | 55 + .../ExternalNetworksCreateMockTests.java | 170 +- ...ernalNetworksGetWithResponseMockTests.java | 93 +- ...worksListByL3IsolationDomainMockTests.java | 119 +- .../generated/ExternalNetworksListTests.java | 230 - .../generated/FabricLockPropertiesTests.java | 22 + .../generated/FeatureFlagPropertiesTests.java | 20 + ...ControlListActionPatchPropertiesTests.java | 27 + ...ccessControlListActionPropertiesTests.java | 27 + ...workTapRuleActionPatchPropertiesTests.java | 31 + ...alNetworkTapRuleActionPropertiesTests.java | 31 + .../HeaderAddressPropertiesTests.java | 30 + ...IcmpConfigurationPatchPropertiesTests.java | 28 + .../IcmpConfigurationPropertiesTests.java | 27 + .../generated/IdentitySelectorPatchTests.java | 31 + .../generated/IdentitySelectorTests.java | 31 + ...mportRoutePolicyInformationPatchTests.java | 30 + .../ImportRoutePolicyInformationTests.java | 16 +- .../ImportRoutePolicyPatchTests.java | 29 + .../generated/ImportRoutePolicyTests.java | 18 +- ...orkBfdAdministrativeStateRequestTests.java | 36 + ...orkBgpAdministrativeStateRequestTests.java | 31 + ...nternalNetworkBmpPatchPropertiesTests.java | 32 + .../InternalNetworkBmpPropertiesTests.java | 32 + .../generated/InternalNetworkInnerTests.java | 312 +- .../InternalNetworkListResultTests.java | 80 + .../InternalNetworkPatchPropertiesTests.java | 258 +- .../generated/InternalNetworkPatchTests.java | 314 +- ...ternalNetworkPatchablePropertiesTests.java | 74 - ...etworkPropertiesBgpConfigurationTests.java | 65 - ...opertiesStaticRouteConfigurationTests.java | 50 - .../InternalNetworkPropertiesTests.java | 280 +- .../InternalNetworksCreateMockTests.java | 255 +- ...ernalNetworksGetWithResponseMockTests.java | 118 +- ...worksListByL3IsolationDomainMockTests.java | 151 +- .../generated/InternalNetworksListTests.java | 162 - .../generated/InternetGatewayInnerTests.java | 44 +- .../InternetGatewayListResultTests.java | 27 + .../InternetGatewayPatchPropertiesTests.java | 26 + .../generated/InternetGatewayPatchTests.java | 18 +- ...ternetGatewayPatchablePropertiesTests.java | 26 - .../InternetGatewayPropertiesTests.java | 33 +- .../InternetGatewayRuleInnerTests.java | 63 +- .../InternetGatewayRuleListResultTests.java | 30 + .../InternetGatewayRulePatchTests.java | 12 +- .../InternetGatewayRulePropertiesTests.java | 40 +- .../InternetGatewayRulesCreateMockTests.java | 57 +- ...tByResourceGroupWithResponseMockTests.java | 32 +- ...ewayRulesListByResourceGroupMockTests.java | 35 +- .../InternetGatewayRulesListMockTests.java | 33 +- .../InternetGatewayRulesListResultTests.java | 76 - .../InternetGatewaysCreateMockTests.java | 43 +- ...tByResourceGroupWithResponseMockTests.java | 27 +- ...tGatewaysListByResourceGroupMockTests.java | 29 +- .../InternetGatewaysListMockTests.java | 25 +- .../InternetGatewaysListResultTests.java | 69 - .../IpCommunitiesCreateMockTests.java | 67 +- ...tByResourceGroupWithResponseMockTests.java | 30 +- ...mmunitiesListByResourceGroupMockTests.java | 34 +- .../generated/IpCommunitiesListMockTests.java | 33 +- .../IpCommunitiesListResultTests.java | 97 - ...pCommunityAddOperationPropertiesTests.java | 29 - ...mmunityDeleteOperationPropertiesTests.java | 29 - .../generated/IpCommunityIdListTests.java | 14 +- .../generated/IpCommunityInnerTests.java | 80 +- .../generated/IpCommunityListResultTests.java | 32 + .../generated/IpCommunityPatchTests.java | 47 +- .../IpCommunityPatchablePropertiesTests.java | 46 +- .../generated/IpCommunityPropertiesTests.java | 58 +- .../generated/IpCommunityRuleTests.java | 29 +- ...pCommunitySetOperationPropertiesTests.java | 29 - .../IpExtendedCommunitiesCreateMockTests.java | 54 +- ...tByResourceGroupWithResponseMockTests.java | 28 +- ...mmunitiesListByResourceGroupMockTests.java | 32 +- .../IpExtendedCommunitiesListMockTests.java | 28 +- ...dCommunityAddOperationPropertiesTests.java | 29 - ...mmunityDeleteOperationPropertiesTests.java | 29 - .../IpExtendedCommunityIdListTests.java | 13 +- .../IpExtendedCommunityInnerTests.java | 65 +- .../IpExtendedCommunityListResultTests.java | 98 +- ...ExtendedCommunityPatchPropertiesTests.java | 25 +- .../IpExtendedCommunityPatchTests.java | 54 +- ...ndedCommunityPatchablePropertiesTests.java | 40 - .../IpExtendedCommunityPropertiesTests.java | 35 +- .../IpExtendedCommunityRuleTests.java | 18 +- ...dCommunitySetOperationPropertiesTests.java | 30 - .../IpGroupPatchPropertiesTests.java | 34 + .../generated/IpGroupPropertiesTests.java | 26 +- .../generated/IpMatchConditionPatchTests.java | 38 + .../generated/IpMatchConditionTests.java | 22 +- .../generated/IpPrefixInnerTests.java | 72 +- .../generated/IpPrefixListResultTests.java | 33 + .../IpPrefixPatchPropertiesTests.java | 64 +- .../generated/IpPrefixPatchTests.java | 61 +- .../IpPrefixPatchablePropertiesTests.java | 43 - .../generated/IpPrefixPropertiesTests.java | 48 +- .../generated/IpPrefixRuleTests.java | 28 +- .../generated/IpPrefixesCreateMockTests.java | 62 +- ...tByResourceGroupWithResponseMockTests.java | 30 +- ...pPrefixesListByResourceGroupMockTests.java | 39 +- .../generated/IpPrefixesListMockTests.java | 34 +- .../generated/IpPrefixesListResultTests.java | 107 - .../IsolationDomainPatchPropertiesTests.java | 32 + .../IsolationDomainPropertiesTests.java | 18 +- .../L2IsolationDomainInnerTests.java | 48 +- .../L2IsolationDomainListResultTests.java | 28 + ...L2IsolationDomainPatchPropertiesTests.java | 26 +- .../L2IsolationDomainPatchTests.java | 32 +- .../L2IsolationDomainPropertiesTests.java | 37 +- .../L2IsolationDomainsCreateMockTests.java | 47 +- ...tByResourceGroupWithResponseMockTests.java | 29 +- ...onDomainsListByResourceGroupMockTests.java | 29 +- .../L2IsolationDomainsListMockTests.java | 27 +- .../L2IsolationDomainsListResultTests.java | 67 - .../L3ExportRoutePolicyPatchTests.java | 30 + .../generated/L3ExportRoutePolicyTests.java | 16 +- .../L3IsolationDomainInnerTests.java | 102 +- .../L3IsolationDomainListResultTests.java | 53 + ...L3IsolationDomainPatchPropertiesTests.java | 79 +- .../L3IsolationDomainPatchTests.java | 95 +- ...olationDomainPatchablePropertiesTests.java | 57 - .../L3IsolationDomainPropertiesTests.java | 79 +- .../L3IsolationDomainsCreateMockTests.java | 90 +- ...tByResourceGroupWithResponseMockTests.java | 47 +- ...onDomainsListByResourceGroupMockTests.java | 73 +- .../L3IsolationDomainsListMockTests.java | 70 +- .../L3IsolationDomainsListResultTests.java | 94 - .../generated/L3OptionAPropertiesTests.java | 45 - .../L3OptionBPatchPropertiesTests.java | 44 + .../generated/L3OptionBPropertiesTests.java | 44 +- ...iqueRouteDistinguisherPropertiesTests.java | 23 + .../LastOperationPropertiesTests.java | 16 + .../Layer2ConfigurationPatchTests.java | 30 + .../generated/Layer2ConfigurationTests.java | 19 +- .../Layer3IpPrefixPropertiesTests.java | 35 - ...anagedResourceGroupConfigurationTests.java | 14 +- .../ManagedServiceIdentityPatchTests.java | 45 + .../ManagedServiceIdentityTests.java | 43 + ...ConfigurationPatchablePropertiesTests.java | 184 - ...ntNetworkConfigurationPropertiesTests.java | 224 +- ...agementNetworkPatchConfigurationTests.java | 185 + ...veIpv4PrefixLimitPatchPropertiesTests.java | 42 + .../NativeIpv4PrefixLimitPropertiesTests.java | 41 + ...veIpv6PrefixLimitPatchPropertiesTests.java | 35 + .../NativeIpv6PrefixLimitPropertiesTests.java | 41 + ...orAddressBfdAdministrativeStatusTests.java | 23 + ...orAddressBgpAdministrativeStatusTests.java | 23 + .../generated/NeighborAddressPatchTests.java | 26 + .../generated/NeighborAddressTests.java | 14 +- .../NeighborGroupDestinationPatchTests.java | 31 + .../NeighborGroupDestinationTests.java | 21 +- .../generated/NeighborGroupInnerTests.java | 38 +- .../NeighborGroupListResultTests.java | 25 + .../NeighborGroupPatchPropertiesTests.java | 28 +- .../generated/NeighborGroupPatchTests.java | 32 +- ...NeighborGroupPatchablePropertiesTests.java | 32 - .../NeighborGroupPropertiesTests.java | 25 +- .../NeighborGroupsCreateMockTests.java | 38 +- ...tByResourceGroupWithResponseMockTests.java | 24 +- ...borGroupsListByResourceGroupMockTests.java | 26 +- .../NeighborGroupsListMockTests.java | 24 +- .../NeighborGroupsListResultTests.java | 69 - .../generated/NetworkDeviceInnerTests.java | 42 +- .../NetworkDeviceListResultTests.java | 25 + ...kDevicePatchParametersPropertiesTests.java | 24 +- .../NetworkDevicePatchParametersTests.java | 31 +- ...NetworkDevicePatchablePropertiesTests.java | 29 - .../NetworkDevicePropertiesTests.java | 30 +- .../generated/NetworkDeviceSkuInnerTests.java | 88 +- .../NetworkDeviceSkuListResultTests.java | 34 + .../NetworkDeviceSkuPropertiesTests.java | 84 +- ...orkDeviceSkusGetWithResponseMockTests.java | 33 +- .../NetworkDeviceSkusListMockTests.java | 38 +- .../NetworkDeviceSkusListResultTests.java | 63 - .../NetworkDevicesCreateMockTests.java | 41 +- ...tByResourceGroupWithResponseMockTests.java | 26 +- ...rkDevicesListByResourceGroupMockTests.java | 26 +- .../NetworkDevicesListMockTests.java | 24 +- .../NetworkDevicesListResultTests.java | 80 - .../NetworkFabricLockRequestTests.java | 31 + .../generated/NetworkFabricSkuInnerTests.java | 17 +- .../NetworkFabricSkuListResultTests.java | 21 + .../NetworkFabricSkuPropertiesTests.java | 19 +- ...orkFabricSkusGetWithResponseMockTests.java | 21 +- .../NetworkFabricSkusListMockTests.java | 16 +- .../NetworkFabricSkusListResultTests.java | 35 - .../generated/NetworkInterfaceInnerTests.java | 18 +- .../NetworkInterfaceListResultTests.java | 22 + .../NetworkInterfacePatchPropertiesTests.java | 21 +- .../generated/NetworkInterfacePatchTests.java | 19 +- .../NetworkInterfacePropertiesTests.java | 18 +- .../NetworkInterfacesCreateMockTests.java | 25 +- ...orkInterfacesGetWithResponseMockTests.java | 18 +- ...nterfacesListByNetworkDeviceMockTests.java | 20 +- .../generated/NetworkInterfacesListTests.java | 34 - .../generated/NetworkMonitorInnerTests.java | 108 + .../NetworkMonitorListResultTests.java | 48 + .../NetworkMonitorPatchPropertiesTests.java | 76 + .../generated/NetworkMonitorPatchTests.java | 103 + .../NetworkMonitorPropertiesTests.java | 80 + .../NetworkMonitorsCreateMockTests.java | 102 + ...tByResourceGroupWithResponseMockTests.java | 64 + ...kMonitorsListByResourceGroupMockTests.java | 74 + .../NetworkMonitorsListMockTests.java | 72 + .../NetworkPacketBrokerInnerTests.java | 23 +- .../NetworkPacketBrokerListResultTests.java | 22 + .../NetworkPacketBrokerPatchTests.java | 14 +- .../NetworkPacketBrokerPropertiesTests.java | 12 +- .../NetworkPacketBrokersCreateMockTests.java | 29 +- ...tByResourceGroupWithResponseMockTests.java | 20 +- ...etBrokersListByResourceGroupMockTests.java | 20 +- .../NetworkPacketBrokersListMockTests.java | 18 +- .../NetworkPacketBrokersListResultTests.java | 58 - .../generated/NetworkRackInnerTests.java | 36 +- .../generated/NetworkRackListResultTests.java | 25 + ...eTests.java => NetworkRackPatchTests.java} | 18 +- .../generated/NetworkRackPropertiesTests.java | 24 +- .../NetworkRacksCreateMockTests.java | 37 +- ...tByResourceGroupWithResponseMockTests.java | 24 +- ...workRacksListByResourceGroupMockTests.java | 24 +- .../generated/NetworkRacksListMockTests.java | 22 +- .../NetworkRacksListResultTests.java | 70 - .../generated/NetworkTapInnerTests.java | 90 +- .../generated/NetworkTapListResultTests.java | 31 + .../NetworkTapPatchPropertiesTests.java | 79 + .../generated/NetworkTapPatchTests.java | 92 +- ...chableParametersDestinationsItemTests.java | 46 - .../NetworkTapPatchableParametersTests.java | 64 - ...orkTapPropertiesDestinationsItemTests.java | 46 - .../generated/NetworkTapPropertiesTests.java | 74 +- .../NetworkTapRuleActionPatchTests.java | 40 + .../generated/NetworkTapRuleActionTests.java | 34 +- .../generated/NetworkTapRuleInnerTests.java | 463 +- .../NetworkTapRuleListResultTests.java | 39 + ...etworkTapRuleMatchConditionPatchTests.java | 73 + .../NetworkTapRuleMatchConditionTests.java | 74 +- ...rkTapRuleMatchConfigurationPatchTests.java | 159 + ...NetworkTapRuleMatchConfigurationTests.java | 166 +- .../NetworkTapRulePatchPropertiesTests.java | 590 +-- .../generated/NetworkTapRulePatchTests.java | 455 +- ...etworkTapRulePatchablePropertiesTests.java | 344 -- .../NetworkTapRulePropertiesTests.java | 575 ++- .../NetworkTapRulesCreateMockTests.java | 130 +- ...tByResourceGroupWithResponseMockTests.java | 39 +- ...kTapRulesListByResourceGroupMockTests.java | 47 +- .../NetworkTapRulesListMockTests.java | 45 +- .../NetworkTapRulesListResultTests.java | 264 - .../generated/NetworkTapsCreateMockTests.java | 81 +- ...tByResourceGroupWithResponseMockTests.java | 41 +- ...tworkTapsListByResourceGroupMockTests.java | 51 +- .../generated/NetworkTapsListMockTests.java | 50 +- .../generated/NetworkTapsListResultTests.java | 124 - ...etworkToNetworkInterconnectInnerTests.java | 263 +- ...kToNetworkInterconnectListResultTests.java | 81 + ...tworkInterconnectPatchPropertiesTests.java | 157 + ...etworkToNetworkInterconnectPatchTests.java | 228 +- ...kInterconnectPatchablePropertiesTests.java | 99 - ...ertiesOptionBLayer3ConfigurationTests.java | 43 - ...kToNetworkInterconnectPropertiesTests.java | 238 +- ...ToNetworkInterconnectsCreateMockTests.java | 204 +- ...InterconnectsGetWithResponseMockTests.java | 99 +- ...rconnectsListByNetworkFabricMockTests.java | 157 +- ...etworkToNetworkInterconnectsListTests.java | 120 - ...NniBfdAdministrativeStateRequestTests.java | 31 + .../generated/NniBmpPatchPropertiesTests.java | 26 + .../generated/NniBmpPropertiesTests.java | 26 + .../NniStaticRouteConfigurationTests.java | 53 + ...NniStaticRoutePatchConfigurationTests.java | 48 + ...NpbStaticRouteConfigurationPatchTests.java | 51 + .../NpbStaticRouteConfigurationTests.java | 42 +- .../generated/OperationDisplayTests.java | 10 +- .../generated/OperationInnerTests.java | 11 +- .../generated/OperationListResultTests.java | 14 +- .../generated/OperationsListMockTests.java | 12 +- .../generated/OptionAPropertiesTests.java | 39 - ...yer3ConfigurationPatchPropertiesTests.java | 57 + .../OptionBLayer3ConfigurationTests.java | 56 +- ...Layer3PrefixLimitPatchPropertiesTests.java | 26 + ...tionBLayer3PrefixLimitPropertiesTests.java | 26 + .../generated/OptionBPropertiesTests.java | 44 - ...oliceRateConfigurationPropertiesTests.java | 38 + .../generated/PortConditionPatchTests.java | 38 + .../generated/PortConditionTests.java | 28 +- .../PortGroupPatchPropertiesTests.java | 30 + .../generated/PortGroupPropertiesTests.java | 17 +- .../PrefixLimitPatchPropertiesTests.java | 32 + .../generated/PrefixLimitPropertiesTests.java | 32 + .../generated/RebootPropertiesTests.java | 2 +- .../RoutePoliciesCreateMockTests.java | 127 +- ...tByResourceGroupWithResponseMockTests.java | 47 +- ...ePoliciesListByResourceGroupMockTests.java | 53 +- .../generated/RoutePoliciesListMockTests.java | 53 +- .../RoutePoliciesListResultTests.java | 108 - .../generated/RoutePolicyInnerTests.java | 145 +- .../generated/RoutePolicyListResultTests.java | 33 + .../generated/RoutePolicyPatchTests.java | 195 +- .../RoutePolicyPatchablePropertiesTests.java | 165 +- .../generated/RoutePolicyPropertiesTests.java | 203 +- ...tePolicyStatementPatchPropertiesTests.java | 87 + .../RoutePolicyStatementPropertiesTests.java | 100 +- .../RoutePrefixLimitPatchPropertiesTests.java | 29 + .../RoutePrefixLimitPropertiesTests.java | 28 + .../RouteTargetInformationTests.java | 29 +- .../RouteTargetPatchInformationTests.java | 37 + .../generated/RulePropertiesTests.java | 35 +- .../StatementActionPatchPropertiesTests.java | 63 + .../StatementActionPropertiesTests.java | 61 +- ...tatementConditionPatchPropertiesTests.java | 38 + .../StatementConditionPropertiesTests.java | 30 +- .../StaticRouteConfigurationTests.java | 48 +- .../StaticRoutePatchConfigurationTests.java | 48 + .../StaticRoutePatchPropertiesTests.java | 29 + .../generated/StaticRoutePropertiesTests.java | 20 +- .../StaticRouteRoutePolicyPatchTests.java | 31 + .../StaticRouteRoutePolicyTests.java | 30 + ...StationConnectionPatchPropertiesTests.java | 33 + .../StationConnectionPropertiesTests.java | 32 + .../StorageAccountConfigurationTests.java | 37 + ...StorageAccountPatchConfigurationTests.java | 38 + .../SupportedConnectorPropertiesTests.java | 17 +- .../SupportedVersionPropertiesTests.java | 25 +- ...outeDistinguisherPatchPropertiesTests.java | 37 + ...iqueRouteDistinguisherPropertiesTests.java | 36 + .../UpdateAdministrativeStateTests.java | 13 +- .../UpdateDeviceAdministrativeStateTests.java | 22 +- .../generated/UpdateVersionTests.java | 10 +- .../UpgradeNetworkFabricPropertiesTests.java | 12 +- .../generated/UserAssignedIdentityTests.java | 23 + .../ValidateConfigurationPropertiesTests.java | 12 +- .../VlanGroupPatchPropertiesTests.java | 31 + .../generated/VlanGroupPropertiesTests.java | 14 +- .../VlanMatchConditionPatchTests.java | 34 + .../generated/VlanMatchConditionTests.java | 23 +- ...hablePropertiesOptionAPropertiesTests.java | 52 - ...ConfigurationPatchablePropertiesTests.java | 118 +- ...ationPropertiesOptionAPropertiesTests.java | 52 - .../VpnConfigurationPropertiesTests.java | 109 +- .../VpnOptionAPatchPropertiesTests.java | 51 + .../generated/VpnOptionAPropertiesTests.java | 51 + .../VpnOptionBPatchPropertiesTests.java | 45 + .../generated/VpnOptionBPropertiesTests.java | 46 + .../tsp-location.yaml | 4 + 1228 files changed, 71716 insertions(+), 64391 deletions(-) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{ManagedNetworkFabricManager.java => FilesharesManager.java} (89%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/{AzureNetworkFabricManagementServiceApi.java => FilesharesManagementClient.java} (93%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceRWCommandsInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkBfdAdministrativeStateResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBfdAdministrativeStateResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBgpAdministrativeStateResponseInner.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfacePatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorInner.java delete 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/NniBfdAdministrativeStateResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceRWCommandsImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkBfdAdministrativeStateResponseImpl.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/{AzureNetworkFabricManagementServiceApiBuilder.java => FilesharesManagementClientBuilder.java} (62%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/{AzureNetworkFabricManagementServiceApiImpl.java => FilesharesManagementClientImpl.java} (90%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBfdAdministrativeStateResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBgpAdministrativeStateResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniBfdAdministrativeStateResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationResponseImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworkListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworkListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRuleListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunityListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{ => implementation}/models/IpExtendedCommunityListResult.java (65%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkuListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllerListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkuListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfaceListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokerListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRackListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRuleListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{ => implementation}/models/OperationListResult.java (78%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePolicyListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListActionPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchProperties.java delete 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/AccessControlListPortConditionPatch.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/AccessControlListProperties.java (68%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java delete 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/CommonPostActionResponseForDeviceROCommands.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceRWCommands.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicyPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponse.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java delete 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/ExternalNetworkBfdAdministrativeStateRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/ExternalNetworkPatchProperties.java (66%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/ExternalNetworkProperties.java (70%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.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/IcmpConfigurationPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/InternalNetworkPatchProperties.java (71%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/InternalNetworkProperties.java (75%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java delete 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/InternalNetworkRouteType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent/models/InternetGatewayPatchableProperties.java => models/InternetGatewayPatchProperties.java} (56%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/InternetGatewayProperties.java (69%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/InternetGatewayRuleProperties.java (71%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/IpCommunityPatchableProperties.java (83%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/IpCommunityProperties.java (68%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/IpExtendedCommunityPatchProperties.java (66%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/IpExtendedCommunityProperties.java (70%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/IpPrefixPatchProperties.java (76%) delete 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/{fluent => }/models/IpPrefixProperties.java (67%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatchProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/L2IsolationDomainProperties.java (61%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/L3IsolationDomainPatchProperties.java (63%) delete 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/{fluent => }/models/L3IsolationDomainProperties.java (66%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{ManagementNetworkConfigurationPatchableProperties.java => ManagementNetworkPatchConfiguration.java} (62%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NeighborGroupPatchProperties.java (70%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NeighborGroupProperties.java (73%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkDevicePatchParametersProperties.java (71%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkDeviceProperties.java (75%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkDeviceSkuProperties.java (65%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent/models/NetworkFabricControllerPatchableProperties.java => models/NetworkFabricControllerPatchProperties.java} (69%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkFabricControllerProperties.java (85%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkFabricProperties.java (60%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkFabricSkuProperties.java (78%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatchProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkInterfaceProperties.java (61%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkPacketBrokerProperties.java (89%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{TagsUpdate.java => NetworkRackPatch.java} (63%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkRackProperties.java (75%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkTapProperties.java (75%) delete 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/NetworkTapRuleActionPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkTapRulePatchProperties.java (67%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkTapRuleProperties.java (78%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent/models/NetworkToNetworkInterconnectPatchableProperties.java => models/NetworkToNetworkInterconnectPatchProperties.java} (52%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/NetworkToNetworkInterconnectProperties.java (73%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateRequest.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/RoutePolicyPatchableProperties.java (80%) rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/{fluent => }/models/RoutePolicyProperties.java (82%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPropertiesOptionAProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{OptionBProperties.java => VpnOptionBProperties.java} (71%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_apiview_properties.json create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdAdministrativeStateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdAdministrativeStateSamples.java delete 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/NetworkDevicesRunRoCommandSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitBatchStatusSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDiscardCommitBatchSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsDeleteSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java delete 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/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBfdAdministrativeStateRequestTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBfdAdministrativeStateRequestTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBgpAdministrativeStateRequestTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkListResultTests.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/InternalNetworkPropertiesBgpConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.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 create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityListResultTests.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/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/IpExtendedCommunityPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.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/L3OptionAPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPatchablePropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuListResultTests.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/NetworkDevicesListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricLockRequestTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackListResultTests.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/{TagsUpdateTests.java => NetworkRackPatchTests.java} (57%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBfdAdministrativeStateRequestTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyListResultTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md index ce73ef06293f..4a4cdf76fff6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md @@ -1,14 +1,2417 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2025-11-13) -### Features Added +- Azure Resource Manager fileshares client library for Java. This package contains Microsoft Azure SDK for fileshares Management SDK. Self service experience for Azure Network Fabric API. Package api-version 2024-06-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.NetworkPacketBrokersListResult` was removed + +#### `models.InternalNetworkPatchableProperties` was removed + +#### `models.IpCommunityAddOperationProperties` was removed + +#### `models.NetworkDevicesListResult` was removed + +#### `models.OptionAProperties` was removed + +#### `models.L3OptionAProperties` was removed + +#### `models.VpnConfigurationPatchablePropertiesOptionAProperties` was removed + +#### `models.ExternalNetworksList` was removed + +#### `models.IpCommunityDeleteOperationProperties` was removed + +#### `models.OperationListResult` was removed + +#### `models.ExtensionEnumProperty` was removed + +#### `models.NetworkTapPropertiesDestinationsItem` was removed + +#### `models.IpExtendedCommunitySetOperationProperties` was removed + +#### `models.IpAddressType` was removed + +#### `ManagedNetworkFabricManager` was removed + +#### `models.NeighborGroupsListResult` was removed + +#### `models.NetworkTapRulePatchableProperties` was removed + +#### `models.NetworkDeviceSkusListResult` was removed + +#### `models.NetworkTapRulesListResult` was removed + +#### `models.L3IsolationDomainPatchableProperties` was removed + +#### `models.AnnotationResource` was removed + +#### `models.L3IsolationDomainsListResult` was removed + +#### `models.InternalNetworkPropertiesBgpConfiguration` was removed + +#### `models.OptionBProperties` was removed + +#### `models.IpPrefixesListResult` was removed + +#### `models.TerminalServerPatchableProperties` was removed + +#### `models.NetworkFabricPatchableProperties` was removed + +#### `models.InternalNetworkPropertiesStaticRouteConfiguration` was removed + +#### `models.IpExtendedCommunityListResult` was removed + +#### `models.NetworkTapPatchableParametersDestinationsItem` was removed + +#### `models.ExternalNetworkPatchableProperties` was removed + +#### `models.IpCommunitiesListResult` was removed + +#### `models.IpExtendedCommunityPatchableProperties` was removed + +#### `ManagedNetworkFabricManager$Configurable` was removed + +#### `models.EnableDisableOnResources` was removed + +#### `models.AccessControlListPatchableProperties` was removed + +#### `models.NetworkRacksListResult` was removed + +#### `models.NetworkFabricsListResult` was removed + +#### `models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` was removed + +#### `models.NeighborGroupPatchableProperties` was removed + +#### `models.TagsUpdate` was removed + +#### `models.VpnConfigurationPropertiesOptionAProperties` was removed + +#### `models.NetworkFabricPatchablePropertiesTerminalServerConfiguration` was removed + +#### `models.InternetGatewayRulesListResult` was removed + +#### `models.ManagementNetworkConfigurationPatchableProperties` was removed + +#### `models.NetworkFabricSkusListResult` was removed + +#### `models.NetworkToNetworkInterconnectsList` was removed + +#### `models.CommonMatchConditions` was removed + +#### `models.RoutePoliciesListResult` was removed + +#### `models.L2IsolationDomainsListResult` was removed + +#### `models.IpPrefixPatchableProperties` was removed + +#### `models.InternetGatewaysListResult` was removed + +#### `models.IpCommunitySetOperationProperties` was removed + +#### `models.NetworkInterfacesList` was removed + +#### `models.AccessControlListsListResult` was removed + +#### `models.IpExtendedCommunityDeleteOperationProperties` was removed + +#### `models.Layer3IpPrefixProperties` was removed + +#### `models.InternalNetworksList` was removed + +#### `models.NetworkFabricControllersListResult` was removed + +#### `models.NetworkDevicePatchableProperties` was removed + +#### `models.NetworkTapsListResult` was removed + +#### `models.IpExtendedCommunityAddOperationProperties` was removed + +#### `models.NetworkRack$DefinitionStages` was modified + +* `withNetworkFabricId(java.lang.String)` was removed in stage 3 + +#### `models.NetworkDevice$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.InternalNetwork$DefinitionStages` was modified + +* `withVlanId(int)` was removed in stage 2 + +#### `models.IpCommunity$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.IpExtendedCommunity$DefinitionStages` was modified + +* `withIpExtendedCommunityRules(java.util.List)` was removed in stage 3 + +#### `models.NetworkFabricController$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.NetworkFabric$DefinitionStages` was modified + +* `withNetworkFabricSku(java.lang.String)` was removed in stage 3 + +#### `models.NetworkTapRule$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.InternetGatewayRule$DefinitionStages` was modified + +* `withRuleProperties(models.RuleProperties)` was removed in stage 3 + +#### `models.NetworkToNetworkInterconnect$DefinitionStages` was modified + +* `withUseOptionB(models.BooleanEnumProperty)` was removed in stage 2 + +#### `models.NeighborGroup$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.RoutePolicy$DefinitionStages` was modified + +* `withNetworkFabricId(java.lang.String)` was removed in stage 3 + +#### `models.NetworkInterface$DefinitionStages` was modified + +* Required stage 2 was added + +#### `models.L3IsolationDomain$DefinitionStages` was modified + +* `withNetworkFabricId(java.lang.String)` was removed in stage 3 + +#### `models.ExternalNetwork$DefinitionStages` was modified + +* `withPeeringOption(models.PeeringOption)` was removed in stage 2 + +#### `models.IpPrefix$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.L2IsolationDomain$DefinitionStages` was modified + +* `withNetworkFabricId(java.lang.String)` was removed in stage 3 + +#### `models.NetworkPacketBroker$DefinitionStages` was modified + +* `withNetworkFabricId(java.lang.String)` was removed in stage 3 + +#### `models.NetworkTap$DefinitionStages` was modified + +* `withNetworkPacketBrokerId(java.lang.String)` was removed in stage 3 + +#### `models.AccessControlList$DefinitionStages` was modified + +* Required stage 3 was added + +#### `models.InternetGateway$DefinitionStages` was modified + +* `withTypePropertiesType(models.GatewayType)` was removed in stage 3 + +#### `models.InternalNetwork$Definition` was modified + +* `withBgpConfiguration(models.InternalNetworkPropertiesBgpConfiguration)` was removed +* `withEgressAclId(java.lang.String)` was removed +* `withConnectedIPv4Subnets(java.util.List)` was removed +* `withExtension(models.Extension)` was removed +* `withIsMonitoringEnabled(models.IsMonitoringEnabled)` was removed +* `withVlanId(int)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withIngressAclId(java.lang.String)` was removed +* `withMtu(java.lang.Integer)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withStaticRouteConfiguration(models.InternalNetworkPropertiesStaticRouteConfiguration)` was removed +* `withConnectedIPv6Subnets(java.util.List)` was removed + +#### `models.ImportRoutePolicyInformation` was modified + +* `validate()` was removed + +#### `models.IpPrefix$Update` was modified + +* `withIpPrefixRules(java.util.List)` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.L3IsolationDomainPatch` was modified + +* `aggregateRouteConfiguration()` was removed +* `connectedSubnetRoutePolicy()` was removed +* `withTags(java.util.Map)` was removed +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicy)` was removed +* `withRedistributeConnectedSubnets(models.RedistributeConnectedSubnets)` was removed +* `annotation()` was removed +* `redistributeStaticRoutes()` was removed +* `withRedistributeStaticRoutes(models.RedistributeStaticRoutes)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withAggregateRouteConfiguration(models.AggregateRouteConfiguration)` was removed +* `redistributeConnectedSubnets()` was removed +* `validate()` was removed + +#### `models.ExportRoutePolicyInformation` was modified + +* `validate()` was removed + +#### `models.NetworkTapRuleAction` was modified + +* `validate()` was removed + +#### `models.IpGroupProperties` was modified -### Other Changes +* `models.IpAddressType ipAddressType()` -> `models.IPAddressType ipAddressType()` +* `validate()` was removed +* `withIpAddressType(models.IpAddressType)` was removed + +#### `models.NetworkInterfacePatch` was modified + +* `annotation()` was removed +* `validate()` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.NetworkPacketBroker$Definition` was modified + +* `withNetworkFabricId(java.lang.String)` was removed + +#### `models.DestinationProperties` was modified + +* `validate()` was removed + +#### `models.TerminalServerConfiguration` was modified + +* `withUsername(java.lang.String)` was removed +* `validate()` was removed +* `withPassword(java.lang.String)` was removed +* `withSerialNumber(java.lang.String)` was removed + +#### `models.NetworkTapRuleMatchCondition` was modified + +* `withIpCondition(models.IpMatchCondition)` was removed +* `withProtocolTypes(java.util.List)` was removed +* `validate()` was removed +* `withVlanMatchCondition(models.VlanMatchCondition)` was removed + +#### `models.RebootProperties` was modified + +* `validate()` was removed + +#### `models.NetworkDevice$Update` was modified + +* `withHostname(java.lang.String)` was removed +* `withSerialNumber(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.VpnConfigurationPatchableProperties` was modified + +* `models.OptionBProperties optionBProperties()` -> `models.VpnOptionBPatchProperties optionBProperties()` +* `validate()` was removed +* `models.VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties()` -> `models.VpnOptionAPatchProperties optionAProperties()` +* `withOptionBProperties(models.OptionBProperties)` was removed +* `withOptionAProperties(models.VpnConfigurationPatchablePropertiesOptionAProperties)` was removed + +#### `models.ExternalNetworkPatch` was modified + +* `withOptionAProperties(models.ExternalNetworkPatchPropertiesOptionAProperties)` was removed +* `withNetworkToNetworkInterconnectId(java.lang.String)` was removed +* `withPeeringOption(models.PeeringOption)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed +* `exportRoutePolicyId()` was removed +* `importRoutePolicyId()` was removed +* `optionAProperties()` was removed +* `withOptionBProperties(models.L3OptionBProperties)` was removed +* `importRoutePolicy()` was removed +* `peeringOption()` was removed +* `exportRoutePolicy()` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `optionBProperties()` was removed +* `annotation()` was removed +* `validate()` was removed +* `withAnnotation(java.lang.String)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `networkToNetworkInterconnectId()` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed + +#### `models.SupportedVersionProperties` was modified + +* `SupportedVersionProperties()` was changed to private access +* `withIsDefault(models.BooleanEnumProperty)` was removed +* `withVendorOsVersion(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed +* `withVendorFirmwareVersion(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ActionIpCommunityProperties` was modified + +* `validate()` was removed +* `withAdd(models.IpCommunityIdList)` was removed + +#### `models.IpExtendedCommunity` was modified + +* `ipExtendedCommunityRules()` was removed +* `annotation()` was removed +* `administrativeState()` was removed +* `configurationState()` was removed +* `provisioningState()` was removed + +#### `models.IpPrefixPatch` was modified + +* `annotation()` was removed +* `validate()` was removed +* `withAnnotation(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed +* `ipPrefixRules()` was removed +* `withIpPrefixRules(java.util.List)` was removed + +#### `models.NetworkInterface` was modified + +* `administrativeState()` was removed +* `interfaceType()` was removed +* `provisioningState()` was removed +* `physicalIdentifier()` was removed +* `ipv6Address()` was removed +* `connectedTo()` was removed +* `annotation()` was removed +* `ipv4Address()` was removed + +#### `models.NetworkInterface$Update` was modified + +* `withAnnotation(java.lang.String)` was removed + +#### `models.InternetGatewayRulePatch` was modified + +* `withTags(java.util.Map)` was removed +* `validate()` was removed + +#### `models.ExternalNetworks` was modified + +* `updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` was removed + +#### `models.ExternalNetwork$Update` was modified + +* `withOptionBProperties(models.L3OptionBProperties)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withNetworkToNetworkInterconnectId(java.lang.String)` was removed +* `withOptionAProperties(models.ExternalNetworkPatchPropertiesOptionAProperties)` was removed +* `withPeeringOption(models.PeeringOption)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed + +#### `models.PortGroupProperties` was modified + +* `validate()` was removed + +#### `models.L3IsolationDomain` was modified + +* `annotation()` was removed +* `networkFabricId()` was removed +* `redistributeStaticRoutes()` was removed +* `redistributeConnectedSubnets()` was removed +* `provisioningState()` was removed +* `connectedSubnetRoutePolicy()` was removed +* `aggregateRouteConfiguration()` was removed +* `configurationState()` was removed +* `administrativeState()` was removed + +#### `models.NetworkFabricController$Update` was modified + +* `withInfrastructureExpressRouteConnections(java.util.List)` was removed +* `withWorkloadExpressRouteConnections(java.util.List)` was removed + +#### `models.VlanMatchCondition` was modified + +* `validate()` was removed + +#### `models.NeighborGroup$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withDestination(models.NeighborGroupDestination)` was removed + +#### `models.NeighborAddress` was modified + +* `validate()` was removed + +#### `models.AccessControlList$Update` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withDefaultAction(models.CommunityActionTypes)` was removed +* `withMatchConfigurations(java.util.List)` was removed +* `withConfigurationType(models.ConfigurationType)` was removed +* `withDynamicMatchConfigurations(java.util.List)` was removed +* `withAclsUrl(java.lang.String)` was removed + +#### `models.NetworkDeviceSku` was modified + +* `supportedVersions()` was removed +* `model()` was removed +* `manufacturer()` was removed +* `provisioningState()` was removed +* `interfaces()` was removed +* `supportedRoleTypes()` was removed + +#### `models.InternalNetworks` was modified + +* `updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `updateStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` was removed +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` was removed +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed + +#### `models.ExternalNetworkPropertiesOptionAProperties` was modified + +* `peerAsn()` was removed +* `withPeerAsn(java.lang.Long)` was removed +* `withVlanId(java.lang.Integer)` was removed +* `java.lang.Integer vlanId()` -> `int vlanId()` +* `withPrimaryIpv6Prefix(java.lang.String)` was removed +* `withSecondaryIpv4Prefix(java.lang.String)` was removed +* `withPrimaryIpv4Prefix(java.lang.String)` was removed +* `fabricAsn()` was removed +* `withSecondaryIpv6Prefix(java.lang.String)` was removed +* `validate()` was removed + +#### `models.AccessControlListMatchCondition` was modified + +* `withIpCondition(models.IpMatchCondition)` was removed +* `withProtocolTypes(java.util.List)` was removed +* `validate()` was removed +* `withVlanMatchCondition(models.VlanMatchCondition)` was removed + +#### `models.ManagedResourceGroupConfiguration` was modified + +* `validate()` was removed + +#### `models.InternalNetwork$Update` was modified + +* `withStaticRouteConfiguration(models.StaticRouteConfiguration)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withIsMonitoringEnabled(models.IsMonitoringEnabled)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withBgpConfiguration(models.BgpConfiguration)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withConnectedIPv4Subnets(java.util.List)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withIngressAclId(java.lang.String)` was removed +* `withConnectedIPv6Subnets(java.util.List)` was removed +* `withEgressAclId(java.lang.String)` was removed +* `withMtu(java.lang.Integer)` was removed + +#### `models.NetworkTapRule$Definition` was modified + +* `withMatchConfigurations(java.util.List)` was removed +* `withConfigurationType(models.ConfigurationType)` was removed +* `withPollingIntervalInSeconds(models.PollingIntervalInSeconds)` was removed +* `withTapRulesUrl(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withDynamicMatchConfigurations(java.util.List)` was removed + +#### `models.L3OptionBProperties` was modified + +* `validate()` was removed + +#### `models.InternetGatewayRule$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withRuleProperties(models.RuleProperties)` was removed + +#### `models.NetworkTapRule$Update` was modified + +* `withMatchConfigurations(java.util.List)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withTapRulesUrl(java.lang.String)` was removed +* `withDynamicMatchConfigurations(java.util.List)` was removed +* `withConfigurationType(models.ConfigurationType)` was removed + +#### `models.UpgradeNetworkFabricProperties` was modified + +* `withVersion(java.lang.String)` was removed +* `validate()` was removed + +#### `models.L2IsolationDomain$Definition` was modified + +* `withMtu(java.lang.Integer)` was removed +* `withNetworkFabricId(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withVlanId(int)` was removed + +#### `models.L3ExportRoutePolicy` was modified + +* `validate()` was removed + +#### `models.IpCommunity$Update` was modified + +* `withIpCommunityRules(java.util.List)` was removed + +#### `models.InternetGateway$Definition` was modified + +* `withNetworkFabricControllerId(java.lang.String)` was removed +* `withInternetGatewayRuleId(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withTypePropertiesType(models.GatewayType)` was removed + +#### `models.RuleProperties` was modified + +* `validate()` was removed + +#### `models.InternalNetworkPatch` was modified + +* `exportRoutePolicy()` was removed +* `withConnectedIPv4Subnets(java.util.List)` was removed +* `mtu()` was removed +* `connectedIPv6Subnets()` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withMtu(java.lang.Integer)` was removed +* `withStaticRouteConfiguration(models.StaticRouteConfiguration)` was removed +* `bgpConfiguration()` was removed +* `connectedIPv4Subnets()` was removed +* `staticRouteConfiguration()` was removed +* `exportRoutePolicyId()` was removed +* `importRoutePolicy()` was removed +* `withBgpConfiguration(models.BgpConfiguration)` was removed +* `withIsMonitoringEnabled(models.IsMonitoringEnabled)` was removed +* `importRoutePolicyId()` was removed +* `withIngressAclId(java.lang.String)` was removed +* `withEgressAclId(java.lang.String)` was removed +* `isMonitoringEnabled()` was removed +* `annotation()` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withAnnotation(java.lang.String)` was removed +* `egressAclId()` was removed +* `validate()` was removed +* `ingressAclId()` was removed +* `withConnectedIPv6Subnets(java.util.List)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed + +#### `models.RoutePolicyPatch` was modified + +* `defaultAction()` was removed +* `withStatements(java.util.List)` was removed +* `withDefaultAction(models.CommunityActionTypes)` was removed +* `statements()` was removed +* `validate()` was removed +* `withTags(java.util.Map)` was removed + +#### `models.AccessControlListPatch` was modified + +* `validate()` was removed +* `aclsUrl()` was removed +* `withAclsUrl(java.lang.String)` was removed +* `defaultAction()` was removed +* `withAnnotation(java.lang.String)` was removed +* `withDynamicMatchConfigurations(java.util.List)` was removed +* `dynamicMatchConfigurations()` was removed +* `withConfigurationType(models.ConfigurationType)` was removed +* `withTags(java.util.Map)` was removed +* `annotation()` was removed +* `configurationType()` was removed +* `withMatchConfigurations(java.util.List)` was removed +* `withDefaultAction(models.CommunityActionTypes)` was removed +* `matchConfigurations()` was removed + +#### `models.IpPrefix` was modified + +* `ipPrefixRules()` was removed +* `provisioningState()` was removed +* `annotation()` was removed +* `administrativeState()` was removed +* `configurationState()` was removed + +#### `models.InternetGateway` was modified + +* `internetGatewayRuleId()` was removed +* `annotation()` was removed +* `provisioningState()` was removed +* `port()` was removed +* `networkFabricControllerId()` was removed +* `typePropertiesType()` was removed +* `ipv4Address()` was removed + +#### `models.NetworkFabricController$Definition` was modified + +* `withInfrastructureExpressRouteConnections(java.util.List)` was removed +* `withIpv6AddressSpace(java.lang.String)` was removed +* `withNfcSku(models.NfcSku)` was removed +* `withManagedResourceGroupConfiguration(models.ManagedResourceGroupConfiguration)` was removed +* `withIsWorkloadManagementNetworkEnabled(models.IsWorkloadManagementNetworkEnabled)` was removed +* `withIpv4AddressSpace(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withWorkloadExpressRouteConnections(java.util.List)` was removed + +#### `models.AccessControlListMatchConfiguration` was modified + +* `models.IpAddressType ipAddressType()` -> `models.IPAddressType ipAddressType()` +* `validate()` was removed +* `withIpAddressType(models.IpAddressType)` was removed + +#### `models.InternalNetwork` was modified + +* `connectedIPv4Subnets()` was removed +* `isMonitoringEnabled()` was removed +* `bgpConfiguration()` was removed +* `connectedIPv6Subnets()` was removed +* `egressAclId()` was removed +* `provisioningState()` was removed +* `configurationState()` was removed +* `ingressAclId()` was removed +* `extension()` was removed +* `updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` was removed +* `exportRoutePolicy()` was removed +* `staticRouteConfiguration()` was removed +* `mtu()` was removed +* `updateBgpAdministrativeState(models.UpdateAdministrativeState)` was removed +* `updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `updateBgpAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `exportRoutePolicyId()` was removed +* `importRoutePolicy()` was removed +* `annotation()` was removed +* `importRoutePolicyId()` was removed +* `vlanId()` was removed +* `administrativeState()` was removed + +#### `models.IpCommunityIdList` was modified + +* `validate()` was removed + +#### `models.IpExtendedCommunity$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withIpExtendedCommunityRules(java.util.List)` was removed + +#### `models.NetworkRack` was modified + +* `provisioningState()` was removed +* `networkFabricId()` was removed +* `annotation()` was removed +* `networkRackType()` was removed +* `networkDevices()` was removed + +#### `models.CommonDynamicMatchConfiguration` was modified + +* `validate()` was removed + +#### `models.NetworkDevice$Definition` was modified + +* `withSerialNumber(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withHostname(java.lang.String)` was removed +* `withNetworkDeviceSku(java.lang.String)` was removed + +#### `models.NeighborGroupDestination` was modified + +* `validate()` was removed + +#### `models.InternetGateway$Update` was modified + +* `withInternetGatewayRuleId(java.lang.String)` was removed + +#### `models.ValidateConfigurationProperties` was modified + +* `validate()` was removed + +#### `models.NetworkFabric$Definition` was modified + +* `withFabricVersion(java.lang.String)` was removed +* `withTerminalServerConfiguration(models.TerminalServerConfiguration)` was removed +* `withServerCountPerRack(int)` was removed +* `withIpv6Prefix(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withManagementNetworkConfiguration(models.ManagementNetworkConfigurationProperties)` was removed +* `withIpv4Prefix(java.lang.String)` was removed +* `withNetworkFabricControllerId(java.lang.String)` was removed +* `withRackCount(java.lang.Integer)` was removed +* `withFabricAsn(long)` was removed +* `withNetworkFabricSku(java.lang.String)` was removed + +#### `models.NetworkDevice` was modified + +* `version()` was removed +* `annotation()` was removed +* `serialNumber()` was removed +* `administrativeState()` was removed +* `hostname()` was removed +* `networkRackId()` was removed +* `managementIpv6Address()` was removed +* `networkDeviceRole()` was removed +* `provisioningState()` was removed +* `managementIpv4Address()` was removed +* `configurationState()` was removed +* `networkDeviceSku()` was removed + +#### `models.NetworkFabricController` was modified + +* `annotation()` was removed +* `infrastructureExpressRouteConnections()` was removed +* `provisioningState()` was removed +* `infrastructureServices()` was removed +* `workloadExpressRouteConnections()` was removed +* `workloadServices()` was removed +* `ipv6AddressSpace()` was removed +* `managedResourceGroupConfiguration()` was removed +* `nfcSku()` was removed +* `tenantInternetGatewayIds()` was removed +* `isWorkloadManagementNetworkEnabled()` was removed +* `networkFabricIds()` was removed +* `workloadManagementNetwork()` was removed +* `ipv4AddressSpace()` was removed + +#### `models.ActionIpExtendedCommunityProperties` was modified + +* `validate()` was removed +* `withAdd(models.IpExtendedCommunityIdList)` was removed + +#### `models.NetworkPacketBrokerPatch` was modified + +* `withTags(java.util.Map)` was removed +* `validate()` was removed + +#### `models.IpCommunityPatch` was modified + +* `withIpCommunityRules(java.util.List)` was removed +* `ipCommunityRules()` was removed +* `validate()` was removed +* `withTags(java.util.Map)` was removed + +#### `models.NetworkInterface$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed + +#### `models.IpExtendedCommunity$Update` was modified + +* `withIpExtendedCommunityRules(java.util.List)` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.UpdateAdministrativeState` was modified + +* `validate()` was removed +* `withResourceIds(java.util.List)` was removed + +#### `models.VpnConfigurationProperties` was modified + +* `models.VpnConfigurationPropertiesOptionAProperties optionAProperties()` -> `models.VpnOptionAProperties optionAProperties()` +* `withOptionBProperties(models.OptionBProperties)` was removed +* `withOptionAProperties(models.VpnConfigurationPropertiesOptionAProperties)` was removed +* `validate()` was removed +* `models.OptionBProperties optionBProperties()` -> `models.VpnOptionBProperties optionBProperties()` + +#### `models.RoutePolicy$Definition` was modified + +* `withNetworkFabricId(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withDefaultAction(models.CommunityActionTypes)` was removed +* `withAddressFamilyType(models.AddressFamilyType)` was removed +* `withStatements(java.util.List)` was removed + +#### `models.IpPrefix$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withIpPrefixRules(java.util.List)` was removed + +#### `models.UpdateDeviceAdministrativeState` was modified + +* `validate()` was removed +* `withResourceIds(java.util.List)` was removed + +#### `models.AccessControlList` was modified + +* `provisioningState()` was removed +* `dynamicMatchConfigurations()` was removed +* `lastSyncedTime()` was removed +* `matchConfigurations()` was removed +* `aclsUrl()` was removed +* `annotation()` was removed +* `configurationState()` was removed +* `administrativeState()` was removed +* `configurationType()` was removed +* `defaultAction()` was removed + +#### `models.DeviceInterfaceProperties` was modified + +* `DeviceInterfaceProperties()` was changed to private access +* `withInterfaceType(java.lang.String)` was removed +* `withSupportedConnectorTypes(java.util.List)` was removed +* `validate()` was removed +* `withIdentifier(java.lang.String)` was removed + +#### `models.ConnectedSubnet` was modified + +* `withAnnotation(java.lang.String)` was removed +* `validate()` was removed + +#### `models.NetworkFabricControllerPatch` was modified + +* `withTags(java.util.Map)` was removed +* `infrastructureExpressRouteConnections()` was removed +* `withInfrastructureExpressRouteConnections(java.util.List)` was removed +* `validate()` was removed +* `workloadExpressRouteConnections()` was removed +* `withWorkloadExpressRouteConnections(java.util.List)` was removed + +#### `models.StaticRouteConfiguration` was modified + +* `validate()` was removed + +#### `models.RoutePolicyStatementProperties` was modified + +* `withAnnotation(java.lang.String)` was removed +* `validate()` was removed + +#### `models.NetworkTap$Update` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withDestinationsForUpdate(java.util.List)` was removed +* `withPollingType(models.PollingType)` was removed + +#### `models.NetworkToNetworkInterconnect` was modified + +* `importRoutePolicy()` was removed +* `layer2Configuration()` was removed +* `administrativeState()` was removed +* `useOptionB()` was removed +* `nniType()` was removed +* `egressAclId()` was removed +* `updateNpbStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `isManagementType()` was removed +* `provisioningState()` was removed +* `exportRoutePolicy()` was removed +* `ingressAclId()` was removed +* `updateNpbStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` was removed +* `npbStaticRouteConfiguration()` was removed +* `optionBLayer3Configuration()` was removed +* `configurationState()` was removed + +#### `models.NetworkTapRule` was modified + +* `provisioningState()` was removed +* `configurationType()` was removed +* `dynamicMatchConfigurations()` was removed +* `matchConfigurations()` was removed +* `lastSyncedTime()` was removed +* `configurationState()` was removed +* `tapRulesUrl()` was removed +* `networkTapId()` was removed +* `administrativeState()` was removed +* `annotation()` was removed +* `pollingIntervalInSeconds()` was removed + +#### `models.NetworkToNetworkInterconnectPatch` was modified + +* `layer2Configuration()` was removed +* `withImportRoutePolicy(models.ImportRoutePolicyInformation)` was removed +* `exportRoutePolicy()` was removed +* `optionBLayer3Configuration()` was removed +* `withEgressAclId(java.lang.String)` was removed +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfiguration)` was removed +* `ingressAclId()` was removed +* `name()` was removed +* `withIngressAclId(java.lang.String)` was removed +* `withLayer2Configuration(models.Layer2Configuration)` was removed +* `egressAclId()` was removed +* `withOptionBLayer3Configuration(models.OptionBLayer3Configuration)` was removed +* `npbStaticRouteConfiguration()` was removed +* `validate()` was removed +* `importRoutePolicy()` was removed +* `withExportRoutePolicy(models.ExportRoutePolicyInformation)` was removed + +#### `models.NetworkFabricSku` was modified + +* `details()` was removed +* `typePropertiesType()` was removed +* `provisioningState()` was removed +* `maxComputeRacks()` was removed +* `maximumServerCount()` was removed +* `supportedVersions()` was removed + +#### `models.IpCommunity$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withIpCommunityRules(java.util.List)` was removed + +#### `models.NpbStaticRouteConfiguration` was modified + +* `validate()` was removed + +#### `models.L3IsolationDomain$Update` was modified + +* `withRedistributeStaticRoutes(models.RedistributeStaticRoutes)` was removed +* `withRedistributeConnectedSubnets(models.RedistributeConnectedSubnets)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withAggregateRouteConfiguration(models.AggregateRouteConfiguration)` was removed +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicy)` was removed + +#### `models.ConnectedSubnetRoutePolicy` was modified + +* `exportRoutePolicyId()` was removed +* `validate()` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed + +#### `models.NetworkRack$Definition` was modified + +* `withNetworkRackType(models.NetworkRackType)` was removed +* `withNetworkFabricId(java.lang.String)` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.IpCommunity` was modified + +* `ipCommunityRules()` was removed +* `provisioningState()` was removed +* `configurationState()` was removed +* `administrativeState()` was removed +* `annotation()` was removed + +#### `models.StaticRouteProperties` was modified + +* `validate()` was removed + +#### `models.IpExtendedCommunityPatch` was modified + +* `withAnnotation(java.lang.String)` was removed +* `annotation()` was removed +* `withIpExtendedCommunityRules(java.util.List)` was removed +* `withTags(java.util.Map)` was removed +* `ipExtendedCommunityRules()` was removed +* `validate()` was removed + +#### `models.RoutePolicy` was modified + +* `configurationState()` was removed +* `defaultAction()` was removed +* `annotation()` was removed +* `addressFamilyType()` was removed +* `administrativeState()` was removed +* `networkFabricId()` was removed +* `provisioningState()` was removed +* `statements()` was removed + +#### `models.NetworkToNetworkInterconnect$Definition` was modified + +* `withLayer2Configuration(models.Layer2Configuration)` was removed +* `withIngressAclId(java.lang.String)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicyInformation)` was removed +* `withIsManagementType(models.IsManagementType)` was removed +* `withOptionBLayer3Configuration(models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicyInformation)` was removed +* `withEgressAclId(java.lang.String)` was removed +* `withUseOptionB(models.BooleanEnumProperty)` was removed +* `withNniType(models.NniType)` was removed +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfiguration)` was removed + +#### `models.VlanGroupProperties` was modified + +* `validate()` was removed + +#### `models.NetworkTap$Definition` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withPollingType(models.PollingType)` was removed +* `withNetworkPacketBrokerId(java.lang.String)` was removed +* `withDestinations(java.util.List)` was removed + +#### `models.BgpConfiguration` was modified + +* `peerAsn()` was removed +* `withPeerAsn(java.lang.Long)` was removed +* `validate()` was removed +* `fabricAsn()` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.NetworkFabricPatch` was modified + +* `ipv4Prefix()` was removed +* `ipv6Prefix()` was removed +* `withManagementNetworkConfiguration(models.ManagementNetworkConfigurationPatchableProperties)` was removed +* `annotation()` was removed +* `withTags(java.util.Map)` was removed +* `withIpv6Prefix(java.lang.String)` was removed +* `withRackCount(java.lang.Integer)` was removed +* `managementNetworkConfiguration()` was removed +* `withAnnotation(java.lang.String)` was removed +* `withTerminalServerConfiguration(models.NetworkFabricPatchablePropertiesTerminalServerConfiguration)` was removed +* `serverCountPerRack()` was removed +* `validate()` was removed +* `withServerCountPerRack(java.lang.Integer)` was removed +* `rackCount()` was removed +* `withIpv4Prefix(java.lang.String)` was removed +* `fabricAsn()` was removed +* `withFabricAsn(java.lang.Long)` was removed +* `terminalServerConfiguration()` was removed + +#### `models.AccessControlListPortCondition` was modified + +* `withPortGroupNames(java.util.List)` was removed +* `withPorts(java.util.List)` was removed +* `validate()` was removed +* `withPortType(models.PortType)` was removed +* `withLayer4Protocol(models.Layer4Protocol)` was removed + +#### `models.IpPrefixRule` was modified + +* `validate()` was removed + +#### `models.NeighborGroup$Update` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withDestination(models.NeighborGroupDestination)` was removed + +#### `models.AccessControlList$Definition` was modified + +* `withDynamicMatchConfigurations(java.util.List)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withConfigurationType(models.ConfigurationType)` was removed +* `withAclsUrl(java.lang.String)` was removed +* `withMatchConfigurations(java.util.List)` was removed +* `withDefaultAction(models.CommunityActionTypes)` was removed + +#### `models.AggregateRouteConfiguration` was modified + +* `validate()` was removed + +#### `models.L3IsolationDomain$Definition` was modified + +* `withRedistributeStaticRoutes(models.RedistributeStaticRoutes)` was removed +* `withConnectedSubnetRoutePolicy(models.ConnectedSubnetRoutePolicy)` was removed +* `withAggregateRouteConfiguration(models.AggregateRouteConfiguration)` was removed +* `withNetworkFabricId(java.lang.String)` was removed +* `withRedistributeConnectedSubnets(models.RedistributeConnectedSubnets)` was removed +* `withAnnotation(java.lang.String)` was removed + +#### `models.IsolationDomainProperties` was modified + +* `validate()` was removed + +#### `models.StatementActionProperties` was modified + +* `validate()` was removed + +#### `models.PortCondition` was modified + +* `validate()` was removed + +#### `models.ControllerServices` was modified + +* `ControllerServices()` was changed to private access +* `withIpv4AddressSpaces(java.util.List)` was removed +* `validate()` was removed +* `withIpv6AddressSpaces(java.util.List)` was removed + +#### `models.NetworkTapRuleMatchConfiguration` was modified + +* `validate()` was removed +* `withIpAddressType(models.IpAddressType)` was removed +* `models.IpAddressType ipAddressType()` -> `models.IPAddressType ipAddressType()` + +#### `models.L2IsolationDomain$Update` was modified + +* `withAnnotation(java.lang.String)` was removed +* `withMtu(java.lang.Integer)` was removed + +#### `models.L2IsolationDomain` was modified + +* `networkFabricId()` was removed +* `provisioningState()` was removed +* `configurationState()` was removed +* `annotation()` was removed +* `mtu()` was removed +* `vlanId()` was removed +* `administrativeState()` was removed + +#### `models.NetworkFabric` was modified + +* `l3IsolationDomains()` was removed +* `l2IsolationDomains()` was removed +* `routerIds()` was removed +* `racks()` was removed +* `serverCountPerRack()` was removed +* `ipv6Prefix()` was removed +* `managementNetworkConfiguration()` was removed +* `rackCount()` was removed +* `annotation()` was removed +* `terminalServerConfiguration()` was removed +* `networkFabricControllerId()` was removed +* `configurationState()` was removed +* `provisioningState()` was removed +* `networkFabricSku()` was removed +* `fabricAsn()` was removed +* `administrativeState()` was removed +* `ipv4Prefix()` was removed +* `fabricVersion()` was removed + +#### `models.IpCommunityRule` was modified + +* `validate()` was removed + +#### `models.ExternalNetwork` was modified + +* `exportRoutePolicy()` was removed +* `provisioningState()` was removed +* `configurationState()` was removed +* `optionAProperties()` was removed +* `importRoutePolicyId()` was removed +* `annotation()` was removed +* `optionBProperties()` was removed +* `administrativeState()` was removed +* `updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed +* `updateStaticRouteBfdAdministrativeState(models.UpdateAdministrativeState)` was removed +* `importRoutePolicy()` was removed +* `peeringOption()` was removed +* `networkToNetworkInterconnectId()` was removed +* `exportRoutePolicyId()` was removed + +#### `models.UpdateVersion` was modified + +* `validate()` was removed + +#### `models.NetworkFabric$Update` was modified + +* `withTerminalServerConfiguration(models.NetworkFabricPatchablePropertiesTerminalServerConfiguration)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withIpv6Prefix(java.lang.String)` was removed +* `withManagementNetworkConfiguration(models.ManagementNetworkConfigurationPatchableProperties)` was removed +* `withServerCountPerRack(java.lang.Integer)` was removed +* `withFabricAsn(java.lang.Long)` was removed +* `withRackCount(java.lang.Integer)` was removed +* `withIpv4Prefix(java.lang.String)` was removed + +#### `models.NetworkToNetworkInterconnect$Update` was modified + +* `withIngressAclId(java.lang.String)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicyInformation)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicyInformation)` was removed +* `withOptionBLayer3Configuration(models.OptionBLayer3Configuration)` was removed +* `withNpbStaticRouteConfiguration(models.NpbStaticRouteConfiguration)` was removed +* `withLayer2Configuration(models.Layer2Configuration)` was removed +* `withEgressAclId(java.lang.String)` was removed + +#### `models.NetworkDevicePatchParameters` was modified + +* `validate()` was removed +* `withAnnotation(java.lang.String)` was removed +* `withHostname(java.lang.String)` was removed +* `hostname()` was removed +* `annotation()` was removed +* `withTags(java.util.Map)` was removed +* `serialNumber()` was removed +* `withSerialNumber(java.lang.String)` was removed + +#### `models.ManagementNetworkConfigurationProperties` was modified + +* `validate()` was removed + +#### `models.NetworkTap` was modified + +* `networkPacketBrokerId()` was removed +* `destinations()` was removed +* `annotation()` was removed +* `provisioningState()` was removed +* `pollingType()` was removed +* `configurationState()` was removed +* `administrativeState()` was removed +* `sourceTapRuleId()` was removed + +#### `models.ExportRoutePolicy` was modified + +* `validate()` was removed + +#### `models.NetworkToNetworkInterconnects` was modified + +* `updateNpbStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState)` was removed +* `updateNpbStaticRouteBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.UpdateAdministrativeState,com.azure.core.util.Context)` was removed + +#### `models.NeighborGroup` was modified + +* `provisioningState()` was removed +* `networkTapRuleIds()` was removed +* `destination()` was removed +* `networkTapIds()` was removed +* `annotation()` was removed + +#### `models.RoutePolicy$Update` was modified + +* `withStatements(java.util.List)` was removed +* `withDefaultAction(models.CommunityActionTypes)` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.IpExtendedCommunityIdList` was modified + +* `validate()` was removed + +#### `models.ExternalNetwork$Definition` was modified + +* `withNetworkToNetworkInterconnectId(java.lang.String)` was removed +* `withExportRoutePolicyId(java.lang.String)` was removed +* `withOptionAProperties(models.ExternalNetworkPropertiesOptionAProperties)` was removed +* `withPeeringOption(models.PeeringOption)` was removed +* `withAnnotation(java.lang.String)` was removed +* `withImportRoutePolicyId(java.lang.String)` was removed +* `withImportRoutePolicy(models.ImportRoutePolicy)` was removed +* `withOptionBProperties(models.L3OptionBProperties)` was removed +* `withExportRoutePolicy(models.ExportRoutePolicy)` was removed + +#### `models.NeighborGroupPatch` was modified + +* `withDestination(models.NeighborGroupDestination)` was removed +* `validate()` was removed +* `withTags(java.util.Map)` was removed +* `annotation()` was removed +* `withAnnotation(java.lang.String)` was removed +* `destination()` was removed + +#### `models.Layer2Configuration` was modified + +* `validate()` was removed + +#### `models.L2IsolationDomainPatch` was modified + +* `withAnnotation(java.lang.String)` was removed +* `annotation()` was removed +* `mtu()` was removed +* `withTags(java.util.Map)` was removed +* `validate()` was removed +* `withMtu(java.lang.Integer)` was removed + +#### `models.RouteTargetInformation` was modified + +* `validate()` was removed + +#### `models.ExpressRouteConnectionInformation` was modified + +* `validate()` was removed + +#### `models.InternetGatewayRule` was modified + +* `internetGatewayIds()` was removed +* `provisioningState()` was removed +* `ruleProperties()` was removed +* `annotation()` was removed + +#### `models.BfdConfiguration` was modified + +* `validate()` was removed + +#### `models.ImportRoutePolicy` was modified + +* `validate()` was removed + +#### `models.NetworkPacketBroker` was modified + +* `networkDeviceIds()` was removed +* `provisioningState()` was removed +* `sourceInterfaceIds()` was removed +* `neighborGroupIds()` was removed +* `networkTapIds()` was removed +* `networkFabricId()` was removed + +#### `models.IpExtendedCommunityRule` was modified + +* `validate()` was removed + +#### `models.ExternalNetworkPatchPropertiesOptionAProperties` was modified + +* `withPrimaryIpv4Prefix(java.lang.String)` was removed +* `withSecondaryIpv4Prefix(java.lang.String)` was removed +* `withPrimaryIpv6Prefix(java.lang.String)` was removed +* `withPeerAsn(java.lang.Long)` was removed +* `peerAsn()` was removed +* `withSecondaryIpv6Prefix(java.lang.String)` was removed +* `fabricAsn()` was removed +* `models.BfdConfiguration bfdConfiguration()` -> `models.BfdPatchConfiguration bfdConfiguration()` +* `validate()` was removed +* `withBfdConfiguration(models.BfdConfiguration)` was removed + +#### `models.AccessControlListAction` was modified + +* `validate()` was removed + +#### `models.SupportedConnectorProperties` was modified + +* `SupportedConnectorProperties()` was changed to private access +* `withConnectorType(java.lang.String)` was removed +* `withMaxSpeedInMbps(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.NetworkTapRulePatch` was modified + +* `withConfigurationType(models.ConfigurationType)` was removed +* `matchConfigurations()` was removed +* `withMatchConfigurations(java.util.List)` was removed +* `withTags(java.util.Map)` was removed +* `dynamicMatchConfigurations()` was removed +* `withAnnotation(java.lang.String)` was removed +* `validate()` was removed +* `withTapRulesUrl(java.lang.String)` was removed +* `configurationType()` was removed +* `tapRulesUrl()` was removed +* `annotation()` was removed +* `withDynamicMatchConfigurations(java.util.List)` was removed + +#### `models.NetworkTapPatch` was modified + +* `validate()` was removed +* `withAnnotation(java.lang.String)` was removed +* `withPollingType(models.PollingType)` was removed +* `annotation()` was removed +* `pollingType()` was removed +* `withDestinations(java.util.List)` was removed +* `withTags(java.util.Map)` was removed +* `destinations()` was removed + +#### `models.AggregateRoute` was modified + +* `validate()` was removed + +#### `models.StatementConditionProperties` was modified + +* `withIpCommunityIds(java.util.List)` was removed +* `validate()` was removed + +#### `models.InternetGatewayPatch` was modified + +* `internetGatewayRuleId()` was removed +* `validate()` was removed +* `withInternetGatewayRuleId(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed + +#### `models.OptionBLayer3Configuration` was modified + +* `fabricAsn()` was removed +* `withSecondaryIpv6Prefix(java.lang.String)` was removed +* `peerAsn()` was removed +* `java.lang.Integer vlanId()` -> `int vlanId()` +* `withPeerAsn(java.lang.Long)` was removed +* `withPrimaryIpv4Prefix(java.lang.String)` was removed +* `withSecondaryIpv4Prefix(java.lang.String)` was removed +* `validate()` was removed +* `withPrimaryIpv6Prefix(java.lang.String)` was removed +* `withVlanId(java.lang.Integer)` was removed + +#### `models.IpMatchCondition` was modified + +* `validate()` was removed + +### Features Added + +* `models.IpCommunityPatchableProperties` was added + +* `models.NetworkFabricProperties` was added + +* `models.HeaderAddressProperties` was added + +* `models.ExternalNetworkPatchProperties` was added + +* `models.RouteType` was added + +* `models.VpnOptionBProperties` was added + +* `models.ExternalNetworkProperties` was added + +* `models.InternalNetworkBmpProperties` was added + +* `models.NetworkMonitor$Definition` was added + +* `models.NeighborGroupPatchProperties` was added + +* `models.ExternalNetworkBmpProperties` was added + +* `models.L3OptionBPatchProperties` was added + +* `models.NeighborGroupDestinationPatch` was added + +* `models.VlanGroupPatchProperties` was added + +* `models.IpExtendedCommunityProperties` was added + +* `models.BgpAdministrativeState` was added + +* `models.StatementActionPatchProperties` was added + +* `models.ManagedServiceIdentity` was added + +* `models.NetworkDeviceSkuProperties` was added + +* `models.IcmpConfigurationPatchProperties` was added + +* `models.VlanMatchConditionPatch` was added + +* `models.BfdPatchConfiguration` was added + +* `models.StaticRouteRoutePolicy` was added + +* `models.NetworkDevicePatchParametersProperties` was added + +* `models.IcmpConfigurationProperties` was added + +* `models.InternalNetworkBgpAdministrativeStateRequest` was added + +* `models.NniStaticRouteConfiguration` was added + +* `models.VpnOptionBPatchProperties` was added + +* `models.NetworkToNetworkInterconnectProperties` was added + +* `models.ExternalNetworkStaticRouteConfiguration` was added + +* `models.ImportRoutePolicyInformationPatch` was added + +* `models.NetworkFabricLockAction` was added + +* `models.GlobalNetworkTapRuleActionPatchProperties` was added + +* `models.L3IsolationDomainProperties` was added + +* `models.UniqueRouteDistinguisherPatchProperties` was added + +* `models.ExternalNetworkBmpPatchProperties` was added + +* `models.ConditionalDefaultRouteProperties` was added + +* `models.ArmConfigurationDiffResponse` was added + +* `models.BmpConfigurationPatchProperties` was added + +* `models.NeighborGroupProperties` was added + +* `models.ManagedServiceIdentityPatch` was added + +* `models.Layer2ConfigurationPatch` was added + +* `models.NetworkInterfacePatchProperties` was added + +* `models.InternalNetworkBgpAdministrativeStateResponse` was added + +* `models.NetworkFabricLockRequest` was added + +* `models.BitRateUnit` was added + +* `models.NetworkFabricPatchProperties` was added + +* `models.BurstSizeUnit` was added + +* `models.ExternalNetworkBfdAdministrativeStateResponse` was added + +* `models.NetworkTapRuleProperties` was added + +* `models.L3IsolationDomainPatchProperties` was added + +* `models.NetworkMonitorPatchProperties` was added + +* `models.DestinationPatchProperties` was added + +* `models.ExternalNetworkStaticRoutePatchConfiguration` was added + +* `models.NetworkTapRuleActionPatch` was added + +* `models.StorageAccountConfiguration` was added + +* `models.NetworkFabricLockType` was added + +* `models.L2IsolationDomainProperties` was added + +* `models.NetworkRackPatch` was added + +* `models.DiscardCommitBatchResponse` was added + +* `models.StaticRoutePatchConfiguration` was added + +* `models.BmpMonitoredAddressFamily` was added + +* `models.RoutePolicyProperties` was added + +* `models.NetworkDeviceProperties` was added + +* `models.NativeIpv6PrefixLimitPatchProperties` was added + +* `models.OptionBLayer3PrefixLimitProperties` was added + +* `models.StorageAccountPatchConfiguration` was added + +* `models.NetworkMonitor` was added + +* `models.AccessControlListProperties` was added + +* `models.InternalNetworkRouteType` was added + +* `models.StationConnectionMode` was added + +* `models.StationConfigurationState` was added + +* `models.CommonPostActionResponseForDeviceROCommands` was added + +* `models.L3UniqueRouteDistinguisherProperties` was added + +* `models.DeviceRole` was added + +* `models.V4OverV6BgpSessionState` was added + +* `models.RoutePrefixLimitPatchProperties` was added + +* `models.BgpPatchConfiguration` was added + +* `models.PrefixLimitProperties` was added + +* `models.GlobalAccessControlListActionPatchProperties` was added + +* `models.ExternalNetworkRouteType` was added + +* `models.AccessControlListPatchProperties` was added + +* `models.BurstSize` was added + +* `models.GlobalAccessControlListActionProperties` was added + +* `models.InternalNetworkPatchProperties` was added + +* `models.BmpConfigurationState` was added + +* `models.NativeIpv4PrefixLimitProperties` was added + +* `models.NetworkMonitors` was added + +* `models.InternetGatewayRuleProperties` was added + +* `models.InternetGatewayPatchProperties` was added + +* `models.StationConnectionProperties` was added + +* `FilesharesManager` was added + +* `models.IdentitySelectorPatch` was added + +* `models.CommitBatchState` was added + +* `FilesharesManager$Configurable` was added + +* `models.ExternalNetworkBfdAdministrativeStateRequest` was added + +* `models.AccessControlListMatchConfigurationPatch` was added + +* `models.NetworkMonitorProperties` was added + +* `models.ManagementNetworkPatchConfiguration` was added + +* `models.IsolationDomainPatchProperties` was added + +* `models.NetworkTapPatchProperties` was added + +* `models.InternalNetworkBmpPatchProperties` was added + +* `models.PrefixLimitPatchProperties` was added + +* `models.RoutePolicyPatchableProperties` was added + +* `models.AccessControlListPortConditionPatch` was added + +* `models.ExtendedVlan` was added + +* `models.ExportRoutePolicyPatch` was added + +* `models.RuleCondition` was added + +* `models.BmpConfigurationProperties` was added + +* `models.CommonDynamicMatchConfigurationPatch` was added + +* `models.NniStaticRoutePatchConfiguration` was added + +* `models.NetworkPacketBrokerProperties` was added + +* `models.IpPrefixPatchProperties` was added + +* `models.ImportRoutePolicyPatch` was added + +* `models.NetworkToNetworkInterconnectPatchProperties` was added + +* `models.OptionBLayer3PrefixLimitPatchProperties` was added + +* `models.NetworkTapRuleMatchConditionPatch` was added + +* `models.StaticRoutePatchProperties` was added + +* `models.NniBfdAdministrativeStateRequest` was added + +* `models.OptionBLayer3ConfigurationPatchProperties` was added + +* `models.NniBmpPatchProperties` was added + +* `models.PortConditionPatch` was added + +* `models.RouteTargetPatchInformation` was added + +* `models.StationConnectionPatchProperties` was added + +* `models.IpGroupPatchProperties` was added + +* `models.IpCommunityProperties` was added + +* `models.IpPrefixProperties` was added + +* `models.NetworkRackProperties` was added + +* `models.InternetGatewayProperties` was added + +* `models.IpMatchConditionPatch` was added + +* `models.FabricLockProperties` was added + +* `models.DiscardCommitBatchRequest` was added + +* `models.NetworkMonitorPatch` was added + +* `models.VpnOptionAProperties` was added + +* `models.InternalNetworkBfdAdministrativeStateResponse` was added + +* `models.NativeIpv6PrefixLimitProperties` was added + +* `models.RoutePolicyStatementPatchProperties` was added + +* `models.ConnectedSubnetRoutePolicyPatch` was added + +* `models.NeighborAddressBgpAdministrativeStatus` was added + +* `models.BitRate` was added + +* `models.StaticRouteRoutePolicyPatch` was added + +* `models.StatementConditionPatchProperties` was added + +* `models.NpbStaticRouteConfigurationPatch` was added + +* `models.BmpExportPolicy` was added + +* `models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult` was added + +* `models.AccessControlListMatchConditionPatch` was added + +* `models.AccessControlListActionPatch` was added + +* `models.IpExtendedCommunityPatchProperties` was added + +* `models.UniqueRouteDistinguisherProperties` was added + +* `models.UniqueRouteDistinguisherConfigurationState` was added + +* `models.L2IsolationDomainPatchProperties` was added + +* `models.InternalNetworkProperties` was added + +* `models.NNIDerivedUniqueRouteDistinguisherConfigurationState` was added + +* `models.NetworkTapProperties` was added + +* `models.CommitBatchStatusResponse` was added + +* `models.NetworkMonitor$DefinitionStages` was added + +* `models.NniBfdAdministrativeStateResponse` was added + +* `models.ViewDeviceConfigurationResponse` was added + +* `models.VpnOptionAPatchProperties` was added + +* `models.PortGroupPatchProperties` was added + +* `models.LastOperationProperties` was added + +* `models.CommonPostActionResponseForDeviceRWCommands` was added + +* `models.CommitBatchStatusRequest` was added + +* `models.ManagedServiceIdentityType` was added + +* `models.LockConfigurationState` was added + +* `models.DeviceRwCommand` was added + +* `models.DeviceRoCommand` was added + +* `models.V6OverV4BgpSessionState` was added + +* `models.ActionIpExtendedCommunityPatchProperties` was added + +* `models.MicroBfdState` was added + +* `models.UserAssignedIdentity` was added + +* `models.AclType` was added + +* `models.IPAddressType` was added + +* `models.RoutePrefixLimitProperties` was added + +* `models.NativeIpv4PrefixLimitPatchProperties` was added + +* `models.ActionIpCommunityPatchProperties` was added + +* `models.L3ExportRoutePolicyPatch` was added + +* `models.AggregateRoutePatchConfiguration` was added + +* `models.PoliceRateConfigurationProperties` was added + +* `models.NetworkFabricControllerPatchProperties` was added + +* `models.NetworkMonitor$Update` was added + +* `models.NeighborAddressBfdAdministrativeStatus` was added + +* `models.NetworkFabricControllerProperties` was added + +* `models.TerminalServerPatchConfiguration` was added + +* `models.FeatureFlagProperties` was added + +* `models.NniBmpProperties` was added + +* `models.NetworkInterfaceProperties` was added + +* `models.ExportRoutePolicyInformationPatch` was added + +* `models.NetworkTapRulePatchProperties` was added + +* `models.NetworkFabricSkuProperties` was added + +* `models.ManagedServiceIdentitySelectorType` was added + +* `models.GlobalNetworkTapRuleActionProperties` was added + +* `models.NeighborAddressPatch` was added + +* `models.IdentitySelector` was added + +* `models.NetworkTapRuleMatchConfigurationPatch` was added + +* `models.NetworkMonitor$UpdateStages` was added + +* `models.InternalNetworkBfdAdministrativeStateRequest` was added + +* `models.CommitBatchDetails` was added + +* `models.ConnectedSubnetPatch` was added + +#### `models.InternalNetwork$Definition` was modified + +* `withProperties(models.InternalNetworkProperties)` was added + +#### `models.IpPrefix$Update` was modified + +* `withProperties(models.IpPrefixPatchProperties)` was added + +#### `models.L3IsolationDomainPatch` was modified + +* `properties()` was added +* `tags()` was added +* `withProperties(models.L3IsolationDomainPatchProperties)` was added + +#### `models.IpGroupProperties` was modified + +* `withIpAddressType(models.IPAddressType)` was added + +#### `models.NetworkInterfacePatch` was modified + +* `properties()` was added +* `withProperties(models.NetworkInterfacePatchProperties)` was added + +#### `models.NetworkPacketBroker$Definition` was modified + +* `withProperties(models.NetworkPacketBrokerProperties)` was added + +#### `models.TerminalServerConfiguration` was modified + +* `password()` was added +* `username()` was added +* `serialNumber()` was added + +#### `models.NetworkTapRuleMatchCondition` was modified + +* `vlanMatchCondition()` was added +* `ipCondition()` was added +* `protocolTypes()` was added + +#### `models.NetworkDevice$Update` was modified + +* `withProperties(models.NetworkDevicePatchParametersProperties)` was added + +#### `models.VpnConfigurationPatchableProperties` was modified + +* `withOptionAProperties(models.VpnOptionAPatchProperties)` was added +* `withOptionBProperties(models.VpnOptionBPatchProperties)` was added + +#### `models.ExternalNetworkPatch` was modified + +* `withProperties(models.ExternalNetworkPatchProperties)` was added +* `properties()` was added + +#### `models.ActionIpCommunityProperties` was modified + +* `add()` was added + +#### `models.IpExtendedCommunity` was modified + +* `properties()` was added + +#### `models.IpPrefixPatch` was modified + +* `tags()` was added +* `properties()` was added +* `withProperties(models.IpPrefixPatchProperties)` was added + +#### `models.NetworkInterface` was modified + +* `properties()` was added + +#### `models.NetworkInterface$Update` was modified + +* `withProperties(models.NetworkInterfacePatchProperties)` was added + +#### `models.InternetGatewayRulePatch` was modified + +* `tags()` was added + +#### `models.ExternalNetworks` was modified + +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.ExternalNetworkBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.ExternalNetworkBfdAdministrativeStateRequest)` was added + +#### `models.ExternalNetwork$Update` was modified + +* `withProperties(models.ExternalNetworkPatchProperties)` was added + +#### `models.L3IsolationDomain` was modified + +* `properties()` was added + +#### `models.NetworkFabricController$Update` was modified + +* `withProperties(models.NetworkFabricControllerPatchProperties)` was added + +#### `models.NeighborGroup$Definition` was modified + +* `withProperties(models.NeighborGroupProperties)` was added + +#### `models.NeighborAddress` was modified + +* `bgpAdministrativeState()` was added +* `bfdAdministrativeState()` was added + +#### `models.AccessControlList$Update` was modified + +* `withProperties(models.AccessControlListPatchProperties)` was added + +#### `models.NetworkDeviceSku` was modified + +* `properties()` was added + +#### `models.InternalNetworks` was modified + +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkBgpAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkBfdAdministrativeStateRequest)` was added +* `updateBgpAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.InternalNetworkBgpAdministrativeStateRequest)` was added + +#### `models.ExternalNetworkPropertiesOptionAProperties` was modified + +* `nativeIpv6PrefixLimit()` was added +* `secondaryIpv6Prefix()` was added +* `peerASN()` was added +* `withPeerASN(long)` was added +* `withVlanId(int)` was added +* `withV6OverV4BgpSession(models.V6OverV4BgpSessionState)` was added +* `v6OverV4BgpSession()` was added +* `secondaryIpv4Prefix()` was added +* `withV4OverV6BgpSession(models.V4OverV6BgpSessionState)` was added +* `v4OverV6BgpSession()` was added +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitProperties)` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitProperties)` was added +* `nativeIpv4PrefixLimit()` was added +* `primaryIpv6Prefix()` was added +* `bmpConfiguration()` was added +* `fabricASN()` was added +* `primaryIpv4Prefix()` was added +* `withBmpConfiguration(models.ExternalNetworkBmpProperties)` was added + +#### `models.AccessControlListMatchCondition` was modified + +* `vlanMatchCondition()` was added +* `ipCondition()` was added +* `withIcmpConfiguration(models.IcmpConfigurationProperties)` was added +* `protocolNeighbors()` was added +* `icmpConfiguration()` was added +* `withProtocolNeighbors(java.util.List)` was added +* `protocolTypes()` was added + +#### `models.InternalNetwork$Update` was modified + +* `withProperties(models.InternalNetworkPatchProperties)` was added + +#### `models.NetworkDevices` was modified + +* `runRwCommand(java.lang.String,java.lang.String,models.DeviceRwCommand)` was added +* `runRoCommand(java.lang.String,java.lang.String,models.DeviceRoCommand,com.azure.core.util.Context)` was added +* `runRwCommand(java.lang.String,java.lang.String,models.DeviceRwCommand,com.azure.core.util.Context)` was added +* `runRoCommand(java.lang.String,java.lang.String,models.DeviceRoCommand)` was added + +#### `models.NetworkTapRule$Definition` was modified + +* `withProperties(models.NetworkTapRuleProperties)` was added + +#### `models.InternetGatewayRule$Definition` was modified + +* `withProperties(models.InternetGatewayRuleProperties)` was added + +#### `models.NetworkTapRule$Update` was modified + +* `withProperties(models.NetworkTapRulePatchProperties)` was added + +#### `models.UpgradeNetworkFabricProperties` was modified + +* `version()` was added + +#### `models.L2IsolationDomain$Definition` was modified + +* `withProperties(models.L2IsolationDomainProperties)` was added + +#### `models.IpCommunity$Update` was modified + +* `withProperties(models.IpCommunityPatchableProperties)` was added + +#### `models.InternetGateway$Definition` was modified + +* `withProperties(models.InternetGatewayProperties)` was added + +#### `models.RuleProperties` was modified + +* `withDestinationAddressList(java.util.List)` was added +* `sourceAddressList()` was added +* `withSourceAddressList(java.util.List)` was added +* `condition()` was added +* `destinationAddressList()` was added +* `withCondition(models.RuleCondition)` was added +* `headerAddressList()` was added +* `withHeaderAddressList(java.util.List)` was added + +#### `models.InternalNetworkPatch` was modified + +* `properties()` was added +* `withProperties(models.InternalNetworkPatchProperties)` was added + +#### `models.RoutePolicyPatch` was modified + +* `properties()` was added +* `tags()` was added +* `withProperties(models.RoutePolicyPatchableProperties)` was added + +#### `models.AccessControlListPatch` was modified + +* `tags()` was added +* `properties()` was added +* `withProperties(models.AccessControlListPatchProperties)` was added + +#### `models.IpPrefix` was modified + +* `properties()` was added + +#### `models.InternetGateway` was modified + +* `properties()` was added + +#### `models.NetworkFabricController$Definition` was modified + +* `withProperties(models.NetworkFabricControllerProperties)` was added + +#### `models.AccessControlListMatchConfiguration` was modified + +* `withIpAddressType(models.IPAddressType)` was added + +#### `models.InternalNetwork` was modified + +* `updateBfdAdministrativeState(models.InternalNetworkBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `updateBgpAdministrativeState(models.InternalNetworkBgpAdministrativeStateRequest)` was added +* `updateBfdAdministrativeState(models.InternalNetworkBfdAdministrativeStateRequest)` was added +* `updateBgpAdministrativeState(models.InternalNetworkBgpAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `properties()` was added + +#### `models.IpExtendedCommunity$Definition` was modified + +* `withProperties(models.IpExtendedCommunityProperties)` was added + +#### `models.NetworkRack` was modified + +* `properties()` was added + +#### `models.NetworkDevice$Definition` was modified + +* `withProperties(models.NetworkDeviceProperties)` was added + +#### `models.InternetGateway$Update` was modified + +* `withProperties(models.InternetGatewayPatchProperties)` was added + +#### `models.NetworkFabric$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added +* `withProperties(models.NetworkFabricProperties)` was added + +#### `models.NetworkFabrics` was modified + +* `commitBatchStatus(java.lang.String,java.lang.String,models.CommitBatchStatusRequest)` was added +* `armConfigurationDiff(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `lockFabric(java.lang.String,java.lang.String,models.NetworkFabricLockRequest)` was added +* `discardCommitBatch(java.lang.String,java.lang.String,models.DiscardCommitBatchRequest)` was added +* `armConfigurationDiff(java.lang.String,java.lang.String)` was added +* `lockFabric(java.lang.String,java.lang.String,models.NetworkFabricLockRequest,com.azure.core.util.Context)` was added +* `commitBatchStatus(java.lang.String,java.lang.String,models.CommitBatchStatusRequest,com.azure.core.util.Context)` was added +* `viewDeviceConfiguration(java.lang.String,java.lang.String)` was added +* `discardCommitBatch(java.lang.String,java.lang.String,models.DiscardCommitBatchRequest,com.azure.core.util.Context)` was added +* `viewDeviceConfiguration(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.NetworkDevice` was modified + +* `runRwCommand(models.DeviceRwCommand,com.azure.core.util.Context)` was added +* `runRwCommand(models.DeviceRwCommand)` was added +* `runRoCommand(models.DeviceRoCommand,com.azure.core.util.Context)` was added +* `runRoCommand(models.DeviceRoCommand)` was added +* `properties()` was added + +#### `models.NetworkFabricController` was modified + +* `properties()` was added + +#### `models.ActionIpExtendedCommunityProperties` was modified + +* `add()` was added + +#### `models.NetworkPacketBrokerPatch` was modified + +* `tags()` was added + +#### `models.IpCommunityPatch` was modified + +* `properties()` was added +* `withProperties(models.IpCommunityPatchableProperties)` was added +* `tags()` was added + +#### `models.NetworkInterface$Definition` was modified + +* `withProperties(models.NetworkInterfaceProperties)` was added + +#### `models.IpExtendedCommunity$Update` was modified + +* `withProperties(models.IpExtendedCommunityPatchProperties)` was added + +#### `models.UpdateAdministrativeState` was modified + +* `resourceIds()` was added + +#### `models.VpnConfigurationProperties` was modified + +* `withOptionAProperties(models.VpnOptionAProperties)` was added +* `withOptionBProperties(models.VpnOptionBProperties)` was added + +#### `models.RoutePolicy$Definition` was modified + +* `withProperties(models.RoutePolicyProperties)` was added + +#### `models.IpPrefix$Definition` was modified + +* `withProperties(models.IpPrefixProperties)` was added + +#### `models.UpdateDeviceAdministrativeState` was modified + +* `resourceIds()` was added + +#### `models.AccessControlList` was modified + +* `properties()` was added + +#### `models.ConnectedSubnet` was modified + +* `annotation()` was added + +#### `models.NetworkFabricControllerPatch` was modified + +* `tags()` was added +* `withProperties(models.NetworkFabricControllerPatchProperties)` was added +* `properties()` was added + +#### `models.StaticRouteConfiguration` was modified + +* `extension()` was added +* `withExtension(models.Extension)` was added + +#### `models.RoutePolicyStatementProperties` was modified + +* `annotation()` was added + +#### `models.NetworkTap$Update` was modified + +* `withProperties(models.NetworkTapPatchProperties)` was added + +#### `models.NetworkToNetworkInterconnect` was modified + +* `updateBfdAdministrativeState(models.NniBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `properties()` was added +* `updateBfdAdministrativeState(models.NniBfdAdministrativeStateRequest)` was added + +#### `models.NetworkTapRule` was modified + +* `properties()` was added + +#### `models.NetworkToNetworkInterconnectPatch` was modified + +* `properties()` was added +* `withProperties(models.NetworkToNetworkInterconnectPatchProperties)` was added + +#### `models.NetworkFabricSku` was modified + +* `properties()` was added + +#### `models.IpCommunity$Definition` was modified + +* `withProperties(models.IpCommunityProperties)` was added + +#### `models.L3IsolationDomain$Update` was modified + +* `withProperties(models.L3IsolationDomainPatchProperties)` was added + +#### `models.NetworkRack$Definition` was modified + +* `withProperties(models.NetworkRackProperties)` was added + +#### `models.IpCommunity` was modified + +* `properties()` was added + +#### `models.IpExtendedCommunityPatch` was modified + +* `withProperties(models.IpExtendedCommunityPatchProperties)` was added +* `tags()` was added +* `properties()` was added + +#### `models.RoutePolicy` was modified + +* `properties()` was added + +#### `models.NetworkToNetworkInterconnect$Definition` was modified + +* `withProperties(models.NetworkToNetworkInterconnectProperties)` was added + +#### `models.NetworkTap$Definition` was modified + +* `withProperties(models.NetworkTapProperties)` was added + +#### `models.BgpConfiguration` was modified + +* `withBmpConfiguration(models.InternalNetworkBmpProperties)` was added +* `v4OverV6BgpSession()` was added +* `bmpConfiguration()` was added +* `v6OverV4BgpSession()` was added +* `withV4OverV6BgpSession(models.V4OverV6BgpSessionState)` was added +* `withPeerASN(long)` was added +* `annotation()` was added +* `withV6OverV4BgpSession(models.V6OverV4BgpSessionState)` was added +* `fabricASN()` was added +* `peerASN()` was added + +#### `models.NetworkFabricPatch` was modified + +* `withIdentity(models.ManagedServiceIdentityPatch)` was added +* `withProperties(models.NetworkFabricPatchProperties)` was added +* `identity()` was added +* `tags()` was added +* `properties()` was added + +#### `models.AccessControlListPortCondition` was modified + +* `portType()` was added +* `ports()` was added +* `portGroupNames()` was added +* `layer4Protocol()` was added + +#### `models.NeighborGroup$Update` was modified + +* `withProperties(models.NeighborGroupPatchProperties)` was added + +#### `models.AccessControlList$Definition` was modified + +* `withProperties(models.AccessControlListProperties)` was added + +#### `models.L3IsolationDomain$Definition` was modified + +* `withProperties(models.L3IsolationDomainProperties)` was added + +#### `models.NetworkTapRuleMatchConfiguration` was modified + +* `withIpAddressType(models.IPAddressType)` was added + +#### `models.L2IsolationDomain$Update` was modified + +* `withProperties(models.L2IsolationDomainPatchProperties)` was added + +#### `models.PollingIntervalInSeconds` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.L2IsolationDomain` was modified + +* `properties()` was added + +#### `models.NetworkFabric` was modified + +* `viewDeviceConfiguration()` was added +* `properties()` was added +* `armConfigurationDiff(com.azure.core.util.Context)` was added +* `viewDeviceConfiguration(com.azure.core.util.Context)` was added +* `discardCommitBatch(models.DiscardCommitBatchRequest,com.azure.core.util.Context)` was added +* `commitBatchStatus(models.CommitBatchStatusRequest,com.azure.core.util.Context)` was added +* `identity()` was added +* `discardCommitBatch(models.DiscardCommitBatchRequest)` was added +* `commitBatchStatus(models.CommitBatchStatusRequest)` was added +* `lockFabric(models.NetworkFabricLockRequest,com.azure.core.util.Context)` was added +* `lockFabric(models.NetworkFabricLockRequest)` was added +* `armConfigurationDiff()` was added + +#### `models.ExternalNetwork` was modified + +* `updateBfdAdministrativeState(models.ExternalNetworkBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added +* `properties()` was added +* `updateBfdAdministrativeState(models.ExternalNetworkBfdAdministrativeStateRequest)` was added + +#### `models.NetworkFabric$Update` was modified + +* `withProperties(models.NetworkFabricPatchProperties)` was added +* `withIdentity(models.ManagedServiceIdentityPatch)` was added + +#### `models.NetworkToNetworkInterconnect$Update` was modified + +* `withProperties(models.NetworkToNetworkInterconnectPatchProperties)` was added + +#### `models.NetworkDevicePatchParameters` was modified + +* `withProperties(models.NetworkDevicePatchParametersProperties)` was added +* `properties()` was added +* `tags()` was added + +#### `models.NetworkTap` was modified + +* `properties()` was added + +#### `models.NetworkToNetworkInterconnects` was modified + +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.NniBfdAdministrativeStateRequest)` was added +* `updateBfdAdministrativeState(java.lang.String,java.lang.String,java.lang.String,models.NniBfdAdministrativeStateRequest,com.azure.core.util.Context)` was added + +#### `models.NeighborGroup` was modified + +* `properties()` was added + +#### `models.RoutePolicy$Update` was modified + +* `withProperties(models.RoutePolicyPatchableProperties)` was added + +#### `models.ExternalNetwork$Definition` was modified + +* `withProperties(models.ExternalNetworkProperties)` was added + +#### `models.NeighborGroupPatch` was modified + +* `properties()` was added +* `tags()` was added +* `withProperties(models.NeighborGroupPatchProperties)` was added + +#### `models.L2IsolationDomainPatch` was modified + +* `tags()` was added +* `properties()` was added +* `withProperties(models.L2IsolationDomainPatchProperties)` was added + +#### `models.InternetGatewayRule` was modified + +* `properties()` was added + +#### `models.NetworkPacketBroker` was modified + +* `properties()` was added + +#### `models.ExternalNetworkPatchPropertiesOptionAProperties` was modified + +* `withBfdConfiguration(models.BfdPatchConfiguration)` was added +* `v4OverV6BgpSession()` was added +* `peerASN()` was added +* `bmpConfiguration()` was added +* `primaryIpv4Prefix()` was added +* `nativeIpv6PrefixLimit()` was added +* `primaryIpv6Prefix()` was added +* `fabricASN()` was added +* `v6OverV4BgpSession()` was added +* `withNativeIpv4PrefixLimit(models.NativeIpv4PrefixLimitPatchProperties)` was added +* `withBmpConfiguration(models.ExternalNetworkBmpPatchProperties)` was added +* `withNativeIpv6PrefixLimit(models.NativeIpv6PrefixLimitPatchProperties)` was added +* `secondaryIpv6Prefix()` was added +* `withPeerASN(java.lang.Long)` was added +* `withV4OverV6BgpSession(models.V4OverV6BgpSessionState)` was added +* `withV6OverV4BgpSession(models.V6OverV4BgpSessionState)` was added +* `secondaryIpv4Prefix()` was added +* `nativeIpv4PrefixLimit()` was added + +#### `models.AccessControlListAction` was modified + +* `policeRateConfiguration()` was added +* `withRemarkComment(java.lang.String)` was added +* `withPoliceRateConfiguration(models.PoliceRateConfigurationProperties)` was added +* `remarkComment()` was added + +#### `models.NetworkTapRulePatch` was modified + +* `properties()` was added +* `withProperties(models.NetworkTapRulePatchProperties)` was added +* `tags()` was added + +#### `models.NetworkTapPatch` was modified + +* `tags()` was added +* `withProperties(models.NetworkTapPatchProperties)` was added +* `properties()` was added + +#### `models.StatementConditionProperties` was modified + +* `ipCommunityIds()` was added + +#### `models.InternetGatewayPatch` was modified + +* `properties()` was added +* `withProperties(models.InternetGatewayPatchProperties)` was added +* `tags()` was added + +#### `models.OptionBLayer3Configuration` was modified + +* `withPeerASN(long)` was added +* `withVlanId(int)` was added +* `withBmpConfiguration(models.NniBmpProperties)` was added +* `prefixLimits()` was added +* `primaryIpv6Prefix()` was added +* `peLoopbackIpAddress()` was added +* `primaryIpv4Prefix()` was added +* `withPrefixLimits(java.util.List)` was added +* `bmpConfiguration()` was added +* `peerASN()` was added +* `withPeLoopbackIpAddress(java.util.List)` was added +* `secondaryIpv4Prefix()` was added +* `secondaryIpv6Prefix()` was added +* `fabricASN()` was added ## 1.1.0 (2024-12-11) diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md index d08de63fef32..6779d4516044 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager Managed Network Fabric client library for Java +# Azure Resource Manager fileshares client library for Java -Azure Resource Manager Managed Network Fabric client library for Java. +Azure Resource Manager fileshares 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). +This package contains Microsoft Azure SDK for fileshares Management SDK. Self service experience for Azure Network Fabric API. Package api-version 2024-06-15-preview. 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 @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); -ManagedNetworkFabricManager manager = ManagedNetworkFabricManager +FilesharesManager manager = FilesharesManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -142,5 +142,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md index a19f857fd4f8..7fbbda00e9c3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md @@ -21,7 +21,7 @@ - [ListByL3IsolationDomain](#externalnetworks_listbyl3isolationdomain) - [Update](#externalnetworks_update) - [UpdateAdministrativeState](#externalnetworks_updateadministrativestate) -- [UpdateStaticRouteBfdAdministrativeState](#externalnetworks_updatestaticroutebfdadministrativestate) +- [UpdateBfdAdministrativeState](#externalnetworks_updatebfdadministrativestate) ## InternalNetworks @@ -31,8 +31,8 @@ - [ListByL3IsolationDomain](#internalnetworks_listbyl3isolationdomain) - [Update](#internalnetworks_update) - [UpdateAdministrativeState](#internalnetworks_updateadministrativestate) +- [UpdateBfdAdministrativeState](#internalnetworks_updatebfdadministrativestate) - [UpdateBgpAdministrativeState](#internalnetworks_updatebgpadministrativestate) -- [UpdateStaticRouteBfdAdministrativeState](#internalnetworks_updatestaticroutebfdadministrativestate) ## InternetGatewayRules @@ -126,6 +126,8 @@ - [ListByResourceGroup](#networkdevices_listbyresourcegroup) - [Reboot](#networkdevices_reboot) - [RefreshConfiguration](#networkdevices_refreshconfiguration) +- [RunRoCommand](#networkdevices_runrocommand) +- [RunRwCommand](#networkdevices_runrwcommand) - [Update](#networkdevices_update) - [UpdateAdministrativeState](#networkdevices_updateadministrativestate) - [Upgrade](#networkdevices_upgrade) @@ -146,14 +148,18 @@ ## NetworkFabrics +- [ArmConfigurationDiff](#networkfabrics_armconfigurationdiff) +- [CommitBatchStatus](#networkfabrics_commitbatchstatus) - [CommitConfiguration](#networkfabrics_commitconfiguration) - [Create](#networkfabrics_create) - [Delete](#networkfabrics_delete) - [Deprovision](#networkfabrics_deprovision) +- [DiscardCommitBatch](#networkfabrics_discardcommitbatch) - [GetByResourceGroup](#networkfabrics_getbyresourcegroup) - [GetTopology](#networkfabrics_gettopology) - [List](#networkfabrics_list) - [ListByResourceGroup](#networkfabrics_listbyresourcegroup) +- [LockFabric](#networkfabrics_lockfabric) - [Provision](#networkfabrics_provision) - [RefreshConfiguration](#networkfabrics_refreshconfiguration) - [Update](#networkfabrics_update) @@ -161,6 +167,7 @@ - [UpdateWorkloadManagementBfdConfiguration](#networkfabrics_updateworkloadmanagementbfdconfiguration) - [Upgrade](#networkfabrics_upgrade) - [ValidateConfiguration](#networkfabrics_validateconfiguration) +- [ViewDeviceConfiguration](#networkfabrics_viewdeviceconfiguration) ## NetworkInterfaces @@ -171,6 +178,16 @@ - [Update](#networkinterfaces_update) - [UpdateAdministrativeState](#networkinterfaces_updateadministrativestate) +## NetworkMonitors + +- [Create](#networkmonitors_create) +- [Delete](#networkmonitors_delete) +- [GetByResourceGroup](#networkmonitors_getbyresourcegroup) +- [List](#networkmonitors_list) +- [ListByResourceGroup](#networkmonitors_listbyresourcegroup) +- [Update](#networkmonitors_update) +- [UpdateAdministrativeState](#networkmonitors_updateadministrativestate) + ## NetworkPacketBrokers - [Create](#networkpacketbrokers_create) @@ -220,7 +237,7 @@ - [ListByNetworkFabric](#networktonetworkinterconnects_listbynetworkfabric) - [Update](#networktonetworkinterconnects_update) - [UpdateAdministrativeState](#networktonetworkinterconnects_updateadministrativestate) -- [UpdateNpbStaticRouteBfdAdministrativeState](#networktonetworkinterconnects_updatenpbstaticroutebfdadministrativestate) +- [UpdateBfdAdministrativeState](#networktonetworkinterconnects_updatebfdadministrativestate) ## Operations @@ -244,14 +261,25 @@ import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAc 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.AccessControlListProperties; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; 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.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; @@ -267,60 +295,67 @@ import java.util.Map; */ public final class AccessControlListsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Create.json */ /** * Sample code: AccessControlLists_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .define("example-acl") .withRegion("eastUs") .withExistingResourceGroup("example-rg") + .withProperties(new AccessControlListProperties().withAnnotation("annotation") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://ACL-Storage-URL") + .withDefaultAction(CommunityActionTypes.PERMIT) + .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")) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("example-counter") + .withRemarkComment("example-remark") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) + .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")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE))) .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("https://ACL-Storage-URL") - .withDefaultAction(CommunityActionTypes.PERMIT) - .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 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(); } @@ -346,17 +381,15 @@ public final class AccessControlListsCreateSamples { */ public final class AccessControlListsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Delete.json */ /** * Sample code: AccessControlLists_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists().delete("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } @@ -370,17 +403,15 @@ public final class AccessControlListsDeleteSamples { */ public final class AccessControlListsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Get.json */ /** * Sample code: AccessControlLists_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void accessControlListsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + accessControlListsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE); } @@ -395,17 +426,15 @@ public final class AccessControlListsGetByResourceGroupSamples { */ public final class AccessControlListsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_ListBySubscription.json */ /** * Sample code: AccessControlLists_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists().list(com.azure.core.util.Context.NONE); } } @@ -419,17 +448,15 @@ public final class AccessControlListsListSamples { */ public final class AccessControlListsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_ListByResourceGroup.json */ /** * Sample code: AccessControlLists_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -443,17 +470,15 @@ public final class AccessControlListsListByResourceGroupSamples { */ public final class AccessControlListsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Resync.json */ /** * Sample code: AccessControlLists_Resync_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsResyncMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists().resync("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } @@ -463,24 +488,35 @@ public final class AccessControlListsResyncSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -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.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; 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.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -490,60 +526,68 @@ import java.util.Map; */ public final class AccessControlListsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Update.json */ /** * Sample code: AccessControlLists_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { AccessControlList resource = manager.accessControlLists() .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withAnnotation("annotation") - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("https://microsoft.com/a") - .withDefaultAction(CommunityActionTypes.PERMIT) - .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 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")))))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new AccessControlListPatchProperties().withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://microsoft.com/a") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withMatchConfigurations(Arrays.asList(new AccessControlListMatchConfigurationPatch() + .withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().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 AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.COUNT) + .withCounterName("example-counter") + .withRemarkComment("example-remark") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("example-portGroup") + .withPorts(Arrays.asList("100-200")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withAnnotation("annotation")) .apply(); } @@ -573,17 +617,15 @@ import java.util.Arrays; */ public final class AccessControlListsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_UpdateAdministrativeState.json */ /** * Sample code: AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .updateAdministrativeState("example-rg", "example-acl", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -600,17 +642,15 @@ public final class AccessControlListsUpdateAdministrativeStateSamples { */ public final class AccessControlListsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_ValidateConfiguration.json */ /** * Sample code: AccessControlLists_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .validateConfiguration("example-rg", "example-acl", com.azure.core.util.Context.NONE); } @@ -621,12 +661,22 @@ public final class AccessControlListsValidateConfigurationSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -634,54 +684,64 @@ import java.util.Arrays; */ public final class ExternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Create.json */ /** * Sample code: ExternalNetworks_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .define("example-externalnetwork") - .withExistingL3IsolationDomain("example-rg", "example-l3domain") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(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") - .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(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")) - .withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .define("example-ext") + .withExistingL3IsolationDomain("example-rg", "example-externalnetwork") + .withProperties(new ExternalNetworkProperties().withAnnotation("annotation") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .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")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10039")) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .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 ExternalNetworkPropertiesOptionAProperties() + .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(65047L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))))) .create(); } } @@ -695,19 +755,17 @@ public final class ExternalNetworksCreateSamples { */ public final class ExternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Delete.json */ /** * Sample code: ExternalNetworks_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .delete("example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE); } } ``` @@ -720,19 +778,17 @@ public final class ExternalNetworksDeleteSamples { */ public final class ExternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Get.json */ /** * Sample code: ExternalNetworks_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .getWithResponse("rgL3IsolationDomains", "yhtr", "fltpszzikbalrzaqq", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE); } } ``` @@ -745,19 +801,17 @@ public final class ExternalNetworksGetSamples { */ public final class ExternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void externalNetworksListByL3IsolationDomainMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-externalnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -765,14 +819,24 @@ public final class ExternalNetworksListByL3IsolationDomainSamples { ### ExternalNetworks_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchProperties; 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.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -780,55 +844,72 @@ import java.util.Arrays; */ public final class ExternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Update.json */ /** * Sample code: ExternalNetworks_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { ExternalNetwork resource = manager.externalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-externalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(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 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(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/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .withProperties(new ExternalNetworkPatchProperties().withAnnotation("annotation1") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withImportRoutePolicy(new ImportRoutePolicyPatch().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 ExportRoutePolicyPatch().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")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10039")) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(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(65047L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(13) + .withThreshold(24) + .withIdleTimeExpiry(8)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(13) + .withThreshold(24) + .withIdleTimeExpiry(8))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("10.0.0.1/14") + .withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("2fff::/64") + .withNextHop(Arrays.asList("3ffe::1")))))) .apply(); } } @@ -846,51 +927,48 @@ import java.util.Arrays; */ public final class ExternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void externalNetworksUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", + .updateAdministrativeState("example-rg", "example-externalnetwork", "example-ext", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### ExternalNetworks_UpdateStaticRouteBfdAdministrativeState +### ExternalNetworks_UpdateBfdAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; /** - * Samples for ExternalNetworks UpdateStaticRouteBfdAdministrativeState. + * Samples for ExternalNetworks UpdateBfdAdministrativeState. */ -public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { +public final class ExternalNetworksUpdateBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_UpdateBfdAdministrativeState.json */ /** - * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: ExternalNetworks_UpdateBfdAdministrativeState. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void externalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .updateStaticRouteBfdAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBfdAdministrativeState("example-rg", "example-externalnetwork", "example-ext", + new ExternalNetworkBfdAdministrativeStateRequest().withRouteType(ExternalNetworkRouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } @@ -901,16 +979,24 @@ public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSample ```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.BmpConfigurationState; 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.InternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -918,62 +1004,65 @@ import java.util.Arrays; */ public final class InternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Create.json */ /** * Sample code: InternalNetworks_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() .define("example-internalnetwork") - .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 InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").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/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .withExistingL3IsolationDomain("example-rg", "example-l3isd") + .withProperties(new InternalNetworkProperties().withAnnotation("annotation") + .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"))) + .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) + .withVlanId(755) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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::"))) + .withBmpConfiguration( + new InternalNetworkBmpProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.1")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))) + .withExtension(Extension.NO_EXTENSION)) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28))))) .create(); } } @@ -987,19 +1076,17 @@ public final class InternalNetworksCreateSamples { */ public final class InternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Delete.json */ /** * Sample code: InternalNetworks_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .delete("example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -1012,19 +1099,17 @@ public final class InternalNetworksDeleteSamples { */ public final class InternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Get.json */ /** * Sample code: InternalNetworks_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE); } } @@ -1038,19 +1123,17 @@ public final class InternalNetworksGetSamples { */ public final class InternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internalNetworksListByL3IsolationDomainMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-l3isd", com.azure.core.util.Context.NONE); } } ``` @@ -1059,17 +1142,25 @@ public final class InternalNetworksListByL3IsolationDomainSamples { ```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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; 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.InternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -1077,61 +1168,65 @@ import java.util.Arrays; */ public final class InternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Update.json */ /** * Sample code: InternalNetworks_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { InternalNetwork resource = manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .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().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.20.20.20/25").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").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/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .withProperties(new InternalNetworkPatchProperties().withAnnotation("annotation") + .withMtu(1500) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .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) + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("annotation") + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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 NeighborAddressPatch().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("10.1.0.0"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.10")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20))))) .apply(); } } @@ -1149,82 +1244,78 @@ import java.util.Arrays; */ public final class InternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internalNetworksUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-internalnetwork", + .updateAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### InternalNetworks_UpdateBgpAdministrativeState +### InternalNetworks_UpdateBfdAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType; /** - * Samples for InternalNetworks UpdateBgpAdministrativeState. + * Samples for InternalNetworks UpdateBfdAdministrativeState. */ -public final class InternalNetworksUpdateBgpAdministrativeStateSamples { +public final class InternalNetworksUpdateBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_UpdateBfdAdministrativeState.json */ /** - * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateBfdAdministrativeState. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void internalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .updateBgpAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBfdAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkBfdAdministrativeStateRequest().withRouteType(InternalNetworkRouteType.STATIC) + .withNeighborAddress("10.10.1.10") + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } ``` -### InternalNetworks_UpdateStaticRouteBfdAdministrativeState +### InternalNetworks_UpdateBgpAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; /** - * Samples for InternalNetworks UpdateStaticRouteBfdAdministrativeState. + * Samples for InternalNetworks UpdateBgpAdministrativeState. */ -public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { +public final class InternalNetworksUpdateBgpAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_UpdateBgpAdministrativeState.json */ /** - * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .updateStaticRouteBfdAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBgpAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkBgpAdministrativeStateRequest().withNeighborAddress("10.10.10.10") + .withAdministrativeState(BgpAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } @@ -1234,6 +1325,9 @@ public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSample ```java import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; @@ -1244,25 +1338,28 @@ import java.util.Map; */ public final class InternetGatewayRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Create.json */ /** * Sample code: InternetGatewayRules_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withAnnotation("annotationValue") + .withProperties(new InternetGatewayRuleProperties().withAnnotation("annotationValue") + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("10.10.10.10")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("11.11.10.11")) + .withSourceAddressList(Arrays.asList("10.10.10.10")) + .withHeaderAddressList(Arrays.asList(new HeaderAddressProperties().withHeaderName("abcHeader") + .withAddressList(Arrays.asList("10.10.10.10")))))) + .withTags(mapOf("KeyID", "fakeTokenPlaceholder")) .create(); } @@ -1288,17 +1385,15 @@ public final class InternetGatewayRulesCreateSamples { */ public final class InternetGatewayRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Delete.json */ /** * Sample code: InternetGatewayRules_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGatewayRules() .delete("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE); } @@ -1313,17 +1408,15 @@ public final class InternetGatewayRulesDeleteSamples { */ public final class InternetGatewayRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Get.json */ /** * Sample code: InternetGatewayRules_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewayRulesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewayRulesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGatewayRules() .getByResourceGroupWithResponse("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE); @@ -1339,17 +1432,15 @@ public final class InternetGatewayRulesGetByResourceGroupSamples { */ public final class InternetGatewayRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_ListBySubscription.json */ /** * Sample code: InternetGatewayRules_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGatewayRules().list(com.azure.core.util.Context.NONE); } } @@ -1363,17 +1454,15 @@ public final class InternetGatewayRulesListSamples { */ public final class InternetGatewayRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_ListByResourceGroup.json */ /** * Sample code: InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGatewayRules() .listByResourceGroup("example-internetGatewayRule", com.azure.core.util.Context.NONE); } @@ -1392,22 +1481,20 @@ import java.util.Map; */ public final class InternetGatewayRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Update.json */ /** * Sample code: InternetGatewayRules_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { InternetGatewayRule resource = manager.internetGatewayRules() .getByResourceGroupWithResponse("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key3311", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("KeyID", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -1428,6 +1515,7 @@ public final class InternetGatewayRulesUpdateSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; import java.util.HashMap; import java.util.Map; @@ -1436,28 +1524,27 @@ import java.util.Map; */ public final class InternetGatewaysCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Create.json */ /** * Sample code: InternetGateways_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withInternetGatewayRuleId( - "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") - .withAnnotation("annotation") + .withProperties(new InternetGatewayProperties().withAnnotation("annotation") + .withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .withType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } @@ -1483,17 +1570,15 @@ public final class InternetGatewaysCreateSamples { */ public final class InternetGatewaysDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Delete.json */ /** * Sample code: InternetGateways_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGateways().delete("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE); } } @@ -1507,17 +1592,15 @@ public final class InternetGatewaysDeleteSamples { */ public final class InternetGatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Get.json */ /** * Sample code: InternetGateways_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGateways() .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE); } @@ -1532,17 +1615,15 @@ public final class InternetGatewaysGetByResourceGroupSamples { */ public final class InternetGatewaysListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_ListBySubscription.json */ /** * Sample code: InternetGateways_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewaysListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGateways().list(com.azure.core.util.Context.NONE); } } @@ -1556,17 +1637,15 @@ public final class InternetGatewaysListSamples { */ public final class InternetGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_ListByResourceGroup.json */ /** * Sample code: InternetGateways_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewaysListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internetGateways().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -1576,6 +1655,7 @@ public final class InternetGatewaysListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties; import java.util.HashMap; import java.util.Map; @@ -1584,24 +1664,22 @@ import java.util.Map; */ public final class InternetGatewaysUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Update.json */ /** * Sample code: InternetGateways_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { InternetGateway resource = manager.internetGateways() .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key81", "fakeTokenPlaceholder")) - .withInternetGatewayRuleId( - "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new InternetGatewayPatchProperties().withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule")) .apply(); } @@ -1623,6 +1701,7 @@ public final class InternetGatewaysUpdateSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; @@ -1634,27 +1713,25 @@ import java.util.Map; */ public final class IpCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Create.json */ /** * Sample code: IpCommunities_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities() .define("example-ipcommunity") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyId", "fakeTokenPlaceholder")) - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4155123341L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("1:1")))) - .withAnnotation("annotation") + .withProperties(new IpCommunityProperties().withAnnotation("annotation") + .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1"))))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -1680,17 +1757,15 @@ public final class IpCommunitiesCreateSamples { */ public final class IpCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Delete.json */ /** * Sample code: IpCommunities_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities().delete("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE); } } @@ -1704,17 +1779,15 @@ public final class IpCommunitiesDeleteSamples { */ public final class IpCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Get.json */ /** * Sample code: IpCommunities_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities() .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE); } @@ -1729,17 +1802,15 @@ public final class IpCommunitiesGetByResourceGroupSamples { */ public final class IpCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_ListBySubscription.json */ /** * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipCommunitiesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities().list(com.azure.core.util.Context.NONE); } } @@ -1753,17 +1824,15 @@ public final class IpCommunitiesListSamples { */ public final class IpCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_ListByResourceGroup.json */ /** * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipCommunitiesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -1774,36 +1843,51 @@ public final class IpCommunitiesListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatchableProperties; 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 IpCommunities Update. */ public final class IpCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Update.json */ /** * Sample code: IpCommunities_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { IpCommunity resource = manager.ipCommunities() .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4155123341L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("1:1")))) + .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withProperties(new IpCommunityPatchableProperties() + .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1"))))) .apply(); } + + // Use "Map.of" if available + @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; + } } ``` @@ -1811,6 +1895,7 @@ public final class IpCommunitiesUpdateSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; @@ -1821,27 +1906,25 @@ import java.util.Map; */ public final class IpExtendedCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Create.json */ /** * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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", "fakeTokenPlaceholder")) - .withAnnotation("annotation") + .withProperties(new IpExtendedCommunityProperties().withAnnotation("annotation") + .withIpExtendedCommunityRules( + Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345"))))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -1867,17 +1950,15 @@ public final class IpExtendedCommunitiesCreateSamples { */ public final class IpExtendedCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Delete.json */ /** * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities() .delete("example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE); } @@ -1892,17 +1973,15 @@ public final class IpExtendedCommunitiesDeleteSamples { */ public final class IpExtendedCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Get.json */ /** * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities() .getByResourceGroupWithResponse("example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE); @@ -1918,17 +1997,15 @@ public final class IpExtendedCommunitiesGetByResourceGroupSamples { */ public final class IpExtendedCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_ListBySubscription.json */ /** * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); } } @@ -1942,17 +2019,15 @@ public final class IpExtendedCommunitiesListSamples { */ public final class IpExtendedCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_ListByResourceGroup.json */ /** * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -1963,6 +2038,7 @@ public final class IpExtendedCommunitiesListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; @@ -1973,27 +2049,26 @@ import java.util.Map; */ public final class IpExtendedCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Update.json */ /** * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { IpExtendedCommunity resource = manager.ipExtendedCommunities() .getByResourceGroupWithResponse("example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withIpExtendedCommunityRules( - Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4155123341L) - .withRouteTargets(Arrays.asList("1234:2345")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new IpExtendedCommunityPatchProperties().withAnnotation("annotation") + .withIpExtendedCommunityRules( + Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345"))))) .apply(); } @@ -2016,6 +2091,7 @@ public final class IpExtendedCommunitiesUpdateSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; @@ -2026,28 +2102,26 @@ import java.util.Map; */ public final class IpPrefixesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Create.json */ /** * Sample code: IpPrefixes_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipPrefixesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipPrefixesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes() .define("example-ipPrefix") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .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") + .withProperties(new IpPrefixProperties().withAnnotation("annotation") + .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")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -2073,17 +2147,15 @@ public final class IpPrefixesCreateSamples { */ public final class IpPrefixesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Delete.json */ /** * Sample code: IpPrefixes_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipPrefixesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipPrefixesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes().delete("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE); } } @@ -2097,17 +2169,15 @@ public final class IpPrefixesDeleteSamples { */ public final class IpPrefixesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Get.json */ /** * Sample code: IpPrefixes_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void - ipPrefixesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + ipPrefixesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes() .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE); } @@ -2122,17 +2192,15 @@ public final class IpPrefixesGetByResourceGroupSamples { */ public final class IpPrefixesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_ListBySubscription.json */ /** * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipPrefixesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes().list(com.azure.core.util.Context.NONE); } } @@ -2146,17 +2214,15 @@ public final class IpPrefixesListSamples { */ public final class IpPrefixesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_ListByResourceGroup.json */ /** * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipPrefixesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -2168,6 +2234,7 @@ public final class IpPrefixesListByResourceGroupSamples { 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.IpPrefixPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; @@ -2178,28 +2245,26 @@ import java.util.Map; */ public final class IpPrefixesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Update.json */ /** * Sample code: IpPrefixes_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipPrefixesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipPrefixesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { IpPrefix resource = manager.ipPrefixes() .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new IpPrefixPatchProperties().withAnnotation("annotation") + .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")))) .apply(); } @@ -2225,17 +2290,15 @@ public final class IpPrefixesUpdateSamples { */ public final class L2IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_CommitConfiguration.json */ /** * Sample code: L2IsolationDomains_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() .commitConfiguration("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } @@ -2245,6 +2308,8 @@ public final class L2IsolationDomainsCommitConfigurationSamples { ### L2IsolationDomains_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties; import java.util.HashMap; import java.util.Map; @@ -2253,27 +2318,28 @@ import java.util.Map; */ public final class L2IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Create.json */ /** * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withMtu(1500) - .withAnnotation("annotation") + .withProperties(new L2IsolationDomainProperties().withAnnotation("annotation") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withVlanId(501) + .withMtu(1500) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -2299,18 +2365,16 @@ public final class L2IsolationDomainsCreateSamples { */ public final class L2IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Delete.json */ /** * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().delete("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.l2IsolationDomains().delete("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } ``` @@ -2323,19 +2387,17 @@ public final class L2IsolationDomainsDeleteSamples { */ public final class L2IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Get.json */ /** * Sample code: L2IsolationDomains_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void l2IsolationDomainsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + l2IsolationDomainsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } ``` @@ -2348,17 +2410,15 @@ public final class L2IsolationDomainsGetByResourceGroupSamples { */ public final class L2IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_ListBySubscription.json */ /** * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); } } @@ -2372,17 +2432,15 @@ public final class L2IsolationDomainsListSamples { */ public final class L2IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -2392,6 +2450,7 @@ public final class L2IsolationDomainsListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatchProperties; import java.util.HashMap; import java.util.Map; @@ -2400,24 +2459,24 @@ import java.util.Map; */ public final class L2IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Update.json */ /** * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { L2IsolationDomain resource = manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withMtu(6000) - .withAnnotation("annotation1") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new L2IsolationDomainPatchProperties().withAnnotation("annotation1") + .withMtu(6000) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni")) .apply(); } @@ -2447,19 +2506,17 @@ import java.util.Arrays; */ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L2IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() - .updateAdministrativeState("example-rg", "example-l2Domain", + .updateAdministrativeState("example-rg", "example-l2domain", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } @@ -2474,17 +2531,15 @@ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { */ public final class L2IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() .validateConfiguration("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } @@ -2499,17 +2554,15 @@ public final class L2IsolationDomainsValidateConfigurationSamples { */ public final class L3IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_CommitConfiguration.json */ /** * Sample code: L3IsolationDomains_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains() .commitConfiguration("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } @@ -2523,8 +2576,12 @@ 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.L3IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2534,36 +2591,40 @@ import java.util.Map; */ public final class L3IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Create.json */ /** * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .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") + .withProperties(new L3IsolationDomainProperties().withAnnotation("annotation") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .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() + .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"))) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy().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") + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withRoutePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1).withThreshold(90))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -2589,17 +2650,15 @@ public final class L3IsolationDomainsCreateSamples { */ public final class L3IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Delete.json */ /** * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains().delete("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } } @@ -2613,17 +2672,15 @@ public final class L3IsolationDomainsDeleteSamples { */ public final class L3IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Get.json */ /** * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void l3IsolationDomainsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + l3IsolationDomainsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains() .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } @@ -2638,17 +2695,15 @@ public final class L3IsolationDomainsGetByResourceGroupSamples { */ public final class L3IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_ListBySubscription.json */ /** * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); } } @@ -2662,17 +2717,15 @@ public final class L3IsolationDomainsListSamples { */ public final class L3IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -2682,12 +2735,15 @@ public final class L3IsolationDomainsListByResourceGroupSamples { ```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.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2697,34 +2753,37 @@ import java.util.Map; */ public final class L3IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Update.json */ /** * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { L3IsolationDomain resource = manager.l3IsolationDomains() .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key4953", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new L3IsolationDomainPatchProperties().withAnnotation("annotation1") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() + .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 ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().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"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().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"))) + .withRoutePrefixLimit(new RoutePrefixLimitPatchProperties().withHardLimit(28).withThreshold(50))) .apply(); } @@ -2754,17 +2813,15 @@ import java.util.Arrays; */ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L3IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains() .updateAdministrativeState("example-rg", "example-l3domain", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -2781,17 +2838,15 @@ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { */ public final class L3IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains() .validateConfiguration("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } @@ -2802,6 +2857,7 @@ public final class L3IsolationDomainsValidateConfigurationSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2811,27 +2867,25 @@ import java.util.Map; */ public final class NeighborGroupsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Create.json */ /** * Sample code: NeighborGroups_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.neighborGroups() .define("example-neighborGroup") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) - .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") + .withProperties(new NeighborGroupProperties().withAnnotation("annotation") + .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")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -2857,17 +2911,15 @@ public final class NeighborGroupsCreateSamples { */ public final class NeighborGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Delete.json */ /** * Sample code: NeighborGroups_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.neighborGroups().delete("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE); } } @@ -2881,17 +2933,15 @@ public final class NeighborGroupsDeleteSamples { */ public final class NeighborGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Get.json */ /** * Sample code: NeighborGroups_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.neighborGroups() .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE); } @@ -2906,17 +2956,15 @@ public final class NeighborGroupsGetByResourceGroupSamples { */ public final class NeighborGroupsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_ListBySubscription.json */ /** * Sample code: NeighborGroups_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void neighborGroupsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.neighborGroups().list(com.azure.core.util.Context.NONE); } } @@ -2930,17 +2978,15 @@ public final class NeighborGroupsListSamples { */ public final class NeighborGroupsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_ListByResourceGroup.json */ /** * Sample code: NeighborGroups_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void neighborGroupsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.neighborGroups().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -2950,7 +2996,8 @@ public final class NeighborGroupsListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -2960,27 +3007,25 @@ import java.util.Map; */ public final class NeighborGroupsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Update.json */ /** * Sample code: NeighborGroups_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NeighborGroup resource = manager.neighborGroups() .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new NeighborGroupPatchProperties().withAnnotation("Updating") + .withDestination(new NeighborGroupDestinationPatch() + .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")))) .apply(); } @@ -3006,17 +3051,15 @@ public final class NeighborGroupsUpdateSamples { */ public final class NetworkDeviceSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDeviceSkus_Get.json */ /** * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDeviceSkusGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDeviceSkusGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDeviceSkus().getWithResponse("example-deviceSku", com.azure.core.util.Context.NONE); } } @@ -3030,17 +3073,15 @@ public final class NetworkDeviceSkusGetSamples { */ public final class NetworkDeviceSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDeviceSkus_ListBySubscription.json */ /** * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDeviceSkusListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); } } @@ -3049,6 +3090,7 @@ public final class NetworkDeviceSkusListSamples { ### NetworkDevices_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties; import java.util.HashMap; import java.util.Map; @@ -3057,26 +3099,24 @@ import java.util.Map; */ public final class NetworkDevicesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Create.json */ /** * Sample code: NetworkDevices_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .define("example-device") .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withNetworkDeviceSku("DeviceSku") - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") - .withAnnotation("annotation") + .withProperties(new NetworkDeviceProperties().withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withNetworkDeviceSku("DeviceSku")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } @@ -3102,17 +3142,15 @@ public final class NetworkDevicesCreateSamples { */ public final class NetworkDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Delete.json */ /** * Sample code: NetworkDevices_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); } } @@ -3126,17 +3164,15 @@ public final class NetworkDevicesDeleteSamples { */ public final class NetworkDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Get.json */ /** * Sample code: NetworkDevices_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE); } @@ -3151,17 +3187,15 @@ public final class NetworkDevicesGetByResourceGroupSamples { */ public final class NetworkDevicesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_ListBySubscription.json */ /** * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices().list(com.azure.core.util.Context.NONE); } } @@ -3175,17 +3209,15 @@ public final class NetworkDevicesListSamples { */ public final class NetworkDevicesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_ListByResourceGroup.json */ /** * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -3202,17 +3234,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.RebootType; */ public final class NetworkDevicesRebootSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Reboot_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Reboot.json */ /** * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesRebootMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesRebootMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .reboot("example-rg", "example-device", new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITH_ZTP), @@ -3229,26 +3259,77 @@ public final class NetworkDevicesRebootSamples { */ public final class NetworkDevicesRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_RefreshConfiguration.json */ /** * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesRefreshConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices().refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` +### NetworkDevices_RunRoCommand + +```java +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; + +/** + * Samples for NetworkDevices RunRoCommand. + */ +public final class NetworkDevicesRunRoCommandSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_RunRoCommand.json + */ + /** + * Sample code: NetworkDevices_RunRoCommand_MaximumSet_Gen. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkDevicesRunRoCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkDevices() + .runRoCommand("example-rg", "example-device", new DeviceRoCommand().withCommand("show version"), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkDevices_RunRwCommand + +```java +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; + +/** + * Samples for NetworkDevices RunRwCommand. + */ +public final class NetworkDevicesRunRwCommandSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_RunRwCommand.json + */ + /** + * Sample code: NetworkDevices_RunRwCommand_MaximumSet_Gen. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkDevicesRunRwCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkDevices() + .runRwCommand("example-rg", "example-device", new DeviceRwCommand().withCommand("yzuabghycngqmqtfacvoh"), + com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkDevices_Update ```java import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParametersProperties; import java.util.HashMap; import java.util.Map; @@ -3257,25 +3338,23 @@ import java.util.Map; */ public final class NetworkDevicesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Update.json */ /** * Sample code: NetworkDevices_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkDevice resource = manager.networkDevices() .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") - .withAnnotation("annotation") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkDevicePatchParametersProperties().withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX")) .apply(); } @@ -3305,17 +3384,15 @@ import java.util.Arrays; */ public final class NetworkDevicesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_UpdateAdministrativeState.json */ /** * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .updateAdministrativeState("example-rg", "example-device", new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList("")) @@ -3335,17 +3412,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; */ public final class NetworkDevicesUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Upgrade.json */ /** * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesUpgradeMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesUpgradeMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .upgrade("example-rg", "example-device", new UpdateVersion().withVersion("1.0.0"), com.azure.core.util.Context.NONE); @@ -3359,46 +3434,60 @@ public final class NetworkDevicesUpgradeSamples { 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.NetworkFabricControllerProperties; import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for NetworkFabricControllers Create. */ public final class NetworkFabricControllersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Create.json */ /** * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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") + .withProperties(new NetworkFabricControllerProperties().withAnnotation("annotation") + .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"))) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) + .withIpv4AddressSpace("172.253.0.0/19") + .withIpv6AddressSpace("::/60") + .withNfcSku(NfcSku.STANDARD)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } + + // Use "Map.of" if available + @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; + } } ``` @@ -3410,17 +3499,15 @@ public final class NetworkFabricControllersCreateSamples { */ public final class NetworkFabricControllersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Delete.json */ /** * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers() .delete("example-rg", "example-networkController", com.azure.core.util.Context.NONE); } @@ -3435,17 +3522,15 @@ public final class NetworkFabricControllersDeleteSamples { */ public final class NetworkFabricControllersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Get.json */ /** * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers() .getByResourceGroupWithResponse("example-rg", "example-networkController", com.azure.core.util.Context.NONE); @@ -3461,17 +3546,15 @@ public final class NetworkFabricControllersGetByResourceGroupSamples { */ public final class NetworkFabricControllersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_ListBySubscription.json */ /** * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); } } @@ -3485,17 +3568,15 @@ public final class NetworkFabricControllersListSamples { */ public final class NetworkFabricControllersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_ListByResourceGroup.json */ /** * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -3506,38 +3587,52 @@ public final class NetworkFabricControllersListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatchProperties; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for NetworkFabricControllers Update. */ public final class NetworkFabricControllersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Update.json */ /** * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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( + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkFabricControllerPatchProperties().withInfrastructureExpressRouteConnections( + Arrays.asList(new ExpressRouteConnectionInformation().withExpressRouteCircuitId( "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .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(); } + + // Use "Map.of" if available + @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; + } } ``` @@ -3549,18 +3644,16 @@ public final class NetworkFabricControllersUpdateSamples { */ public final class NetworkFabricSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricSkus_Get.json */ /** * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricSkusGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().getWithResponse("example-fabricsku", com.azure.core.util.Context.NONE); + public static void + networkFabricSkusGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabricSkus().getWithResponse("wxample-fabricsku", com.azure.core.util.Context.NONE); } } ``` @@ -3573,22 +3666,68 @@ public final class NetworkFabricSkusGetSamples { */ public final class NetworkFabricSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricSkus_ListBySubscription.json */ /** * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricSkusListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); } } ``` +### NetworkFabrics_ArmConfigurationDiff + +```java +/** + * Samples for NetworkFabrics ArmConfigurationDiff. + */ +public final class NetworkFabricsArmConfigurationDiffSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ArmConfigurationDiff.json + */ + /** + * Sample code: NetworkFabrics_ArmConfigurationDiff_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkFabricsArmConfigurationDiffMaximumSet( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics().armConfigurationDiff("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_CommitBatchStatus + +```java +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; + +/** + * Samples for NetworkFabrics CommitBatchStatus. + */ +public final class NetworkFabricsCommitBatchStatusSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_CommitBatchStatus.json + */ + /** + * Sample code: NetworkFabrics_CommitBatchStatus_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkFabricsCommitBatchStatusMaximumSet( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .commitBatchStatus("example-rg", "example-fabric", + new CommitBatchStatusRequest().withCommitBatchId("batch-id"), com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkFabrics_CommitConfiguration ```java @@ -3597,18 +3736,17 @@ public final class NetworkFabricSkusListSamples { */ public final class NetworkFabricsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_CommitConfiguration.json */ /** * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().commitConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .commitConfiguration("example-rg", "example-networkFabric", com.azure.core.util.Context.NONE); } } ``` @@ -3617,13 +3755,23 @@ public final class NetworkFabricsCommitConfigurationSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -3633,80 +3781,101 @@ import java.util.Map; */ public final class NetworkFabricsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Create.json */ /** * Sample code: NetworkFabrics_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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", "fakeTokenPlaceholder")) - .withFabricVersion("1.x.x") - .withRackCount(4) - .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") - .withAnnotation("annotation") - .create(); - } - - // Use "Map.of" if available + .withProperties(new NetworkFabricProperties().withAnnotation("annotation") + .withNetworkFabricSku("M4-A400-A100-C16-aa") + .withFabricVersion("version1") + .withStorageAccountConfiguration(new StorageAccountConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withNetworkFabricControllerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController") + .withRackCount(4) + .withServerCountPerRack(8) + .withIpv4Prefix("10.18.0.0/19") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .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("40.0.0.14/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 VpnOptionBProperties().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 VpnOptionAProperties().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 VpnOptionBProperties().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 VpnOptionAProperties().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")))) + .withHardwareAlertThreshold(74) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED)) + .withStorageArrayCount(1)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) + .create(); + } + + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3728,17 +3897,15 @@ public final class NetworkFabricsCreateSamples { */ public final class NetworkFabricsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Delete.json */ /** * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().delete("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } @@ -3752,22 +3919,46 @@ public final class NetworkFabricsDeleteSamples { */ public final class NetworkFabricsDeprovisionSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_deprovision_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Deprovision.json */ /** - * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. + * Sample code: NetworkFabrics_Deprovision_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsDeprovisionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().deprovision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` +### NetworkFabrics_DiscardCommitBatch + +```java +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; + +/** + * Samples for NetworkFabrics DiscardCommitBatch. + */ +public final class NetworkFabricsDiscardCommitBatchSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_DiscardCommitBatch.json + */ + /** + * Sample code: NetworkFabrics_DiscardCommitBatch. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkFabricsDiscardCommitBatch(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .discardCommitBatch("example-rg", "example-fabric", + new DiscardCommitBatchRequest().withCommitBatchId("batchId1"), com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkFabrics_GetByResourceGroup ```java @@ -3776,17 +3967,15 @@ public final class NetworkFabricsDeprovisionSamples { */ public final class NetworkFabricsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Get.json */ /** * Sample code: NetworkFabrics_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } @@ -3801,17 +3990,15 @@ public final class NetworkFabricsGetByResourceGroupSamples { */ public final class NetworkFabricsGetTopologySamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_GetTopology_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_GetTopology.json */ /** * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsGetTopologyMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().getTopology("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } @@ -3825,17 +4012,15 @@ public final class NetworkFabricsGetTopologySamples { */ public final class NetworkFabricsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ListBySubscription.json */ /** * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().list(com.azure.core.util.Context.NONE); } } @@ -3849,22 +4034,50 @@ public final class NetworkFabricsListSamples { */ public final class NetworkFabricsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ListByResourceGroup.json */ /** * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` +### NetworkFabrics_LockFabric + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; + +/** + * Samples for NetworkFabrics LockFabric. + */ +public final class NetworkFabricsLockFabricSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_LockFabric.json + */ + /** + * Sample code: NetworkFabrics_LockFabric_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkFabricsLockFabricMaximumSet(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .lockFabric("example-rg", "example-networkFabric", + new NetworkFabricLockRequest().withLockType(NetworkFabricLockType.ADMINISTRATIVE) + .withAction(NetworkFabricLockAction.LOCK), + com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkFabrics_Provision ```java @@ -3873,17 +4086,15 @@ public final class NetworkFabricsListByResourceGroupSamples { */ public final class NetworkFabricsProvisionSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_provision_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Provision.json */ /** - * Sample code: NetworkFabrics_provision_MaximumSet_Gen. + * Sample code: NetworkFabrics_Provision_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsProvisionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsProvisionMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().provision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } @@ -3897,17 +4108,15 @@ public final class NetworkFabricsProvisionSamples { */ public final class NetworkFabricsRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_RefreshConfiguration.json */ /** - * Sample code: NetworkFabrics_refreshConfiguration_MaximumSet_Gen. + * Sample code: NetworkFabrics_RefreshConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsRefreshConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().refreshConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } @@ -3916,15 +4125,25 @@ public final class NetworkFabricsRefreshConfigurationSamples { ### NetworkFabrics_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; 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.NetworkFabricPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -3934,75 +4153,93 @@ import java.util.Map; */ public final class NetworkFabricsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Update.json */ /** * Sample code: NetworkFabrics_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkFabric resource = manager.networkFabrics() .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withRackCount(6) - .withServerCountPerRack(10) - .withIpv4Prefix("10.18.0.0/17") - .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") - .withFabricAsn(12345L) - .withTerminalServerConfiguration( - new NetworkFabricPatchablePropertiesTerminalServerConfiguration().withUsername("username1") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkFabricPatchProperties().withAnnotation("annotation1") + .withRackCount(6) + .withServerCountPerRack(10) + .withIpv4Prefix("10.18.0.0/17") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") + .withFabricASN(12345L) + .withStorageAccountConfiguration(new StorageAccountPatchConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withTerminalServerConfiguration(new TerminalServerPatchConfiguration().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") + .withManagementNetworkConfiguration(new ManagementNetworkPatchConfiguration() + .withInfrastructureVpnConfiguration(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 VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(1501) + .withVlanId(3001) + .withPeerASN(1235L) + .withBfdConfiguration( + new BfdPatchConfiguration().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 VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(1500) + .withVlanId(3000) + .withPeerASN(61234L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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")))) + .withHardwareAlertThreshold(43) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherPatchProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED))) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) .apply(); } @@ -4032,17 +4269,15 @@ import java.util.Arrays; */ public final class NetworkFabricsUpdateInfraManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_UpdateInfraManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsUpdateInfraManagementBfdConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .updateInfraManagementBfdConfiguration("example-rg", "example-fabric", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -4063,17 +4298,15 @@ import java.util.Arrays; */ public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .updateWorkloadManagementBfdConfiguration("example-rg", "example-fabric", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -4093,17 +4326,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabri */ public final class NetworkFabricsUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Upgrade.json */ /** - * Sample code: NetworkFabrics_upgrade_MaximumSet_Gen. + * Sample code: NetworkFabrics_Upgrade_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsUpgradeMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsUpgradeMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .upgrade("example-rg", "example-fabric", new UpgradeNetworkFabricProperties().withVersion("3.x.x").withAction(NetworkFabricUpgradeAction.START), @@ -4123,17 +4354,15 @@ import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurati */ public final class NetworkFabricsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ValidateConfiguration.json */ /** * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .validateConfiguration("example-rg", "example-fabric", new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING), @@ -4142,29 +4371,54 @@ public final class NetworkFabricsValidateConfigurationSamples { } ``` +### NetworkFabrics_ViewDeviceConfiguration + +```java +/** + * Samples for NetworkFabrics ViewDeviceConfiguration. + */ +public final class NetworkFabricsViewDeviceConfigurationSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ViewDeviceConfiguration.json + */ + /** + * Sample code: NetworkFabrics_ViewDeviceConfiguration_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkFabricsViewDeviceConfigurationMaximumSet( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .viewDeviceConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkInterfaces_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties; + /** * Samples for NetworkInterfaces Create. */ public final class NetworkInterfacesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Create.json */ /** * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkInterfacesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .define("example-interface") .withExistingNetworkDevice("example-rg", "example-device") - .withAnnotation("annotation") + .withProperties(new NetworkInterfaceProperties().withAnnotation("annotation") + .withDescription("device 1") + .withAdditionalDescription("device 1")) .create(); } } @@ -4178,18 +4432,17 @@ public final class NetworkInterfacesCreateSamples { */ public final class NetworkInterfacesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Delete.json */ /** * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces().delete("rgNetworkDevices", "sjzd", "emrgu", com.azure.core.util.Context.NONE); + public static void + networkInterfacesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkInterfaces() + .delete("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } } ``` @@ -4202,17 +4455,15 @@ public final class NetworkInterfacesDeleteSamples { */ public final class NetworkInterfacesGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Get.json */ /** * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkInterfacesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } @@ -4227,17 +4478,15 @@ public final class NetworkInterfacesGetSamples { */ public final class NetworkInterfacesListByNetworkDeviceSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_ListByNetworkDevice.json */ /** * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkInterfacesListByNetworkDeviceMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .listByNetworkDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); } @@ -4248,27 +4497,30 @@ public final class NetworkInterfacesListByNetworkDeviceSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatchProperties; /** * Samples for NetworkInterfaces Update. */ public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Update.json */ /** * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkInterfacesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkInterface resource = manager.networkInterfaces() .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withAnnotation("annotation").apply(); + resource.update() + .withProperties(new NetworkInterfacePatchProperties().withAnnotation("annotation") + .withDescription("device 1") + .withAdditionalDescription("device 1")) + .apply(); } } ``` @@ -4285,17 +4537,15 @@ import java.util.Arrays; */ public final class NetworkInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_UpdateAdministrativeState.json */ /** * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .updateAdministrativeState("example-rg", "example-device", "example-interface", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -4304,9 +4554,262 @@ public final class NetworkInterfacesUpdateAdministrativeStateSamples { } ``` +### NetworkMonitors_Create + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkMonitors Create. + */ +public final class NetworkMonitorsCreateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Create.json + */ + /** + * Sample code: NetworkMonitors_Create. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkMonitorsCreate(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors() + .define("example-monitor") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withProperties(new NetworkMonitorProperties().withAnnotation("annotation") + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(62695) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST)))) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .create(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### NetworkMonitors_Delete + +```java +/** + * Samples for NetworkMonitors Delete. + */ +public final class NetworkMonitorsDeleteSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Delete.json + */ + /** + * Sample code: NetworkMonitors_Delete_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsDeleteMaximumSet(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors().delete("rgmanagednetworkfabric", "example-monitor", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkMonitors_GetByResourceGroup + +```java +/** + * Samples for NetworkMonitors GetByResourceGroup. + */ +public final class NetworkMonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Get.json + */ + /** + * Sample code: NetworkMonitors_Get_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsGetMaximumSet(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkMonitors_List + +```java +/** + * Samples for NetworkMonitors List. + */ +public final class NetworkMonitorsListSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_ListBySubscription.json + */ + /** + * Sample code: NetworkMonitors_ListBySubscription. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsListBySubscription(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkMonitors_ListByResourceGroup + +```java +/** + * Samples for NetworkMonitors ListByResourceGroup. + */ +public final class NetworkMonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_ListByResourceGroup.json + */ + /** + * Sample code: NetworkMonitors_ListByResourceGroup. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsListByResourceGroup(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkMonitors_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkMonitors Update. + */ +public final class NetworkMonitorsUpdateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Update.json + */ + /** + * Sample code: NetworkMonitors_Update. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkMonitorsUpdate(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + NetworkMonitor resource = manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties(new NetworkMonitorPatchProperties().withBmpConfiguration( + new BmpConfigurationPatchProperties().withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(64685) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST)))) + .apply(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### NetworkMonitors_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** + * Samples for NetworkMonitors UpdateAdministrativeState. + */ +public final class NetworkMonitorsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_UpdateAdministrativeState.json + */ + /** + * Sample code: NetworkMonitors_UpdateAdministrativeState. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkMonitorsUpdateAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors() + .updateAdministrativeState("example-rg", "example-monitor", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkPacketBrokers_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; import java.util.HashMap; import java.util.Map; @@ -4315,24 +4818,22 @@ import java.util.Map; */ public final class NetworkPacketBrokersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Create.json */ /** * Sample code: NetworkPacketBrokers_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) + .withProperties(new NetworkPacketBrokerProperties().withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } @@ -4358,17 +4859,15 @@ public final class NetworkPacketBrokersCreateSamples { */ public final class NetworkPacketBrokersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Delete.json */ /** * Sample code: NetworkPacketBrokers_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkPacketBrokers() .delete("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE); } @@ -4383,17 +4882,15 @@ public final class NetworkPacketBrokersDeleteSamples { */ public final class NetworkPacketBrokersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Get.json */ /** * Sample code: NetworkPacketBrokers_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkPacketBrokersGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkPacketBrokersGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkPacketBrokers() .getByResourceGroupWithResponse("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE); @@ -4409,17 +4906,15 @@ public final class NetworkPacketBrokersGetByResourceGroupSamples { */ public final class NetworkPacketBrokersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_ListBySubscription.json */ /** * Sample code: NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkPacketBrokers().list(com.azure.core.util.Context.NONE); } } @@ -4433,17 +4928,15 @@ public final class NetworkPacketBrokersListSamples { */ public final class NetworkPacketBrokersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_ListByResourceGroup.json */ /** * Sample code: NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkPacketBrokers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -4461,22 +4954,20 @@ import java.util.Map; */ public final class NetworkPacketBrokersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Update.json */ /** * Sample code: NetworkPacketBrokers_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkPacketBroker resource = manager.networkPacketBrokers() .getByResourceGroupWithResponse("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key8772", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("keyId", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -4496,6 +4987,7 @@ public final class NetworkPacketBrokersUpdateSamples { ### NetworkRacks_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.util.HashMap; import java.util.Map; @@ -4505,26 +4997,24 @@ import java.util.Map; */ public final class NetworkRacksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Create.json */ /** * Sample code: NetworkRacks_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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", "fakeTokenPlaceholder")) - .withNetworkRackType(NetworkRackType.AGGREGATE) - .withAnnotation("annotation") + .withProperties(new NetworkRackProperties().withAnnotation("annotation") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } @@ -4550,17 +5040,15 @@ public final class NetworkRacksCreateSamples { */ public final class NetworkRacksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Delete.json */ /** * Sample code: NetworkRacks_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkRacks().delete("example-rg", "example-rack", com.azure.core.util.Context.NONE); } } @@ -4574,17 +5062,15 @@ public final class NetworkRacksDeleteSamples { */ public final class NetworkRacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Get.json */ /** * Sample code: NetworkRacks_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkRacks() .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE); } @@ -4599,17 +5085,15 @@ public final class NetworkRacksGetByResourceGroupSamples { */ public final class NetworkRacksListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_ListBySubscription.json */ /** * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkRacksListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkRacks().list(com.azure.core.util.Context.NONE); } } @@ -4623,17 +5107,15 @@ public final class NetworkRacksListSamples { */ public final class NetworkRacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_ListByResourceGroup.json */ /** * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkRacksListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkRacks().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -4651,21 +5133,19 @@ import java.util.Map; */ public final class NetworkRacksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Update.json */ /** * Sample code: NetworkRacks_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkRack resource = manager.networkRacks() .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("keyID", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("keyId", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -4689,13 +5169,15 @@ 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.GlobalNetworkTapRuleActionProperties; +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.NetworkTapRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; @@ -4714,62 +5196,61 @@ import java.util.Map; */ public final class NetworkTapRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Create.json */ /** * Sample code: NetworkTapRules_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules() .define("example-tapRule") - .withRegion("eastus") + .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .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") + .withProperties( + new NetworkTapRuleProperties().withAnnotation("annotation") + .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("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"))) + .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-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")))))) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.THIRTY) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name"))) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } @@ -4795,17 +5276,15 @@ public final class NetworkTapRulesCreateSamples { */ public final class NetworkTapRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Delete.json */ /** * Sample code: NetworkTapRules_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules().delete("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } } @@ -4819,17 +5298,15 @@ public final class NetworkTapRulesDeleteSamples { */ public final class NetworkTapRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Get.json */ /** * Sample code: NetworkTapRules_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules() .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } @@ -4844,17 +5321,15 @@ public final class NetworkTapRulesGetByResourceGroupSamples { */ public final class NetworkTapRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_ListBySubscription.json */ /** * Sample code: NetworkTapRules_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules().list(com.azure.core.util.Context.NONE); } } @@ -4868,17 +5343,15 @@ public final class NetworkTapRulesListSamples { */ public final class NetworkTapRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_ListByResourceGroup.json */ /** * Sample code: NetworkTapRules_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -4892,17 +5365,15 @@ public final class NetworkTapRulesListByResourceGroupSamples { */ public final class NetworkTapRulesResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Resync.json */ /** * Sample code: NetworkTapRules_Resync_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesResyncMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesResyncMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules().resync("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } } @@ -4912,25 +5383,27 @@ public final class NetworkTapRulesResyncSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; 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.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; 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.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -4940,59 +5413,59 @@ import java.util.Map; */ public final class NetworkTapRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Update.json */ /** * Sample code: NetworkTapRules_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkTapRule resource = manager.networkTapRules() .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("https://microsoft.com/amdsdx") - .withMatchConfigurations( - Arrays - .asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("config1") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkTapRulePatchProperties().withAnnotation("annotation") + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("https://microsoft.com/amdsdx") + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name")) + .withMatchConfigurations( + Arrays.asList(new NetworkTapRuleMatchConfigurationPatch().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) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays + .asList(new NetworkTapRuleMatchConditionPatch().withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("100")) + .withPortGroupNames(Arrays.asList("example-portGroup1"))))) + .withActions(Arrays.asList(new NetworkTapRuleActionPatch().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")))))) - .withAnnotation("annotation") + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("example-portGroup") + .withPorts(Arrays.asList("100-200"))))))) .apply(); } @@ -5022,17 +5495,15 @@ import java.util.Arrays; */ public final class NetworkTapRulesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_UpdateAdministrativeState.json */ /** * Sample code: NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules() .updateAdministrativeState("example-rg", "example-tapRule", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -5049,17 +5520,15 @@ public final class NetworkTapRulesUpdateAdministrativeStateSamples { */ public final class NetworkTapRulesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_ValidateConfiguration.json */ /** * Sample code: NetworkTapRules_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules() .validateConfiguration("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } @@ -5069,10 +5538,11 @@ public final class NetworkTapRulesValidateConfigurationSamples { ### NetworkTaps_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; 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.NetworkTapProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import java.util.HashMap; @@ -5083,36 +5553,33 @@ import java.util.Map; */ public final class NetworkTapsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Create.json */ /** * Sample code: NetworkTaps_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withPollingType(PollingType.PULL) - .withAnnotation("annotation") + .withProperties(new NetworkTapProperties().withAnnotation("annotation") + .withNetworkPacketBrokerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker") + .withDestinations(Arrays.asList(new DestinationProperties().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"))) + .withPollingType(PollingType.PULL)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } @@ -5138,17 +5605,15 @@ public final class NetworkTapsCreateSamples { */ public final class NetworkTapsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Delete.json */ /** * Sample code: NetworkTaps_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps().delete("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); } } @@ -5162,17 +5627,15 @@ public final class NetworkTapsDeleteSamples { */ public final class NetworkTapsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Get.json */ /** * Sample code: NetworkTaps_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps() .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); } @@ -5187,17 +5650,15 @@ public final class NetworkTapsGetByResourceGroupSamples { */ public final class NetworkTapsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_ListBySubscription.json */ /** * Sample code: NetworkTaps_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps().list(com.azure.core.util.Context.NONE); } } @@ -5211,17 +5672,15 @@ public final class NetworkTapsListSamples { */ public final class NetworkTapsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_ListByResourceGroup.json */ /** * Sample code: NetworkTaps_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -5235,17 +5694,15 @@ public final class NetworkTapsListByResourceGroupSamples { */ public final class NetworkTapsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Resync.json */ /** * Sample code: NetworkTaps_Resync_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsResyncMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsResyncMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps().resync("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); } } @@ -5254,11 +5711,12 @@ public final class NetworkTapsResyncSamples { ### NetworkTaps_Update ```java +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; 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.IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import java.util.HashMap; @@ -5269,34 +5727,32 @@ import java.util.Map; */ public final class NetworkTapsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Update.json */ /** * Sample code: NetworkTaps_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkTap resource = manager.networkTaps() .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key6024", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkTapPatchProperties().withAnnotation("annotation1") + .withPollingType(PollingType.PULL) + .withDestinations(Arrays.asList(new DestinationPatchProperties().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 IsolationDomainPatchProperties() + .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")))) .apply(); } @@ -5326,17 +5782,15 @@ import java.util.Arrays; */ public final class NetworkTapsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_UpdateAdministrativeState.json */ /** * Sample code: NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps() .updateAdministrativeState("example-rg", "example-networkTap", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -5349,14 +5803,21 @@ public final class NetworkTapsUpdateAdministrativeStateSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; 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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; 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.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; @@ -5365,51 +5826,63 @@ import java.util.Arrays; */ public final class NetworkToNetworkInterconnectsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Create.json */ /** * Sample code: NetworkToNetworkInterconnects_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() .define("example-nni") - .withExistingNetworkFabric("example-rg", "example-fabric") - .withUseOptionB(BooleanEnumProperty.TRUE) - .withNniType(NniType.CE) - .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") + .withExistingNetworkFabric("example-rg", "example-nf") + .withProperties(new NetworkToNetworkInterconnectProperties().withNniType(NniType.CE) + .withIsManagementType(IsManagementType.TRUE) + .withUseOptionB(BooleanEnumProperty.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 OptionBLayer3Configuration().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) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(24)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) + .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") + .withMicroBfdState(MicroBfdState.ENABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("fe08:00/64").withNextHop(Arrays.asList("fe01::1")))))) .create(); } } @@ -5423,19 +5896,17 @@ public final class NetworkToNetworkInterconnectsCreateSamples { */ public final class NetworkToNetworkInterconnectsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Delete.json */ /** * Sample code: NetworkToNetworkInterconnects_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .delete("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE); } } ``` @@ -5448,19 +5919,17 @@ public final class NetworkToNetworkInterconnectsDeleteSamples { */ public final class NetworkToNetworkInterconnectsGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Get.json */ /** * Sample code: NetworkToNetworkInterconnects_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-nf", "example-nni", com.azure.core.util.Context.NONE); } } ``` @@ -5473,19 +5942,17 @@ public final class NetworkToNetworkInterconnectsGetSamples { */ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_ListByNetworkFabric.json */ /** * Sample code: NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsListByNetworkFabricMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .listByNetworkFabric("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + .listByNetworkFabric("example-rg", "example-nf", com.azure.core.util.Context.NONE); } } ``` @@ -5493,14 +5960,20 @@ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { ### 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; 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 com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; import java.util.Arrays; /** @@ -5508,48 +5981,62 @@ import java.util.Arrays; */ public final class NetworkToNetworkInterconnectsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Update.json */ /** * Sample code: NetworkToNetworkInterconnects_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkToNetworkInterconnect resource = manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-nf", "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") + .withProperties(new NetworkToNetworkInterconnectPatchProperties() + .withLayer2Configuration(new Layer2ConfigurationPatch().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 OptionBLayer3ConfigurationPatchProperties().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) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration( + new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("10.0.0.1/24") + .withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("fe80::/64") + .withNextHop(Arrays.asList("fe80::1"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("10.0.0.1").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("2fff::/64") + .withNextHop(Arrays.asList("3ffe::1"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().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 ExportRoutePolicyInformationPatch().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") + .withMicroBfdState(MicroBfdState.ENABLED)) .apply(); } } @@ -5567,51 +6054,48 @@ import java.util.Arrays; */ public final class NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_UpdateAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .updateAdministrativeState("example-rg", "example-fabric", "example-nni", + .updateAdministrativeState("example-rg", "example-nf", "example-nni", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState +### NetworkToNetworkInterconnects_UpdateBfdAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; /** - * Samples for NetworkToNetworkInterconnects UpdateNpbStaticRouteBfdAdministrativeState. + * Samples for NetworkToNetworkInterconnects UpdateBfdAdministrativeState. */ -public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState { +public final class NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_UpdateBfdAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateBfdAdministrativeState. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void networkToNetworkInterconnectsUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .updateNpbStaticRouteBfdAdministrativeState("example-rg", "example-fabric", "example-nni", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBfdAdministrativeState("example-rg", "example-nf", "example-nni", + new NniBfdAdministrativeStateRequest().withRouteType(RouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("Enable")), com.azure.core.util.Context.NONE); } } @@ -5625,17 +6109,15 @@ public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministr */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ListOperations.json + * x-ms-original-file: 2024-06-15-preview/Operations_List.json */ /** - * Sample code: ListOperations. + * Sample code: Operations_List_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void - listOperations(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + operationsListMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } @@ -5649,17 +6131,15 @@ public final class OperationsListSamples { */ public final class RoutePoliciesCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_CommitConfiguration.json */ /** * Sample code: RoutePolicies_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .commitConfiguration("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } @@ -5677,6 +6157,7 @@ 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.RoutePolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -5689,52 +6170,50 @@ import java.util.Map; */ public final class RoutePoliciesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Create.json */ /** * Sample code: RoutePolicies_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .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", "fakeTokenPlaceholder")) - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) - .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"))))))) - .withAnnotation("annotation") + .withProperties(new RoutePolicyProperties().withAnnotation("annotation") + .withDefaultAction(CommunityActionTypes.PERMIT) + .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")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) + .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"))))))) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withAddressFamilyType(AddressFamilyType.IPV4)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } @@ -5760,17 +6239,15 @@ public final class RoutePoliciesCreateSamples { */ public final class RoutePoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Delete.json */ /** * Sample code: RoutePolicies_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies().delete("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } } @@ -5784,17 +6261,15 @@ public final class RoutePoliciesDeleteSamples { */ public final class RoutePoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Get.json */ /** * Sample code: RoutePolicies_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } @@ -5809,17 +6284,15 @@ public final class RoutePoliciesGetByResourceGroupSamples { */ public final class RoutePoliciesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_ListBySubscription.json */ /** * Sample code: RoutePolicies_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies().list(com.azure.core.util.Context.NONE); } } @@ -5833,17 +6306,15 @@ public final class RoutePoliciesListSamples { */ public final class RoutePoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_ListByResourceGroup.json */ /** * Sample code: RoutePolicies_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } @@ -5852,17 +6323,18 @@ 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.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; 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.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 com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5872,48 +6344,46 @@ import java.util.Map; */ public final class RoutePoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Update.json */ /** * Sample code: RoutePolicies_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { RoutePolicy resource = manager.routePolicies() .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withDefaultAction(CommunityActionTypes.DENY) - .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"))))))) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new RoutePolicyPatchableProperties().withDefaultAction(CommunityActionTypes.PERMIT) + .withStatements(Arrays.asList(new RoutePolicyStatementPatchProperties().withAnnotation("annotation") + .withSequenceNumber(7L) + .withCondition(new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) + .withAction(new StatementActionPatchProperties().withLocalPreference(20L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .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 ActionIpExtendedCommunityPatchProperties() + .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(); } @@ -5943,17 +6413,15 @@ import java.util.Arrays; */ public final class RoutePoliciesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_UpdateAdministrativeState.json */ /** * Sample code: RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .updateAdministrativeState("example-rg", "example-routePolicy", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), @@ -5970,17 +6438,15 @@ public final class RoutePoliciesUpdateAdministrativeStateSamples { */ public final class RoutePoliciesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_ValidateConfiguration.json */ /** * Sample code: RoutePolicies_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 2804dc7d0486..0c12a31bffa8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.2.0-beta.1 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-06-15. + Microsoft Azure SDK for fileshares Management + This package contains Microsoft Azure SDK for fileshares 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 api-version 2024-06-15-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,6 @@ UTF-8 0 0 - false true 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/FilesharesManager.java similarity index 89% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/FilesharesManager.java index 1967b45ba68b..29a4af573f2e 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/FilesharesManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric; @@ -22,11 +22,12 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.fluent.AzureNetworkFabricManagementServiceApi; +import com.azure.resourcemanager.managednetworkfabric.fluent.FilesharesManagementClient; import com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsImpl; -import com.azure.resourcemanager.managednetworkfabric.implementation.AzureNetworkFabricManagementServiceApiBuilder; import com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.FilesharesManagementClientBuilder; import com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysImpl; @@ -42,6 +43,7 @@ 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.NetworkMonitorsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesImpl; @@ -66,6 +68,7 @@ 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.NetworkMonitors; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokers; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacks; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRules; @@ -77,20 +80,23 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** - * Entry point to ManagedNetworkFabricManager. + * Entry point to FilesharesManager. * Self service experience for Azure Network Fabric API. */ -public final class ManagedNetworkFabricManager { - private AccessControlLists accessControlLists; +public final class FilesharesManager { + private Operations operations; - private InternetGateways internetGateways; + private AccessControlLists accessControlLists; private InternetGatewayRules internetGatewayRules; + private InternetGateways internetGateways; + private IpCommunities ipCommunities; private IpExtendedCommunities ipExtendedCommunities; @@ -129,16 +135,16 @@ public final class ManagedNetworkFabricManager { private NetworkTaps networkTaps; - private Operations operations; - private RoutePolicies routePolicies; - private final AzureNetworkFabricManagementServiceApi clientObject; + private NetworkMonitors networkMonitors; - private ManagedNetworkFabricManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + private final FilesharesManagementClient clientObject; + + private FilesharesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureNetworkFabricManagementServiceApiBuilder().pipeline(httpPipeline) + this.clientObject = new FilesharesManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -146,38 +152,38 @@ private ManagedNetworkFabricManager(HttpPipeline httpPipeline, AzureProfile prof } /** - * Creates an instance of Managed Network Fabric service API entry point. + * Creates an instance of fileshares service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the Managed Network Fabric service API instance. + * @return the fileshares service API instance. */ - public static ManagedNetworkFabricManager authenticate(TokenCredential credential, AzureProfile profile) { + public static FilesharesManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); return configure().authenticate(credential, profile); } /** - * Creates an instance of Managed Network Fabric service API entry point. + * Creates an instance of fileshares service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the Managed Network Fabric service API instance. + * @return the fileshares service API instance. */ - public static ManagedNetworkFabricManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + public static FilesharesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ManagedNetworkFabricManager(httpPipeline, profile, null); + return new FilesharesManager(httpPipeline, profile, null); } /** - * Gets a Configurable instance that can be used to create ManagedNetworkFabricManager with optional configuration. + * Gets a Configurable instance that can be used to create FilesharesManager with optional configuration. * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { - return new ManagedNetworkFabricManager.Configurable(); + return new FilesharesManager.Configurable(); } /** @@ -185,6 +191,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-managednetworkfabric.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -282,22 +291,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of Managed Network Fabric service API entry point. + * Creates an instance of fileshares service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the Managed Network Fabric service API instance. + * @return the fileshares service API instance. */ - public ManagedNetworkFabricManager authenticate(TokenCredential credential, AzureProfile profile) { + public FilesharesManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.managednetworkfabric") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -339,32 +350,32 @@ public ManagedNetworkFabricManager authenticate(TokenCredential credential, Azur HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) .policies(policies.toArray(new HttpPipelinePolicy[0])) .build(); - return new ManagedNetworkFabricManager(httpPipeline, profile, defaultPollInterval); + return new FilesharesManager(httpPipeline, profile, defaultPollInterval); } } /** - * Gets the resource collection API of AccessControlLists. It manages AccessControlList. + * Gets the resource collection API of Operations. * - * @return Resource collection API of AccessControlLists. + * @return Resource collection API of Operations. */ - public AccessControlLists accessControlLists() { - if (this.accessControlLists == null) { - this.accessControlLists = new AccessControlListsImpl(clientObject.getAccessControlLists(), this); + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); } - return accessControlLists; + return operations; } /** - * Gets the resource collection API of InternetGateways. It manages InternetGateway. + * Gets the resource collection API of AccessControlLists. It manages AccessControlList. * - * @return Resource collection API of InternetGateways. + * @return Resource collection API of AccessControlLists. */ - public InternetGateways internetGateways() { - if (this.internetGateways == null) { - this.internetGateways = new InternetGatewaysImpl(clientObject.getInternetGateways(), this); + public AccessControlLists accessControlLists() { + if (this.accessControlLists == null) { + this.accessControlLists = new AccessControlListsImpl(clientObject.getAccessControlLists(), this); } - return internetGateways; + return accessControlLists; } /** @@ -379,6 +390,18 @@ public InternetGatewayRules internetGatewayRules() { return internetGatewayRules; } + /** + * 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 IpCommunities. It manages IpCommunity. * @@ -609,18 +632,6 @@ public NetworkTaps networkTaps() { return networkTaps; } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of RoutePolicies. It manages RoutePolicy. * @@ -634,12 +645,24 @@ public RoutePolicies routePolicies() { } /** - * Gets wrapped service client AzureNetworkFabricManagementServiceApi providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets the resource collection API of NetworkMonitors. It manages NetworkMonitor. + * + * @return Resource collection API of NetworkMonitors. + */ + public NetworkMonitors networkMonitors() { + if (this.networkMonitors == null) { + this.networkMonitors = new NetworkMonitorsImpl(clientObject.getNetworkMonitors(), this); + } + return networkMonitors; + } + + /** + * Gets wrapped service client FilesharesManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. * - * @return Wrapped service client AzureNetworkFabricManagementServiceApi. + * @return Wrapped service client FilesharesManagementClient. */ - public AzureNetworkFabricManagementServiceApi serviceClient() { + public FilesharesManagementClient serviceClient() { return this.clientObject; } } 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 7749316e9357..544444386d78 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -22,114 +22,101 @@ */ public interface AccessControlListsClient { /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET 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 {@link SyncPoller} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, - String accessControlListName, AccessControlListInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String accessControlListName, Context context); /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET 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 {@link SyncPoller} for polling of the Access Control List resource definition. + * @return the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, - String accessControlListName, AccessControlListInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName); /** - * 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 resource 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 Access Control List resource definition. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner resource, Context context); /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * 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 context The context to associate with this operation. + * @param resource 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 Access Control List resource definition along with {@link Response}. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String accessControlListName, Context context); + AccessControlListInner create(String resourceGroupName, String accessControlListName, + AccessControlListInner resource); /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * 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 resource 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 getByResourceGroup(String resourceGroupName, String accessControlListName); + AccessControlListInner create(String resourceGroupName, String accessControlListName, + AccessControlListInner resource, Context 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. + * @param properties 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. @@ -137,16 +124,14 @@ Response getByResourceGroupWithResponse(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessControlListInner> beginUpdate(String resourceGroupName, - String accessControlListName, AccessControlListPatch body); + String accessControlListName, AccessControlListPatch properties); /** - * 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 properties 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. @@ -155,32 +140,29 @@ SyncPoller, AccessControlListInner> beginUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessControlListInner> beginUpdate(String resourceGroupName, - String accessControlListName, AccessControlListPatch body, Context context); + String accessControlListName, AccessControlListPatch properties, Context 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. + * @param properties 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 Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body); + AccessControlListInner update(String resourceGroupName, String accessControlListName, + AccessControlListPatch properties); /** - * 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 properties 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. @@ -188,12 +170,10 @@ SyncPoller, AccessControlListInner> beginUpda * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body, - Context context); + AccessControlListInner update(String resourceGroupName, String accessControlListName, + AccessControlListPatch properties, 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. @@ -207,8 +187,6 @@ AccessControlListInner update(String resourceGroupName, String accessControlList SyncPoller, Void> beginDelete(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. @@ -224,8 +202,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -238,8 +214,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -253,22 +227,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String accessControlListName, Context context); /** - * 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 com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * 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. @@ -276,40 +246,34 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation 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. @@ -318,7 +282,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -326,8 +290,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -337,7 +299,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -345,8 +307,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -355,15 +315,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -373,15 +331,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -389,15 +345,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -406,15 +360,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -422,14 +374,12 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -438,15 +388,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -454,15 +402,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -471,15 +417,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -487,14 +431,12 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @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. @@ -503,7 +445,7 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName, 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 536ab3d6de1a..fb44321051f2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -12,7 +12,9 @@ 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.ExternalNetworkBfdAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -21,122 +23,108 @@ */ public interface ExternalNetworksClient { /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 External Network resource. + * @return defines the External Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, Context context); /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 External Network resource. + * @return defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. + * @param resource 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 External Network resource. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - ExternalNetworkInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner resource); /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. + * @param resource 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 External Network resource. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - ExternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner resource, Context context); /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. + * @param resource 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 External Network resource along with {@link Response}. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, Context context); + ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkInner resource); /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param resource 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 External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); + ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkInner resource, Context context); /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -144,17 +132,15 @@ Response getWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body); + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch properties); /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -163,17 +149,15 @@ SyncPoller, ExternalNetworkInner> beginUpdate(S */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, Context context); + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch properties, Context context); /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -181,17 +165,15 @@ SyncPoller, ExternalNetworkInner> beginUpdate(S */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - ExternalNetworkPatch body); + ExternalNetworkPatch properties); /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -200,11 +182,9 @@ ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainNa */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - ExternalNetworkPatch body, Context context); + ExternalNetworkPatch properties, Context context); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +200,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +216,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String externalNetworkName, Context context); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,8 +229,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +243,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,14 +250,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -294,15 +264,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -312,7 +280,7 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -320,8 +288,6 @@ PagedIterable listByL3IsolationDomain(String resourceGroup String externalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -332,7 +298,7 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -340,8 +306,6 @@ PagedIterable listByL3IsolationDomain(String resourceGroup String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -351,15 +315,13 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -370,16 +332,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -388,17 +348,15 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body); + SyncPoller, ExternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -408,17 +366,15 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body, Context context); + SyncPoller, ExternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -427,16 +383,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); + ExternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -446,9 +400,10 @@ CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); + ExternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, + 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/FilesharesManagementClient.java similarity index 93% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/FilesharesManagementClient.java index a2020fe15fd7..5de5e6d0c5c0 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/FilesharesManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for AzureNetworkFabricManagementServiceApi class. + * The interface for FilesharesManagementClient class. */ -public interface AzureNetworkFabricManagementServiceApi { +public interface FilesharesManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,18 +47,18 @@ public interface AzureNetworkFabricManagementServiceApi { Duration getDefaultPollInterval(); /** - * Gets the AccessControlListsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AccessControlListsClient object. + * @return the OperationsClient object. */ - AccessControlListsClient getAccessControlLists(); + OperationsClient getOperations(); /** - * Gets the InternetGatewaysClient object to access its operations. + * Gets the AccessControlListsClient object to access its operations. * - * @return the InternetGatewaysClient object. + * @return the AccessControlListsClient object. */ - InternetGatewaysClient getInternetGateways(); + AccessControlListsClient getAccessControlLists(); /** * Gets the InternetGatewayRulesClient object to access its operations. @@ -67,6 +67,13 @@ public interface AzureNetworkFabricManagementServiceApi { */ InternetGatewayRulesClient getInternetGatewayRules(); + /** + * Gets the InternetGatewaysClient object to access its operations. + * + * @return the InternetGatewaysClient object. + */ + InternetGatewaysClient getInternetGateways(); + /** * Gets the IpCommunitiesClient object to access its operations. * @@ -201,16 +208,16 @@ public interface AzureNetworkFabricManagementServiceApi { NetworkTapsClient getNetworkTaps(); /** - * Gets the OperationsClient object to access its operations. + * Gets the RoutePoliciesClient object to access its operations. * - * @return the OperationsClient object. + * @return the RoutePoliciesClient object. */ - OperationsClient getOperations(); + RoutePoliciesClient getRoutePolicies(); /** - * Gets the RoutePoliciesClient object to access its operations. + * Gets the NetworkMonitorsClient object to access its operations. * - * @return the RoutePoliciesClient object. + * @return the NetworkMonitorsClient object. */ - RoutePoliciesClient getRoutePolicies(); + NetworkMonitorsClient getNetworkMonitors(); } 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 0b934b226256..0ff7094cf500 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -12,7 +12,11 @@ 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.InternalNetworkBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -21,122 +25,108 @@ */ public interface InternalNetworksClient { /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Internal Network resource. + * @return a InternalNetworks along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, Context context); /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Internal Network resource. + * @return a InternalNetworks. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. + * @param resource 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 Internal Network resource. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - InternalNetworkInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner resource); /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. + * @param resource 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 Internal Network resource. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - InternalNetworkInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner resource, Context context); /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. + * @param resource 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 a InternalNetworks along with {@link Response}. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, Context context); + InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkInner resource); /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param resource 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 a InternalNetworks. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); + InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkInner resource, Context context); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -144,17 +134,15 @@ Response getWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body); + String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch properties); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -163,17 +151,15 @@ SyncPoller, InternalNetworkInner> beginUpdate(S */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, Context context); + String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch properties, Context context); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -181,17 +167,15 @@ SyncPoller, InternalNetworkInner> beginUpdate(S */ @ServiceMethod(returns = ReturnType.SINGLE) InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - InternalNetworkPatch body); + InternalNetworkPatch properties); /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -200,11 +184,9 @@ InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainNa */ @ServiceMethod(returns = ReturnType.SINGLE) InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - InternalNetworkPatch body, Context context); + InternalNetworkPatch properties, Context context); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +202,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +218,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String internalNetworkName, Context context); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,8 +231,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +245,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,14 +252,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -294,15 +266,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Executes the operation to the underlying resources. - * * 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. @@ -312,7 +282,7 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -320,8 +290,6 @@ PagedIterable listByL3IsolationDomain(String resourceGroup String internalNetworkName, UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * * 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. @@ -332,7 +300,7 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -340,8 +308,6 @@ PagedIterable listByL3IsolationDomain(String resourceGroup String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources. - * * 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. @@ -351,15 +317,13 @@ PagedIterable listByL3IsolationDomain(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * * 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. @@ -370,15 +334,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -388,16 +350,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, InternalNetworkBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body); + String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -408,16 +368,14 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, InternalNetworkBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context); + String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -427,15 +385,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + InternalNetworkBgpAdministrativeStateResponseInner updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -446,16 +402,15 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + InternalNetworkBgpAdministrativeStateResponseInner updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, + Context context); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -464,17 +419,15 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body); + SyncPoller, InternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -484,17 +437,15 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context); + SyncPoller, InternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, Context context); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -503,16 +454,14 @@ CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + InternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -522,9 +471,10 @@ CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + InternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, + Context context); } 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 index 86aea9efb00d..0e472120b667 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,115 +19,101 @@ */ public interface InternetGatewayRulesClient { /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * 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 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. + * @return an Internet Gateway Rule resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternetGatewayRuleInner> beginCreate(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRuleInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String internetGatewayRuleName, Context context); /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * 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 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. + * @return an Internet Gateway Rule resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternetGatewayRuleInner> beginCreate(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRuleInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRuleInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayRuleInner> beginCreate(String resourceGroupName, + String internetGatewayRuleName, InternetGatewayRuleInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRuleInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayRuleInner> beginCreate(String resourceGroupName, + String internetGatewayRuleName, InternetGatewayRuleInner resource, Context context); /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * 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 context The context to associate with this operation. + * @param resource 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 an Internet Gateway Rule resource along with {@link Response}. + * @return the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String internetGatewayRuleName, Context context); + InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource); /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * 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 resource 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 an Internet Gateway Rule resource. + * @return the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); + InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource, 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. + * @param properties 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. @@ -135,16 +121,14 @@ Response getByResourceGroupWithResponse(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternetGatewayRuleInner> beginUpdate(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRulePatch body); + String internetGatewayRuleName, InternetGatewayRulePatch properties); /** - * 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 properties 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. @@ -153,16 +137,14 @@ SyncPoller, InternetGatewayRuleInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternetGatewayRuleInner> beginUpdate(String resourceGroupName, - String internetGatewayRuleName, InternetGatewayRulePatch body, Context context); + String internetGatewayRuleName, InternetGatewayRulePatch properties, 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. + * @param properties 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. @@ -170,16 +152,14 @@ SyncPoller, InternetGatewayRuleInner> begin */ @ServiceMethod(returns = ReturnType.SINGLE) InternetGatewayRuleInner update(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRulePatch body); + InternetGatewayRulePatch properties); /** - * 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 properties 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. @@ -188,11 +168,9 @@ InternetGatewayRuleInner update(String resourceGroupName, String internetGateway */ @ServiceMethod(returns = ReturnType.SINGLE) InternetGatewayRuleInner update(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRulePatch body, Context context); + InternetGatewayRulePatch properties, 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. @@ -206,8 +184,6 @@ InternetGatewayRuleInner update(String resourceGroupName, String internetGateway 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. @@ -223,8 +199,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -237,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -252,22 +224,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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}. + * @return the response of a InternetGatewayRule list operation 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. @@ -275,33 +243,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a InternetGatewayRule list operation 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}. + * @return the response of a InternetGatewayRule list operation 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}. + * @return the response of a InternetGatewayRule list operation 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 index 0ab5ac5879d5..f13c95006715 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,114 +19,100 @@ */ public interface InternetGatewaysClient { /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * 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 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. + * @return the Internet Gateway resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String internetGatewayName, + Context context); /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * 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 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. + * @return the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, - String internetGatewayName, InternetGatewayInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner resource, Context context); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * 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 context The context to associate with this operation. + * @param resource 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 along with {@link Response}. + * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String internetGatewayName, - Context context); + InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner resource); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * 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 resource 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 getByResourceGroup(String resourceGroupName, String internetGatewayName); + InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner resource, + 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.. + * @param properties API to update certain properties of the InternetGateway 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. @@ -134,16 +120,14 @@ Response getByResourceGroupWithResponse(String resourceGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternetGatewayInner> beginUpdate(String resourceGroupName, - String internetGatewayName, InternetGatewayPatch body); + String internetGatewayName, InternetGatewayPatch properties); /** - * 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 properties API to update certain properties of the InternetGateway 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. @@ -152,32 +136,28 @@ SyncPoller, InternetGatewayInner> beginUpdate(S */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternetGatewayInner> beginUpdate(String resourceGroupName, - String internetGatewayName, InternetGatewayPatch body, Context context); + String internetGatewayName, InternetGatewayPatch properties, 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.. + * @param properties API to update certain properties of the InternetGateway 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); + InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch properties); /** - * 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 properties API to update certain properties of the InternetGateway 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. @@ -185,12 +165,10 @@ SyncPoller, InternetGatewayInner> beginUpdate(S * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, + InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch properties, 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. @@ -204,8 +182,6 @@ InternetGatewayInner update(String resourceGroupName, String internetGatewayName 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. @@ -221,8 +197,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -235,8 +209,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -250,22 +222,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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}. + * @return the response of a InternetGateway list operation 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. @@ -273,33 +241,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a InternetGateway list operation 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}. + * @return the response of a InternetGateway list operation 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}. + * @return the response of a InternetGateway list operation 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 882f59571d41..f2c14f95e550 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,113 +19,100 @@ */ public interface IpCommunitiesClient { /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @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 IP Community resource definition. + * @return the IP Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, + Context context); /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @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 IP Community resource definition. + * @return the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName); /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. + * @param resource 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 IP Community resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner resource); /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. + * @param resource 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 IP Community resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner resource, Context context); /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. + * @param resource 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 IP Community resource definition along with {@link Response}. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, - Context context); + IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner resource); /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param resource 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 IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName); + IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner resource, + Context context); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -133,16 +120,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpCommunityInner> beginUpdate(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body); + String ipCommunityName, IpCommunityPatch properties); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -151,32 +136,28 @@ SyncPoller, IpCommunityInner> beginUpdate(String re */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpCommunityInner> beginUpdate(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body, Context context); + String ipCommunityName, IpCommunityPatch properties, Context context); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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 IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body); + IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch properties); /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -184,11 +165,10 @@ SyncPoller, IpCommunityInner> beginUpdate(String re * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, Context context); + IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch properties, + Context context); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -202,8 +182,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -218,8 +196,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName, Context context); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -232,8 +208,6 @@ SyncPoller, IpCommunityInner> beginUpdate(String re void delete(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,22 +221,18 @@ SyncPoller, IpCommunityInner> beginUpdate(String re void delete(String resourceGroupName, String ipCommunityName, Context context); /** - * List IP Communities by resource group. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -270,33 +240,29 @@ SyncPoller, IpCommunityInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation 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 5be8bb4fb566..35538b6d421a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,115 +19,101 @@ */ public interface IpExtendedCommunitiesClient { /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpExtendedCommunityInner> beginCreate(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String ipExtendedCommunityName, Context context); /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition. + * @return the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpExtendedCommunityInner> beginCreate(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. + * @param resource 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 IP Extended Community resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpExtendedCommunityInner> beginCreate(String resourceGroupName, + String ipExtendedCommunityName, IpExtendedCommunityInner resource); /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. + * @param resource 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 IP Extended Community resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpExtendedCommunityInner> beginCreate(String resourceGroupName, + String ipExtendedCommunityName, IpExtendedCommunityInner resource, Context context); /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. + * @param resource 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 IP Extended Community resource definition along with {@link Response}. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String ipExtendedCommunityName, Context context); + IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource); /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param resource 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 IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); + IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource, Context context); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -135,16 +121,14 @@ Response getByResourceGroupWithResponse(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpExtendedCommunityInner> beginUpdate(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityPatch body); + String ipExtendedCommunityName, IpExtendedCommunityPatch properties); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -153,16 +137,14 @@ SyncPoller, IpExtendedCommunityInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpExtendedCommunityInner> beginUpdate(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context); + String ipExtendedCommunityName, IpExtendedCommunityPatch properties, Context context); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -170,16 +152,14 @@ SyncPoller, IpExtendedCommunityInner> begin */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body); + IpExtendedCommunityPatch properties); /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -188,11 +168,9 @@ IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommu */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body, Context context); + IpExtendedCommunityPatch properties, Context context); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +184,6 @@ IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommu SyncPoller, Void> beginDelete(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -223,8 +199,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -252,22 +224,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String ipExtendedCommunityName, Context context); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,33 +243,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation 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 fde7a73f7612..498887d826ae 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,113 +19,99 @@ */ public interface IpPrefixesClient { /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, - IpPrefixInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, + Context context); /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition. + * @return the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, - IpPrefixInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName); /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. + * @param resource 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 IP Prefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, + IpPrefixInner resource); /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. + * @param resource 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 IP Prefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, String ipPrefixName, + IpPrefixInner resource, Context context); /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. + * @param resource 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 IP Prefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, - Context context); + IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner resource); /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param resource 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 IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName); + IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner resource, Context context); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -133,16 +119,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpPrefixInner> beginUpdate(String resourceGroupName, String ipPrefixName, - IpPrefixPatch body); + IpPrefixPatch properties); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -151,32 +135,28 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpPrefixInner> beginUpdate(String resourceGroupName, String ipPrefixName, - IpPrefixPatch body, Context context); + IpPrefixPatch properties, Context context); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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 IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body); + IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch properties); /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -184,11 +164,9 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context); + IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch properties, Context context); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -202,8 +180,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -218,8 +194,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName, Context context); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -232,8 +206,6 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource void delete(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,22 +219,18 @@ SyncPoller, IpPrefixInner> beginUpdate(String resource void delete(String resourceGroupName, String ipPrefixName, Context context); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -270,33 +238,29 @@ SyncPoller, IpPrefixInner> beginUpdate(String 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 list of IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation 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 ac85ee1f8539..0769e8b80d55 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -23,118 +23,105 @@ */ public interface L2IsolationDomainsClient { /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String l2IsolationDomainName, Context context); /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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 L2 Isolation Domain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainInner resource); /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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 L2 Isolation Domain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainInner resource, Context context); /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is + * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param context The context to associate with this operation. + * @param resource 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 L2 Isolation Domain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String l2IsolationDomainName, Context context); + L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner resource); /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is + * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param resource 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 L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); + L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner resource, Context context); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param properties 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. @@ -142,16 +129,14 @@ Response getByResourceGroupWithResponse(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch body); + String l2IsolationDomainName, L2IsolationDomainPatch properties); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param properties 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. @@ -160,32 +145,29 @@ SyncPoller, L2IsolationDomainInner> beginUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch body, Context context); + String l2IsolationDomainName, L2IsolationDomainPatch properties, Context context); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param properties 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 L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body); + L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties); /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param properties 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. @@ -193,12 +175,10 @@ SyncPoller, L2IsolationDomainInner> beginUpda * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, - Context context); + L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties, Context context); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -212,8 +192,6 @@ L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomain SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -229,8 +207,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,8 +219,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -258,8 +232,53 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. + * Displays L2IsolationDomains 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 the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Displays L2IsolationDomains 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 the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Displays L2IsolationDomains 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 the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Displays L2IsolationDomains 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 the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -268,7 +287,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -276,8 +295,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -287,7 +304,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -295,8 +312,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -305,15 +320,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -323,7 +336,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, @@ -337,7 +350,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -352,7 +365,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -366,7 +379,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName); @@ -380,15 +393,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName, 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. @@ -396,15 +407,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * 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. @@ -413,15 +422,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName, 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. @@ -429,15 +436,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * 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. @@ -446,64 +451,9 @@ CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context); - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 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 bdb3981c39ce..cead658bccdb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -23,122 +23,109 @@ */ public interface L3IsolationDomainsClient { /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String l3IsolationDomainName, Context context); /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. + * @param resource 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 L3 Isolation Domain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainInner resource); /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. + * @param resource 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 L3 Isolation Domain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainInner resource, Context context); /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with + * external services .This configuration is applied on the devices only after the creation of networks is completed + * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. + * @param resource 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 L3 Isolation Domain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String l3IsolationDomainName, Context context); + L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource); /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with + * external services .This configuration is applied on the devices only after the creation of networks is completed + * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param resource 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 L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); + L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource, Context context); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -146,16 +133,14 @@ Response getByResourceGroupWithResponse(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L3IsolationDomainInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch body); + String l3IsolationDomainName, L3IsolationDomainPatch properties); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -164,32 +149,29 @@ SyncPoller, L3IsolationDomainInner> beginUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L3IsolationDomainInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch body, Context context); + String l3IsolationDomainName, L3IsolationDomainPatch properties, Context context); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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 L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body); + L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainPatch properties); /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -197,12 +179,10 @@ SyncPoller, L3IsolationDomainInner> beginUpda * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body, - Context context); + L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainPatch properties, Context context); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -216,8 +196,6 @@ L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomain SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -233,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,8 +223,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -262,22 +236,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -285,40 +255,34 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -327,7 +291,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -335,8 +299,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -346,7 +308,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -354,8 +316,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String UpdateAdministrativeState body, Context context); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -364,15 +324,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -382,7 +340,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, @@ -396,7 +354,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -411,7 +369,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -425,7 +383,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName); @@ -439,15 +397,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName, 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. @@ -455,15 +411,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * 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. @@ -472,15 +426,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName, 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. @@ -488,15 +440,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * 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. @@ -505,7 +455,7 @@ CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, 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 index 7ed3d93fdf8e..e472bce289ed 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,114 +19,100 @@ */ public interface NeighborGroupsClient { /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT 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 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. + * @return the Neighbor Group along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, - String neighborGroupName, NeighborGroupInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String neighborGroupName, + Context context); /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT 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 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. + * @return the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, - String neighborGroupName, NeighborGroupInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, + String neighborGroupName, NeighborGroupInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, + String neighborGroupName, NeighborGroupInner resource, Context context); /** - * Retrieves details of neighbor Group using GET method. - * - * Gets 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 context The context to associate with this operation. + * @param resource 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 Neighbor Group along with {@link Response}. + * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String neighborGroupName, - Context context); + NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner resource); /** - * Retrieves details of neighbor Group using GET method. - * - * Gets 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 resource 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 Neighbor Group. + * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName); + NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner resource, + 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. + * @param properties 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. @@ -134,16 +120,14 @@ Response getByResourceGroupWithResponse(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NeighborGroupInner> beginUpdate(String resourceGroupName, - String neighborGroupName, NeighborGroupPatch body); + String neighborGroupName, NeighborGroupPatch properties); /** - * 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 properties 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. @@ -152,32 +136,28 @@ SyncPoller, NeighborGroupInner> beginUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NeighborGroupInner> beginUpdate(String resourceGroupName, - String neighborGroupName, NeighborGroupPatch body, Context context); + String neighborGroupName, NeighborGroupPatch properties, 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. + * @param properties 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); + NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch properties); /** - * 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 properties 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. @@ -185,12 +165,10 @@ SyncPoller, NeighborGroupInner> beginUpdate(Strin * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, + NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch properties, Context context); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -204,8 +182,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne 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. @@ -220,8 +196,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne 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. @@ -234,8 +208,6 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne 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. @@ -249,22 +221,18 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne 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}. + * @return the response of a NeighborGroup list operation 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. @@ -272,33 +240,29 @@ NeighborGroupInner update(String resourceGroupName, String neighborGroupName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NeighborGroup list operation 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}. + * @return the response of a NeighborGroup list operation 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}. + * @return the response of a NeighborGroup list operation 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 454a093d786b..82001bc30744 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -16,8 +16,6 @@ */ public interface NetworkDeviceSkusClient { /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -31,8 +29,6 @@ public interface NetworkDeviceSkusClient { Response getWithResponse(String networkDeviceSkuName, Context context); /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -45,27 +41,23 @@ public interface NetworkDeviceSkusClient { NetworkDeviceSkuInner get(String networkDeviceSkuName); /** - * 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 Network Device SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDeviceSku list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for 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 Network Device SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDeviceSku list operation 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 6a57b0b38d8c..68188ccbc00c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -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.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; @@ -23,114 +27,100 @@ */ public interface NetworkDevicesClient { /** - * Create Network Device. - * - * Create a Network Device resource. + * 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. - * @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 Device resource definition. + * @return the Network Device resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkDeviceName, + Context context); /** - * Create Network Device. - * - * Create a Network Device resource. + * 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. - * @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 Device resource definition. + * @return the Network Device resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName); /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, + String networkDeviceName, NetworkDeviceInner resource); /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, + String networkDeviceName, NetworkDeviceInner resource, Context context); /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param resource 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 Device resource details along with {@link Response}. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkDeviceName, - Context context); + NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner resource); /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param resource 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 Device resource details. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName); + NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner resource, + Context context); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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. @@ -138,16 +128,14 @@ Response getByResourceGroupWithResponse(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body); + String networkDeviceName, NetworkDevicePatchParameters properties); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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. @@ -156,32 +144,29 @@ SyncPoller, NetworkDeviceInner> beginUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body, Context context); + String networkDeviceName, NetworkDevicePatchParameters properties, Context context); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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 Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body); + NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters properties); /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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. @@ -189,12 +174,10 @@ SyncPoller, NetworkDeviceInner> beginUpdate(Strin * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body, - Context context); + NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters properties, Context context); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,8 +191,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -224,8 +205,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, Context context); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +217,6 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne void delete(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,22 +230,18 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne void delete(String resourceGroupName, String networkDeviceName, Context context); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -276,40 +249,34 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -318,15 +285,13 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -336,15 +301,13 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -353,15 +316,13 @@ NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -371,15 +332,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -387,15 +346,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginRefreshConfiguration(String resourceGroupName, String networkDeviceName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -404,15 +361,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -420,15 +375,13 @@ CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, String networkDeviceName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -437,15 +390,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, String networkDeviceName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -454,7 +405,7 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -462,8 +413,6 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -473,7 +422,7 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -481,8 +430,6 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -491,15 +438,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -509,15 +454,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -526,15 +469,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -544,15 +485,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -561,15 +500,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -579,9 +516,133 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, CommonPostActionResponseForDeviceRWCommandsInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, CommonPostActionResponseForDeviceRWCommandsInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body, Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceRWCommandsInner runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceRWCommandsInner runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand 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 2e75b120c41c..d50feb144deb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,133 +19,117 @@ */ public interface NetworkFabricControllersClient { /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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 Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkFabricControllerInner> - beginCreate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkFabricControllerName, Context context); /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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 Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkFabricControllerInner> beginCreate( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, String networkFabricControllerName); /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. + * @param resource 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 Fabric Controller resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricControllerInner> beginCreate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner resource); /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. + * @param resource 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 Fabric Controller resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricControllerInner> beginCreate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner resource, + Context context); /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. + * @param resource 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 Fabric Controller resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String networkFabricControllerName, Context context); + NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource); /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param resource 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 Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, String networkFabricControllerName); + NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource, Context context); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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 Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkFabricControllerInner> - beginUpdate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body); + SyncPoller, NetworkFabricControllerInner> beginUpdate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch properties); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -154,17 +138,15 @@ Response getByResourceGroupWithResponse(String res */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricControllerInner> beginUpdate( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body, + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch properties, Context context); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -172,16 +154,14 @@ SyncPoller, NetworkFabricControllerInne */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner update(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body); + NetworkFabricControllerPatch properties); /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -190,11 +170,9 @@ NetworkFabricControllerInner update(String resourceGroupName, String networkFabr */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner update(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body, Context context); + NetworkFabricControllerPatch properties, Context context); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -208,8 +186,6 @@ NetworkFabricControllerInner update(String resourceGroupName, String networkFabr SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -225,8 +201,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -239,8 +213,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -254,22 +226,19 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkFabricControllerName, Context context); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -277,33 +246,32 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation 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/NetworkFabricSkusClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java index bc0d0db1ab2d..b33b07f79ab2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -16,8 +16,6 @@ */ public interface NetworkFabricSkusClient { /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -31,8 +29,6 @@ public interface NetworkFabricSkusClient { Response getWithResponse(String networkFabricSkuName, Context context); /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -45,27 +41,23 @@ public interface NetworkFabricSkusClient { NetworkFabricSkuInner get(String networkFabricSkuName); /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricSku list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricSku list operation 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 787fbce21d32..4c7aa0614d03 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -11,10 +11,17 @@ 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.ArmConfigurationDiffResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; @@ -25,114 +32,100 @@ */ public interface NetworkFabricsClient { /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Get Network Fabric resource details. * * @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 the Network Fabric resource definition. + * @return network Fabric resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, - String networkFabricName, NetworkFabricInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkFabricName, + Context context); /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * Get Network Fabric resource details. * * @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 the Network Fabric resource definition. + * @return network Fabric resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, - String networkFabricName, NetworkFabricInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName); /** - * Create Network Fabric. - * * Create Network Fabric resource. * * @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 resource 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 Fabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, + String networkFabricName, NetworkFabricInner resource); /** - * Create Network Fabric. - * * Create Network Fabric resource. * * @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 resource 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 Fabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, + String networkFabricName, NetworkFabricInner resource, Context context); /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * Create Network Fabric resource. * * @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. + * @param resource 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 network Fabric resource details along with {@link Response}. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkFabricName, - Context context); + NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner resource); /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * Create Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. + * @param resource 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 network Fabric resource details. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName); + NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner resource, + Context context); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @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 properties 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. @@ -140,16 +133,14 @@ Response getByResourceGroupWithResponse(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body); + String networkFabricName, NetworkFabricPatch properties); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @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 properties 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. @@ -158,32 +149,28 @@ SyncPoller, NetworkFabricInner> beginUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body, Context context); + String networkFabricName, NetworkFabricPatch properties, Context context); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @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 properties 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 Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body); + NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch properties); /** - * Updates a Network Fabric. - * * Update certain properties of the Network Fabric resource. * * @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 properties 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. @@ -191,12 +178,10 @@ SyncPoller, NetworkFabricInner> beginUpdate(Strin * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body, + NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch properties, Context context); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -210,8 +195,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -226,8 +209,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, Context context); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -240,8 +221,6 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne void delete(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -255,22 +234,18 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne void delete(String resourceGroupName, String networkFabricName, Context context); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,40 +253,34 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Fabrics by subscription. - * * List all the Network Fabric 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -319,15 +288,13 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginProvision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -336,15 +303,13 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginProvision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -352,14 +317,12 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -368,15 +331,13 @@ NetworkFabricInner update(String resourceGroupName, String networkFabricName, Ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -384,15 +345,13 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginDeprovision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -401,15 +360,13 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginDeprovision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -417,14 +374,12 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -433,15 +388,13 @@ CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -450,15 +403,13 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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. @@ -468,7 +419,7 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -476,8 +427,6 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam 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. @@ -486,15 +435,13 @@ CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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. @@ -504,15 +451,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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. @@ -520,15 +465,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -537,15 +480,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -553,15 +494,13 @@ CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -570,15 +509,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the response. */ @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. * @@ -588,7 +525,7 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -596,8 +533,6 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource 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. * @@ -608,7 +543,7 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -616,8 +551,6 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resource 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. * @@ -627,15 +560,13 @@ CommonPostActionResponseForStateUpdateInner refreshConfiguration(String 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 common response for the state updates. + * @return the response. */ @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. * @@ -646,15 +577,13 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -663,7 +592,7 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -671,8 +600,6 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura 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. @@ -682,7 +609,7 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -690,8 +617,6 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura 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. @@ -700,15 +625,13 @@ CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -718,15 +641,13 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -735,7 +656,7 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -743,8 +664,6 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio 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. @@ -754,7 +673,7 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -762,8 +681,6 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio 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. @@ -772,15 +689,13 @@ CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @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. @@ -790,15 +705,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @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. @@ -814,8 +727,6 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam 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. @@ -832,8 +743,6 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam 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. @@ -847,8 +756,6 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam 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. @@ -863,8 +770,6 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam 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. @@ -872,15 +777,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -889,15 +792,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -905,14 +806,12 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -921,9 +820,310 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String networkFabricName, Context context); + + /** + * Post action: Returns a status of commit batch operation. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommitBatchStatusResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommitBatchStatusResponseInner> beginCommitBatchStatus( + String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body, Context context); + + /** + * Post action: Returns a status of commit batch operation. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommitBatchStatusResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommitBatchStatusResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiscardCommitBatchResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiscardCommitBatchResponseInner> beginDiscardCommitBatch( + String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscardCommitBatchResponseInner discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscardCommitBatchResponseInner discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginLockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginLockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body, + Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ViewDeviceConfigurationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ViewDeviceConfigurationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName, Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ViewDeviceConfigurationResponseInner viewDeviceConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ViewDeviceConfigurationResponseInner viewDeviceConfiguration(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArmConfigurationDiffResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArmConfigurationDiffResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName, Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArmConfigurationDiffResponseInner armConfigurationDiff(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArmConfigurationDiffResponseInner armConfigurationDiff(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 bbc8637bacbc..d342b2e896b4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -21,122 +21,108 @@ */ public interface NetworkInterfacesClient { /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 defines the NetworkInterface resource. + * @return the Network Interface resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, Context context); /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 defines the NetworkInterface resource. + * @return the Network Interface resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. + * @param resource 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 NetworkInterface resource. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner resource); /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. + * @param resource 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 NetworkInterface resource. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner resource, Context context); /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. + * @param resource 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 Interface resource details along with {@link Response}. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context); + NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner resource); /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param resource 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 Interface resource details. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName); + NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner resource, Context context); /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -144,17 +130,15 @@ Response getWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkInterfaceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body); + String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch properties); /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -163,17 +147,15 @@ SyncPoller, NetworkInterfaceInner> beginUpdate */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkInterfaceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, Context context); + String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch properties, Context context); /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -181,17 +163,15 @@ SyncPoller, NetworkInterfaceInner> beginUpdate */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfacePatch body); + NetworkInterfacePatch properties); /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -200,11 +180,9 @@ NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfacePatch body, Context context); + NetworkInterfacePatch properties, Context context); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -220,8 +198,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,8 +214,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkInterfaceName, Context context); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,8 +227,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -269,8 +241,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -278,14 +248,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -294,15 +262,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName, Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -312,7 +278,7 @@ PagedIterable listByNetworkDevice(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -320,8 +286,6 @@ PagedIterable listByNetworkDevice(String resourceGroupNam UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -332,7 +296,7 @@ PagedIterable listByNetworkDevice(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -340,8 +304,6 @@ PagedIterable listByNetworkDevice(String resourceGroupNam UpdateAdministrativeState body, Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -351,15 +313,13 @@ PagedIterable listByNetworkDevice(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -370,7 +330,7 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java new file mode 100644 index 000000000000..6da6f2fa9f0d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +/** + * An instance of this class provides access to all the operations defined in NetworkMonitorsClient. + */ +public interface NetworkMonitorsClient { + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkMonitorName, + Context context); + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner getByResourceGroup(String resourceGroupName, String networkMonitorName); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner resource); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner resource, Context context); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner resource); + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner resource, + Context context); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch properties); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch properties, Context context); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, NetworkMonitorPatch properties); + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, NetworkMonitorPatch properties, + Context context); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 networkMonitorName, + Context context); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 networkMonitorName, Context context); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body, Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context); +} 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 index fa835f22fc66..3fa4b7f6c31e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -19,115 +19,101 @@ */ public interface NetworkPacketBrokersClient { /** - * Create Network Packet Broker. - * - * Creates 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 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. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkPacketBrokerInner> beginCreate(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkPacketBrokerName, Context context); /** - * Create Network Packet Broker. - * - * Creates 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 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. + * @return the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkPacketBrokerInner> beginCreate(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkPacketBrokerInner> beginCreate(String resourceGroupName, + String networkPacketBrokerName, NetworkPacketBrokerInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkPacketBrokerInner> beginCreate(String resourceGroupName, + String networkPacketBrokerName, NetworkPacketBrokerInner resource, Context context); /** - * Gets a Network Packet Broker. - * - * Retrieves details of this 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 context The context to associate with this operation. + * @param resource 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 along with {@link Response}. + * @return the NetworkPacketBroker resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String networkPacketBrokerName, Context context); + NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource); /** - * Gets a Network Packet Broker. - * - * Retrieves details of this 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 resource 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 getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); + NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource, 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. + * @param properties 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. @@ -135,16 +121,14 @@ Response getByResourceGroupWithResponse(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkPacketBrokerInner> beginUpdate(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerPatch body); + String networkPacketBrokerName, NetworkPacketBrokerPatch properties); /** - * 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 properties 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. @@ -153,16 +137,14 @@ SyncPoller, NetworkPacketBrokerInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkPacketBrokerInner> beginUpdate(String resourceGroupName, - String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context); + String networkPacketBrokerName, NetworkPacketBrokerPatch properties, 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. + * @param properties 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. @@ -170,16 +152,14 @@ SyncPoller, NetworkPacketBrokerInner> begin */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerPatch body); + NetworkPacketBrokerPatch properties); /** - * 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 properties 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. @@ -188,11 +168,9 @@ NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBr */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerPatch body, Context context); + NetworkPacketBrokerPatch properties, Context context); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +184,6 @@ NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBr 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. @@ -223,8 +199,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,8 +211,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -252,22 +224,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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}. + * @return the response of a NetworkPacketBroker list operation 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. @@ -275,33 +243,29 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkPacketBroker list operation 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}. + * @return the response of a NetworkPacketBroker list operation 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}. + * @return the response of a NetworkPacketBroker list operation 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 fb1d067a5ef3..2b53e599d86f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -12,120 +12,107 @@ 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.TagsUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; /** * An instance of this class provides access to all the operations defined in NetworkRacksClient. */ public interface NetworkRacksClient { /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition. + * @return network Rack resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, + Context context); /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition. + * @return network Rack resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName); /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. + * @param resource 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 Rack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner resource); /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. + * @param resource 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 Rack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner resource, Context context); /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. + * @param resource 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 network Rack resource details along with {@link Response}. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, - Context context); + NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner resource); /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param resource 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 network Rack resource details. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName); + NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner resource, + Context context); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -133,16 +120,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body); + String networkRackName, NetworkRackPatch properties); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -151,32 +136,28 @@ SyncPoller, NetworkRackInner> beginUpdate(String re */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body, Context context); + String networkRackName, NetworkRackPatch properties, Context context); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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 Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body); + NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch properties); /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -184,11 +165,10 @@ SyncPoller, NetworkRackInner> beginUpdate(String re * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body, Context context); + NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch properties, + Context context); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -202,8 +182,6 @@ SyncPoller, NetworkRackInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -218,8 +196,6 @@ SyncPoller, NetworkRackInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName, Context context); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -232,8 +208,6 @@ SyncPoller, NetworkRackInner> beginUpdate(String re void delete(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -247,22 +221,18 @@ SyncPoller, NetworkRackInner> beginUpdate(String re void delete(String resourceGroupName, String networkRackName, Context context); /** - * List Network Racks by resource group. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -270,33 +240,29 @@ SyncPoller, NetworkRackInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List Network Racks by subscription. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation 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 index 669a34aa3346..bfb65664e2f1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -22,114 +22,100 @@ */ public interface NetworkTapRulesClient { /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * 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 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. + * @return network Tap Rule resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapRuleName, + Context context); /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * 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 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. + * @return network Tap Rule resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner resource, Context context); /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * 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 context The context to associate with this operation. + * @param resource 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 network Tap Rule resource details along with {@link Response}. + * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapRuleName, - Context context); + NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner resource); /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * 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 resource 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 network Tap Rule resource details. + * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName); + NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner resource, + 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. + * @param properties 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. @@ -137,16 +123,14 @@ Response getByResourceGroupWithResponse(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkTapRuleInner> beginUpdate(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body); + String networkTapRuleName, NetworkTapRulePatch properties); /** - * 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 properties 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. @@ -155,32 +139,28 @@ SyncPoller, NetworkTapRuleInner> beginUpdate(Str */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkTapRuleInner> beginUpdate(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body, Context context); + String networkTapRuleName, NetworkTapRulePatch properties, 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. + * @param properties 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); + NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch properties); /** - * 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 properties 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. @@ -188,12 +168,10 @@ SyncPoller, NetworkTapRuleInner> beginUpdate(Str * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, + NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch properties, 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. @@ -207,8 +185,6 @@ NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, 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. @@ -224,8 +200,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -238,8 +212,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -253,22 +225,18 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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}. + * @return the response of a NetworkTapRule list operation 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. @@ -276,40 +244,34 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation 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}. + * @return the response of a NetworkTapRule list operation 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}. + * @return the response of a NetworkTapRule list operation 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. @@ -318,7 +280,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -326,8 +288,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -337,7 +297,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> @@ -345,8 +305,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. @@ -355,15 +313,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -373,15 +329,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -389,15 +343,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -406,15 +358,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -422,14 +372,12 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -438,15 +386,13 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -454,15 +400,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -471,15 +415,13 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -487,14 +429,12 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @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. @@ -503,7 +443,7 @@ CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName, 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 index 9f64a116595a..84815db9ed9a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -22,113 +22,99 @@ */ public interface NetworkTapsClient { /** - * Create Network Tap. - * - * Creates 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 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. + * @return the Network Tap resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, - String networkTapName, NetworkTapInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, + Context context); /** - * Create Network Tap. - * - * Creates 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 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. + * @return the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, - String networkTapName, NetworkTapInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner resource); /** - * 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 resource 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. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner resource, Context context); /** - * Gets a Network Tap. - * - * Retrieves details of this 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 context The context to associate with this operation. + * @param resource 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 along with {@link Response}. + * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, - Context context); + NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner resource); /** - * Gets a Network Tap. - * - * Retrieves details of this 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 resource 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 getByResourceGroup(String resourceGroupName, String networkTapName); + NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner resource, 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. + * @param properties 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. @@ -136,16 +122,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkTapInner> beginUpdate(String resourceGroupName, - String networkTapName, NetworkTapPatch body); + String networkTapName, NetworkTapPatch properties); /** - * 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 properties 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. @@ -154,32 +138,28 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkTapInner> beginUpdate(String resourceGroupName, - String networkTapName, NetworkTapPatch body, Context context); + String networkTapName, NetworkTapPatch properties, 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. + * @param properties 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); + NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch properties); /** - * 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 properties 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. @@ -187,11 +167,10 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context); + NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch properties, + Context context); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -205,8 +184,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso 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. @@ -221,8 +198,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso 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. @@ -235,8 +210,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso 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. @@ -250,22 +223,18 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso 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}. + * @return the response of a NetworkTap list operation 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. @@ -273,40 +242,34 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkTap list operation 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}. + * @return the response of a NetworkTap list operation 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}. + * @return the response of a NetworkTap list operation 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. @@ -315,15 +278,13 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -333,7 +294,7 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -341,8 +302,6 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso 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. @@ -351,15 +310,13 @@ SyncPoller, NetworkTapInner> beginUpdate(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -369,15 +326,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -385,15 +340,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -402,15 +355,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -418,14 +369,12 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -434,7 +383,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName, 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 4938f8fa140a..10450ff24d4f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -13,7 +13,9 @@ 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.fluent.models.NniBfdAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** @@ -21,125 +23,111 @@ */ public interface NetworkToNetworkInterconnectsClient { /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET 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 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 To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, Context context); /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET 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 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 To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName); /** - * Configuration used to setup CE-PE connectivity. - * * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. + * @param resource 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 To Network Interconnect resource definition. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner resource); /** - * Configuration used to setup CE-PE connectivity. - * * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. + * @param resource 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 To Network Interconnect resource definition. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner resource, Context context); /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. + * @param resource 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 To Network Interconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, Context context); + NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource); /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param resource 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 To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName); + NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource, 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. + * @param properties 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. @@ -148,17 +136,15 @@ NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFa @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body); + NetworkToNetworkInterconnectPatch properties); /** - * 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 properties 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. @@ -168,17 +154,15 @@ SyncPoller, NetworkToNetworkInterc @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body, Context context); + NetworkToNetworkInterconnectPatch properties, 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. + * @param properties 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. @@ -186,17 +170,15 @@ SyncPoller, NetworkToNetworkInterc */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkToNetworkInterconnectInner update(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body); + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties); /** - * 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 properties 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. @@ -205,11 +187,9 @@ NetworkToNetworkInterconnectInner update(String resourceGroupName, String networ */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkToNetworkInterconnectInner update(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context); + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties, Context context); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -225,8 +205,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -243,8 +221,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String networkToNetworkInterconnectName, Context context); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -258,8 +234,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -275,8 +249,6 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo Context 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. @@ -284,15 +256,14 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkToNetworkInterconnect list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkFabric(String resourceGroupName, String 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. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -301,16 +272,15 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkToNetworkInterconnect list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -319,17 +289,15 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, + beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -339,17 +307,15 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, + beginUpdateAdministrativeState(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. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -358,16 +324,14 @@ PagedIterable listByNetworkFabric(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -377,16 +341,14 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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. @@ -396,16 +358,14 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body); + SyncPoller, NniBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest 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. @@ -416,16 +376,14 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); + SyncPoller, NniBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest 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. @@ -435,15 +393,13 @@ CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); + NniBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest 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. @@ -454,10 +410,10 @@ CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + NniBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java index 9e25c5990e32..c4ab3c48a5e6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Returns list of all operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +26,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 497d5d595070..a6827c84df22 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent; @@ -23,113 +23,100 @@ */ public interface RoutePoliciesClient { /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @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 the RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, + Context context); /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @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 the RoutePolicy resource definition. + * @return the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName); /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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 resource 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 RoutePolicy resource definition. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner resource); /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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 resource 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 RoutePolicy resource definition. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner resource, Context context); /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @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. + * @param resource 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 RoutePolicy resource definition along with {@link Response}. + * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, - Context context); + RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner resource); /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param resource 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 RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName); + RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner resource, + Context context); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -137,16 +124,14 @@ Response getByResourceGroupWithResponse(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, RoutePolicyInner> beginUpdate(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body); + String routePolicyName, RoutePolicyPatch properties); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -155,32 +140,28 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, RoutePolicyInner> beginUpdate(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body, Context context); + String routePolicyName, RoutePolicyPatch properties, Context context); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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 RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body); + RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch properties); /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -188,11 +169,10 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, Context context); + RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch properties, + Context context); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -206,8 +186,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -222,8 +200,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName, Context context); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -236,8 +212,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re void delete(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -251,22 +225,18 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re void delete(String resourceGroupName, String routePolicyName, Context context); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -274,40 +244,34 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @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. @@ -316,7 +280,7 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -324,8 +288,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re 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. @@ -335,7 +297,7 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CommonPostActionResponseForDeviceUpdateInner> @@ -343,8 +305,6 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re 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. @@ -353,15 +313,13 @@ SyncPoller, RoutePolicyInner> beginUpdate(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -371,7 +329,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, @@ -385,7 +343,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -400,7 +358,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateConfigurationResponseInner> @@ -414,7 +372,7 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName); @@ -428,15 +386,13 @@ CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ @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. @@ -444,15 +400,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -461,15 +415,13 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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. @@ -477,14 +429,12 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @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. @@ -493,7 +443,7 @@ ValidateConfigurationResponseInner validateConfiguration(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName, 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 7c86a066724b..8cd1d066ef8d 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 @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.CommunityActionTypes; -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.AccessControlListProperties; import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; import java.util.Map; /** @@ -29,9 +20,9 @@ @Fluent public final class AccessControlListInner extends Resource { /* - * Resource properties. + * The Access ControlList properties */ - private AccessControlListProperties innerProperties = new AccessControlListProperties(); + private AccessControlListProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -60,12 +51,23 @@ public AccessControlListInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The Access ControlList properties. * - * @return the innerProperties value. + * @return the properties value. */ - private AccessControlListProperties innerProperties() { - return this.innerProperties; + public AccessControlListProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The Access ControlList properties. + * + * @param properties the properties value to set. + * @return the AccessControlListInner object itself. + */ + public AccessControlListInner withProperties(AccessControlListProperties properties) { + this.properties = properties; + return this; } /** @@ -125,201 +127,6 @@ public AccessControlListInner withTags(Map tags) { return this; } - /** - * Get the lastSyncedTime property: The last synced 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 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 withConfigurationType(ConfigurationType configurationType) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListProperties(); - } - this.innerProperties().withConfigurationType(configurationType); - return this; - } - - /** - * Get the aclsUrl property: Access Control List file URL. - * - * @return the aclsUrl value. - */ - public String aclsUrl() { - return this.innerProperties() == null ? null : this.innerProperties().aclsUrl(); - } - - /** - * Set the aclsUrl property: Access Control List file URL. - * - * @param aclsUrl the aclsUrl value to set. - * @return the AccessControlListInner object itself. - */ - public AccessControlListInner withAclsUrl(String aclsUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListProperties(); - } - this.innerProperties().withAclsUrl(aclsUrl); - return this; - } - - /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.innerProperties() == null ? null : this.innerProperties().defaultAction(); - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the AccessControlListInner object itself. - */ - public AccessControlListInner withDefaultAction(CommunityActionTypes defaultAction) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListProperties(); - } - this.innerProperties().withDefaultAction(defaultAction); - 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 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; - } - - /** - * 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 AccessControlListInner object itself. - */ - public AccessControlListInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model AccessControlListInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccessControlListInner.class); - /** * {@inheritDoc} */ @@ -328,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -360,7 +167,7 @@ public static AccessControlListInner fromJson(JsonReader jsonReader) throws IOEx Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedAccessControlListInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedAccessControlListInner.innerProperties = AccessControlListProperties.fromJson(reader); + deserializedAccessControlListInner.properties = AccessControlListProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedAccessControlListInner.systemData = SystemData.fromJson(reader); } else { 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 deleted file mode 100644 index ef9cc820b6b0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import java.io.IOException; -import java.util.List; - -/** - * Access Control Lists patch properties. - */ -@Fluent -public final class AccessControlListPatchProperties extends AccessControlListPatchableProperties { - /* - * Switch configuration description. - */ - private String annotation; - - /** - * Creates an instance of AccessControlListPatchProperties class. - */ - public AccessControlListPatchProperties() { - } - - /** - * 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 AccessControlListPatchProperties object itself. - */ - public AccessControlListPatchProperties withAnnotation(String annotation) { - this.annotation = annotation; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessControlListPatchProperties withConfigurationType(ConfigurationType configurationType) { - super.withConfigurationType(configurationType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessControlListPatchProperties withAclsUrl(String aclsUrl) { - super.withAclsUrl(aclsUrl); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessControlListPatchProperties withDefaultAction(CommunityActionTypes defaultAction) { - super.withDefaultAction(defaultAction); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessControlListPatchProperties - withMatchConfigurations(List matchConfigurations) { - super.withMatchConfigurations(matchConfigurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessControlListPatchProperties - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { - super.withDynamicMatchConfigurations(dynamicMatchConfigurations); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("configurationType", - configurationType() == null ? null : configurationType().toString()); - jsonWriter.writeStringField("aclsUrl", aclsUrl()); - jsonWriter.writeStringField("defaultAction", defaultAction() == null ? null : defaultAction().toString()); - jsonWriter.writeArrayField("matchConfigurations", matchConfigurations(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dynamicMatchConfigurations", dynamicMatchConfigurations(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("annotation", this.annotation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessControlListPatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessControlListPatchProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccessControlListPatchProperties. - */ - public static AccessControlListPatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessControlListPatchProperties deserializedAccessControlListPatchProperties - = new AccessControlListPatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("configurationType".equals(fieldName)) { - deserializedAccessControlListPatchProperties - .withConfigurationType(ConfigurationType.fromString(reader.getString())); - } else if ("aclsUrl".equals(fieldName)) { - deserializedAccessControlListPatchProperties.withAclsUrl(reader.getString()); - } else if ("defaultAction".equals(fieldName)) { - deserializedAccessControlListPatchProperties - .withDefaultAction(CommunityActionTypes.fromString(reader.getString())); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> AccessControlListMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchProperties.withMatchConfigurations(matchConfigurations); - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchProperties - .withDynamicMatchConfigurations(dynamicMatchConfigurations); - } else if ("annotation".equals(fieldName)) { - deserializedAccessControlListPatchProperties.annotation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAccessControlListPatchProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffResponseInner.java new file mode 100644 index 000000000000..1764f646a454 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffResponseInner.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Arm Configuration Diff Response. + */ +@Immutable +public final class ArmConfigurationDiffResponseInner implements JsonSerializable { + /* + * Storage URL to the diff file. + */ + private String configurationDiffUrl; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of ArmConfigurationDiffResponseInner class. + */ + private ArmConfigurationDiffResponseInner() { + } + + /** + * Get the configurationDiffUrl property: Storage URL to the diff file. + * + * @return the configurationDiffUrl value. + */ + public String configurationDiffUrl() { + return this.configurationDiffUrl; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationDiffUrl", this.configurationDiffUrl); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ArmConfigurationDiffResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ArmConfigurationDiffResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ArmConfigurationDiffResponseInner. + */ + public static ArmConfigurationDiffResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ArmConfigurationDiffResponseInner deserializedArmConfigurationDiffResponseInner + = new ArmConfigurationDiffResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationDiffUrl".equals(fieldName)) { + deserializedArmConfigurationDiffResponseInner.configurationDiffUrl = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedArmConfigurationDiffResponseInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedArmConfigurationDiffResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusResponseInner.java new file mode 100644 index 000000000000..bc79c017ae1e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusResponseInner.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchState; +import java.io.IOException; + +/** + * Commit Batch Status Response. + */ +@Immutable +public final class CommitBatchStatusResponseInner implements JsonSerializable { + /* + * Commit Batch Identifier. + */ + private String commitBatchId; + + /* + * Commit Batch State. + */ + private CommitBatchState commitBatchState; + + /* + * Commit Batch Details. + */ + private CommitBatchDetails commitBatchDetails; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of CommitBatchStatusResponseInner class. + */ + private CommitBatchStatusResponseInner() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Get the commitBatchState property: Commit Batch State. + * + * @return the commitBatchState value. + */ + public CommitBatchState commitBatchState() { + return this.commitBatchState; + } + + /** + * Get the commitBatchDetails property: Commit Batch Details. + * + * @return the commitBatchDetails value. + */ + public CommitBatchDetails commitBatchDetails() { + return this.commitBatchDetails; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + jsonWriter.writeStringField("commitBatchState", + this.commitBatchState == null ? null : this.commitBatchState.toString()); + jsonWriter.writeJsonField("commitBatchDetails", this.commitBatchDetails); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchStatusResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchStatusResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitBatchStatusResponseInner. + */ + public static CommitBatchStatusResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchStatusResponseInner deserializedCommitBatchStatusResponseInner + = new CommitBatchStatusResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedCommitBatchStatusResponseInner.commitBatchId = reader.getString(); + } else if ("commitBatchState".equals(fieldName)) { + deserializedCommitBatchStatusResponseInner.commitBatchState + = CommitBatchState.fromString(reader.getString()); + } else if ("commitBatchDetails".equals(fieldName)) { + deserializedCommitBatchStatusResponseInner.commitBatchDetails = CommitBatchDetails.fromJson(reader); + } else if ("error".equals(fieldName)) { + deserializedCommitBatchStatusResponseInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchStatusResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java new file mode 100644 index 000000000000..79154917a9e8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The current status of an async operation. + */ +@Immutable +public final class CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner + implements JsonSerializable { + /* + * The error object. + */ + private ManagementError error; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * The additional properties of the operation status result. + */ + private CommonPostActionResponseForDeviceROCommands properties; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * Operation status. + */ + private String status; + + /** + * Creates an instance of CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner class. + */ + private CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner() { + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the properties property: The additional properties of the operation status result. + * + * @return the properties value. + */ + public CommonPostActionResponseForDeviceROCommands properties() { + return this.properties; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner if the JsonReader + * was pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner. + */ + public static CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner + = new CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.status + = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.error + = ManagementError.fromJson(reader); + } else if ("endTime".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("id".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.id + = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.name + = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.properties + = CommonPostActionResponseForDeviceROCommands.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.resourceId + = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceRWCommandsInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceRWCommandsInner.java new file mode 100644 index 000000000000..a24bd869ebc9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceRWCommandsInner.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import java.io.IOException; + +/** + * Common response for device Rw Commands. + */ +@Immutable +public final class CommonPostActionResponseForDeviceRWCommandsInner + implements JsonSerializable { + /* + * The error object. + */ + private ManagementError error; + + /* + * Gets the configuration state. + */ + private ConfigurationState configurationState; + + /* + * Predefined link containing Device Rw Command output. + */ + private String outputUrl; + + /** + * Creates an instance of CommonPostActionResponseForDeviceRWCommandsInner class. + */ + private CommonPostActionResponseForDeviceRWCommandsInner() { + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the outputUrl property: Predefined link containing Device Rw Command output. + * + * @return the outputUrl value. + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeStringField("outputUrl", this.outputUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonPostActionResponseForDeviceRWCommandsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonPostActionResponseForDeviceRWCommandsInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonPostActionResponseForDeviceRWCommandsInner. + */ + public static CommonPostActionResponseForDeviceRWCommandsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonPostActionResponseForDeviceRWCommandsInner deserializedCommonPostActionResponseForDeviceRWCommandsInner + = new CommonPostActionResponseForDeviceRWCommandsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceRWCommandsInner.error + = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceRWCommandsInner.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("outputUrl".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceRWCommandsInner.outputUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonPostActionResponseForDeviceRWCommandsInner; + }); + } +} 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 index b783f7a94dcc..5385442273e9 100644 --- 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,9 +17,14 @@ /** * Common response for device updates. */ -@Fluent +@Immutable public final class CommonPostActionResponseForDeviceUpdateInner implements JsonSerializable { + /* + * The error object. + */ + private ManagementError error; + /* * Gets the configuration state. */ @@ -35,15 +40,19 @@ public final class CommonPostActionResponseForDeviceUpdateInner */ private List failedDevices; - /* - * The error object. + /** + * Creates an instance of CommonPostActionResponseForDeviceUpdateInner class. */ - private ManagementError error; + private CommonPostActionResponseForDeviceUpdateInner() { + } /** - * Creates an instance of CommonPostActionResponseForDeviceUpdateInner class. + * Get the error property: The error object. + * + * @return the error value. */ - public CommonPostActionResponseForDeviceUpdateInner() { + public ManagementError error() { + return this.error; } /** @@ -64,17 +73,6 @@ public List successfulDevices() { 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. * @@ -84,56 +82,17 @@ public List failedDevices() { 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; - } - - /** - * Get the error property: The error object. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: The error object. - * - * @param error the error value to set. - * @return the CommonPostActionResponseForDeviceUpdateInner object itself. - */ - public CommonPostActionResponseForDeviceUpdateInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("error", this.error); jsonWriter.writeArrayField("successfulDevices", this.successfulDevices, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("failedDevices", this.failedDevices, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("error", this.error); return jsonWriter.writeEndObject(); } @@ -153,7 +112,9 @@ public static CommonPostActionResponseForDeviceUpdateInner fromJson(JsonReader j String fieldName = reader.getFieldName(); reader.nextToken(); - if ("configurationState".equals(fieldName)) { + if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceUpdateInner.error = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { deserializedCommonPostActionResponseForDeviceUpdateInner.configurationState = ConfigurationState.fromString(reader.getString()); } else if ("successfulDevices".equals(fieldName)) { @@ -162,8 +123,6 @@ public static CommonPostActionResponseForDeviceUpdateInner fromJson(JsonReader j } else if ("failedDevices".equals(fieldName)) { List failedDevices = reader.readArray(reader1 -> reader1.getString()); deserializedCommonPostActionResponseForDeviceUpdateInner.failedDevices = failedDevices; - } else if ("error".equals(fieldName)) { - deserializedCommonPostActionResponseForDeviceUpdateInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } 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 index 4a3ab5df81d2..cc3355f4ee7a 100644 --- 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,32 +16,23 @@ /** * Common response for the state updates. */ -@Fluent +@Immutable public final class CommonPostActionResponseForStateUpdateInner implements JsonSerializable { - /* - * Gets the configuration state. - */ - private ConfigurationState configurationState; - /* * The error object. */ private ManagementError error; - /** - * Creates an instance of CommonPostActionResponseForStateUpdateInner class. + /* + * Gets the configuration state. */ - public CommonPostActionResponseForStateUpdateInner() { - } + private ConfigurationState configurationState; /** - * Get the configurationState property: Gets the configuration state. - * - * @return the configurationState value. + * Creates an instance of CommonPostActionResponseForStateUpdateInner class. */ - public ConfigurationState configurationState() { - return this.configurationState; + private CommonPostActionResponseForStateUpdateInner() { } /** @@ -54,22 +45,12 @@ public ManagementError error() { } /** - * Set the error property: The error object. - * - * @param error the error value to set. - * @return the CommonPostActionResponseForStateUpdateInner object itself. - */ - public CommonPostActionResponseForStateUpdateInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. + * Get the configurationState property: Gets the configuration state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - public void validate() { + public ConfigurationState configurationState() { + return this.configurationState; } /** @@ -98,11 +79,11 @@ public static CommonPostActionResponseForStateUpdateInner fromJson(JsonReader js String fieldName = reader.getFieldName(); reader.nextToken(); - if ("configurationState".equals(fieldName)) { + if ("error".equals(fieldName)) { + deserializedCommonPostActionResponseForStateUpdateInner.error = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { deserializedCommonPostActionResponseForStateUpdateInner.configurationState = ConfigurationState.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedCommonPostActionResponseForStateUpdateInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchResponseInner.java new file mode 100644 index 000000000000..6c8e1b11691e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchResponseInner.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Discard Commit Batch Response. + */ +@Immutable +public final class DiscardCommitBatchResponseInner implements JsonSerializable { + /* + * Commit Batch Identifier. + */ + private String commitBatchId; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of DiscardCommitBatchResponseInner class. + */ + private DiscardCommitBatchResponseInner() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscardCommitBatchResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscardCommitBatchResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscardCommitBatchResponseInner. + */ + public static DiscardCommitBatchResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscardCommitBatchResponseInner deserializedDiscardCommitBatchResponseInner + = new DiscardCommitBatchResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedDiscardCommitBatchResponseInner.commitBatchId = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedDiscardCommitBatchResponseInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscardCommitBatchResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkBfdAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkBfdAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..09d1ae713ddc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkBfdAdministrativeStateResponseInner.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; +import java.io.IOException; + +/** + * External Network Administrative State response. + */ +@Immutable +public final class ExternalNetworkBfdAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Route Type that helps to know which bfd we are updating. + */ + private ExternalNetworkRouteType routeType; + + /* + * Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of ExternalNetworkBfdAdministrativeStateResponseInner class. + */ + private ExternalNetworkBfdAdministrativeStateResponseInner() { + } + + /** + * Get the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + public ExternalNetworkRouteType routeType() { + return this.routeType; + } + + /** + * Get the administrativeState property: Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkBfdAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkBfdAdministrativeStateResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkBfdAdministrativeStateResponseInner. + */ + public static ExternalNetworkBfdAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkBfdAdministrativeStateResponseInner deserializedExternalNetworkBfdAdministrativeStateResponseInner + = new ExternalNetworkBfdAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedExternalNetworkBfdAdministrativeStateResponseInner.routeType + = ExternalNetworkRouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedExternalNetworkBfdAdministrativeStateResponseInner.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedExternalNetworkBfdAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkBfdAdministrativeStateResponseInner; + }); + } +} 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 bd067ab806fb..28df360e0ce8 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 @@ -1,24 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.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.ExternalNetworkProperties; import java.io.IOException; /** @@ -27,9 +19,9 @@ @Fluent public final class ExternalNetworkInner extends ProxyResource { /* - * Resource properties. + * External Network Properties */ - private ExternalNetworkProperties innerProperties = new ExternalNetworkProperties(); + private ExternalNetworkProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,12 +50,23 @@ public ExternalNetworkInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: External Network Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private ExternalNetworkProperties innerProperties() { - return this.innerProperties; + public ExternalNetworkProperties properties() { + return this.properties; + } + + /** + * Set the properties property: External Network Properties. + * + * @param properties the properties value to set. + * @return the ExternalNetworkInner object itself. + */ + public ExternalNetworkInner withProperties(ExternalNetworkProperties properties) { + this.properties = properties; + return this; } /** @@ -105,270 +108,13 @@ public String id() { return this.id; } - /** - * Get the peeringOption property: Peering option list. - * - * @return the peeringOption value. - */ - public PeeringOption peeringOption() { - return this.innerProperties() == null ? null : this.innerProperties().peeringOption(); - } - - /** - * Set the peeringOption property: Peering option list. - * - * @param peeringOption the peeringOption value to set. - * @return the ExternalNetworkInner object itself. - */ - public ExternalNetworkInner withPeeringOption(PeeringOption peeringOption) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withPeeringOption(peeringOption); - return this; - } - - /** - * Get the optionBProperties property: option B properties object. - * - * @return the optionBProperties value. - */ - public L3OptionBProperties optionBProperties() { - return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); - } - - /** - * Set the optionBProperties property: option B properties object. - * - * @param optionBProperties the optionBProperties value to set. - * @return the ExternalNetworkInner object itself. - */ - public ExternalNetworkInner withOptionBProperties(L3OptionBProperties optionBProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withOptionBProperties(optionBProperties); - return this; - } - - /** - * Get the optionAProperties property: option A properties object. - * - * @return the optionAProperties value. - */ - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.innerProperties() == null ? null : this.innerProperties().optionAProperties(); - } - - /** - * Set the optionAProperties property: option A properties object. - * - * @param optionAProperties the optionAProperties value to set. - * @return the ExternalNetworkInner object itself. - */ - public ExternalNetworkInner withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withOptionAProperties(optionAProperties); - 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. - */ - 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 networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @return the networkToNetworkInterconnectId value. - */ - public String networkToNetworkInterconnectId() { - return this.innerProperties() == null ? null : this.innerProperties().networkToNetworkInterconnectId(); - } - - /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. - * @return the ExternalNetworkInner object itself. - */ - public ExternalNetworkInner withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); - } - - /** - * 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. - */ - public ExternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); - } - - /** - * 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. - */ - public ExternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - this.innerProperties().withExportRoutePolicyId(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. - * - * @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 ExternalNetworkInner object itself. - */ - public ExternalNetworkInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new ExternalNetworkProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model ExternalNetworkInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExternalNetworkInner.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -395,7 +141,7 @@ public static ExternalNetworkInner fromJson(JsonReader jsonReader) throws IOExce } else if ("type".equals(fieldName)) { deserializedExternalNetworkInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedExternalNetworkInner.innerProperties = ExternalNetworkProperties.fromJson(reader); + deserializedExternalNetworkInner.properties = ExternalNetworkProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedExternalNetworkInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBfdAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBfdAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..c8709a88b79b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBfdAdministrativeStateResponseInner.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BFD Administrative State response. + */ +@Immutable +public final class InternalNetworkBfdAdministrativeStateResponseInner + implements JsonSerializable { + /* + * NeighborAddress administrative status + */ + private List neighborAddressAdministrativeStatus; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of InternalNetworkBfdAdministrativeStateResponseInner class. + */ + private InternalNetworkBfdAdministrativeStateResponseInner() { + } + + /** + * Get the neighborAddressAdministrativeStatus property: NeighborAddress administrative status. + * + * @return the neighborAddressAdministrativeStatus value. + */ + public List neighborAddressAdministrativeStatus() { + return this.neighborAddressAdministrativeStatus; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborAddressAdministrativeStatus", this.neighborAddressAdministrativeStatus, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBfdAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBfdAdministrativeStateResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBfdAdministrativeStateResponseInner. + */ + public static InternalNetworkBfdAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBfdAdministrativeStateResponseInner deserializedInternalNetworkBfdAdministrativeStateResponseInner + = new InternalNetworkBfdAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddressAdministrativeStatus".equals(fieldName)) { + List neighborAddressAdministrativeStatus + = reader.readArray(reader1 -> NeighborAddressBfdAdministrativeStatus.fromJson(reader1)); + deserializedInternalNetworkBfdAdministrativeStateResponseInner.neighborAddressAdministrativeStatus + = neighborAddressAdministrativeStatus; + } else if ("error".equals(fieldName)) { + deserializedInternalNetworkBfdAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBfdAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBgpAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBgpAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..3b06368aba08 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBgpAdministrativeStateResponseInner.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network Administrative State Response. + */ +@Immutable +public final class InternalNetworkBgpAdministrativeStateResponseInner + implements JsonSerializable { + /* + * NeighborAddress administrative status + */ + private List neighborAddressAdministrativeStatus; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of InternalNetworkBgpAdministrativeStateResponseInner class. + */ + private InternalNetworkBgpAdministrativeStateResponseInner() { + } + + /** + * Get the neighborAddressAdministrativeStatus property: NeighborAddress administrative status. + * + * @return the neighborAddressAdministrativeStatus value. + */ + public List neighborAddressAdministrativeStatus() { + return this.neighborAddressAdministrativeStatus; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborAddressAdministrativeStatus", this.neighborAddressAdministrativeStatus, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBgpAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBgpAdministrativeStateResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBgpAdministrativeStateResponseInner. + */ + public static InternalNetworkBgpAdministrativeStateResponseInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBgpAdministrativeStateResponseInner deserializedInternalNetworkBgpAdministrativeStateResponseInner + = new InternalNetworkBgpAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddressAdministrativeStatus".equals(fieldName)) { + List neighborAddressAdministrativeStatus + = reader.readArray(reader1 -> NeighborAddressBgpAdministrativeStatus.fromJson(reader1)); + deserializedInternalNetworkBgpAdministrativeStateResponseInner.neighborAddressAdministrativeStatus + = neighborAddressAdministrativeStatus; + } else if ("error".equals(fieldName)) { + deserializedInternalNetworkBgpAdministrativeStateResponseInner.error + = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBgpAdministrativeStateResponseInner; + }); + } +} 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 98184b86f8cf..004a2836cbfb 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 @@ -1,28 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.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.InternalNetworkProperties; import java.io.IOException; -import java.util.List; /** * Defines the Internal Network resource. @@ -30,9 +19,9 @@ @Fluent public final class InternalNetworkInner extends ProxyResource { /* - * Resource properties. + * The Internal Network Properties */ - private InternalNetworkProperties innerProperties = new InternalNetworkProperties(); + private InternalNetworkProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -61,12 +50,23 @@ public InternalNetworkInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The Internal Network Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private InternalNetworkProperties innerProperties() { - return this.innerProperties; + public InternalNetworkProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The Internal Network Properties. + * + * @param properties the properties value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withProperties(InternalNetworkProperties properties) { + this.properties = properties; + return this; } /** @@ -108,407 +108,13 @@ public String id() { return this.id; } - /** - * Get the vlanId property: Vlan identifier. Example: 1001. - * - * @return the vlanId value. - */ - public int vlanId() { - return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); - } - - /** - * Set the vlanId property: Vlan identifier. Example: 1001. - * - * @param vlanId the vlanId value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withVlanId(int vlanId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withVlanId(vlanId); - return this; - } - - /** - * Get the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. - */ - public InternalNetworkPropertiesBgpConfiguration 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 InternalNetworkInner object itself. - */ - public InternalNetworkInner withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withBgpConfiguration(bgpConfiguration); - return this; - } - - /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. - * - * @return the staticRouteConfiguration value. - */ - public InternalNetworkPropertiesStaticRouteConfiguration 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 InternalNetworkInner object itself. - */ - public InternalNetworkInner - withStaticRouteConfiguration(InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); - 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. - */ - 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 mtu property: Maximum transmission unit. Default value is 1500. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.innerProperties() == null ? null : this.innerProperties().mtu(); - } - - /** - * Set the mtu property: Maximum transmission unit. Default value is 1500. - * - * @param mtu the mtu value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withMtu(Integer mtu) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withMtu(mtu); - return this; - } - - /** - * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @return the connectedIPv4Subnets value. - */ - public List connectedIPv4Subnets() { - return this.innerProperties() == null ? null : this.innerProperties().connectedIPv4Subnets(); - } - - /** - * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withConnectedIPv4Subnets(List connectedIPv4Subnets) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withConnectedIPv4Subnets(connectedIPv4Subnets); - return this; - } - - /** - * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @return the connectedIPv6Subnets value. - */ - public List connectedIPv6Subnets() { - return this.innerProperties() == null ? null : this.innerProperties().connectedIPv6Subnets(); - } - - /** - * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. - * @return the InternalNetworkInner object itself. - */ - public InternalNetworkInner withConnectedIPv6Subnets(List connectedIPv6Subnets) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withConnectedIPv6Subnets(connectedIPv6Subnets); - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); - } - - /** - * 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 InternalNetworkInner object itself. - */ - public InternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); - } - - /** - * 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 InternalNetworkInner object itself. - */ - public InternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withExportRoutePolicyId(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 InternalNetworkInner object itself. - */ - public InternalNetworkInner withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - 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 InternalNetworkInner object itself. - */ - public InternalNetworkInner withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - 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; - } - - /** - * 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 InternalNetworkInner object itself. - */ - public InternalNetworkInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model InternalNetworkInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InternalNetworkInner.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -535,7 +141,7 @@ public static InternalNetworkInner fromJson(JsonReader jsonReader) throws IOExce } else if ("type".equals(fieldName)) { deserializedInternalNetworkInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedInternalNetworkInner.innerProperties = InternalNetworkProperties.fromJson(reader); + deserializedInternalNetworkInner.properties = InternalNetworkProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedInternalNetworkInner.systemData = SystemData.fromJson(reader); } else { 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 index 09464c1bf977..3c1534762121 100644 --- 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 @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; import java.io.IOException; import java.util.Map; @@ -22,9 +20,9 @@ @Fluent public final class InternetGatewayInner extends Resource { /* - * Resource properties. + * The Internet Gateway Properties */ - private InternetGatewayProperties innerProperties = new InternetGatewayProperties(); + private InternetGatewayProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,12 +51,23 @@ public InternetGatewayInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The Internet Gateway Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private InternetGatewayProperties innerProperties() { - return this.innerProperties; + public InternetGatewayProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The Internet Gateway Properties. + * + * @param properties the properties value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withProperties(InternetGatewayProperties properties) { + this.properties = properties; + return this; } /** @@ -118,142 +127,6 @@ public InternetGatewayInner withTags(Map 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model InternetGatewayInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayInner.class); - /** * {@inheritDoc} */ @@ -262,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -294,7 +167,7 @@ public static InternetGatewayInner fromJson(JsonReader jsonReader) throws IOExce Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedInternetGatewayInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedInternetGatewayInner.innerProperties = InternetGatewayProperties.fromJson(reader); + deserializedInternetGatewayInner.properties = InternetGatewayProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedInternetGatewayInner.systemData = SystemData.fromJson(reader); } else { 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 index 89f89ed01824..003ad2918300 100644 --- 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 @@ -1,20 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -23,9 +20,9 @@ @Fluent public final class InternetGatewayRuleInner extends Resource { /* - * Resource properties. + * The Internet Gateway Rule properties */ - private InternetGatewayRuleProperties innerProperties = new InternetGatewayRuleProperties(); + private InternetGatewayRuleProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,12 +51,23 @@ public InternetGatewayRuleInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The Internet Gateway Rule properties. * - * @return the innerProperties value. + * @return the properties value. */ - private InternetGatewayRuleProperties innerProperties() { - return this.innerProperties; + public InternetGatewayRuleProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The Internet Gateway Rule properties. + * + * @param properties the properties value to set. + * @return the InternetGatewayRuleInner object itself. + */ + public InternetGatewayRuleInner withProperties(InternetGatewayRuleProperties properties) { + this.properties = properties; + return this; } /** @@ -119,87 +127,6 @@ public InternetGatewayRuleInner withTags(Map 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model InternetGatewayRuleInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRuleInner.class); - /** * {@inheritDoc} */ @@ -208,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -240,8 +167,7 @@ public static InternetGatewayRuleInner fromJson(JsonReader jsonReader) throws IO Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedInternetGatewayRuleInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedInternetGatewayRuleInner.innerProperties - = InternetGatewayRuleProperties.fromJson(reader); + deserializedInternetGatewayRuleInner.properties = InternetGatewayRuleProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedInternetGatewayRuleInner.systemData = SystemData.fromJson(reader); } else { 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 3667dc88f6c4..dbf1257b7e7c 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 @@ -1,22 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.IpCommunityProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -25,9 +20,9 @@ @Fluent public final class IpCommunityInner extends Resource { /* - * Resource properties. + * The IP Community Properties */ - private IpCommunityProperties innerProperties = new IpCommunityProperties(); + private IpCommunityProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -56,12 +51,23 @@ public IpCommunityInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The IP Community Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private IpCommunityProperties innerProperties() { - return this.innerProperties; + public IpCommunityProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The IP Community Properties. + * + * @param properties the properties value to set. + * @return the IpCommunityInner object itself. + */ + public IpCommunityInner withProperties(IpCommunityProperties properties) { + this.properties = properties; + return this; } /** @@ -121,96 +127,6 @@ public IpCommunityInner withTags(Map tags) { 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. - */ - 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 ipCommunityRules property: List of IP Community Rules. - * - * @return the ipCommunityRules value. - */ - public List ipCommunityRules() { - return this.innerProperties() == null ? null : this.innerProperties().ipCommunityRules(); - } - - /** - * Set the ipCommunityRules property: List of IP Community Rules. - * - * @param ipCommunityRules the ipCommunityRules value to set. - * @return the IpCommunityInner object itself. - */ - public IpCommunityInner withIpCommunityRules(List ipCommunityRules) { - if (this.innerProperties() == null) { - this.innerProperties = new IpCommunityProperties(); - } - this.innerProperties().withIpCommunityRules(ipCommunityRules); - 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 IpCommunityInner object itself. - */ - public IpCommunityInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpCommunityProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model IpCommunityInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpCommunityInner.class); - /** * {@inheritDoc} */ @@ -219,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -251,7 +167,7 @@ public static IpCommunityInner fromJson(JsonReader jsonReader) throws IOExceptio Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedIpCommunityInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedIpCommunityInner.innerProperties = IpCommunityProperties.fromJson(reader); + deserializedIpCommunityInner.properties = IpCommunityProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedIpCommunityInner.systemData = SystemData.fromJson(reader); } else { 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 2a2240106e8b..d916a0b53bee 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 @@ -1,22 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -25,9 +20,9 @@ @Fluent public final class IpExtendedCommunityInner extends Resource { /* - * Resource properties. + * The IpExtendedCommunity properties */ - private IpExtendedCommunityProperties innerProperties = new IpExtendedCommunityProperties(); + private IpExtendedCommunityProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -56,12 +51,23 @@ public IpExtendedCommunityInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The IpExtendedCommunity properties. * - * @return the innerProperties value. + * @return the properties value. */ - private IpExtendedCommunityProperties innerProperties() { - return this.innerProperties; + public IpExtendedCommunityProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The IpExtendedCommunity properties. + * + * @param properties the properties value to set. + * @return the IpExtendedCommunityInner object itself. + */ + public IpExtendedCommunityInner withProperties(IpExtendedCommunityProperties properties) { + this.properties = properties; + return this; } /** @@ -121,97 +127,6 @@ public IpExtendedCommunityInner withTags(Map tags) { 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. - */ - 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 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 IpExtendedCommunityInner object itself. - */ - public IpExtendedCommunityInner - withIpExtendedCommunityRules(List ipExtendedCommunityRules) { - if (this.innerProperties() == null) { - this.innerProperties = new IpExtendedCommunityProperties(); - } - this.innerProperties().withIpExtendedCommunityRules(ipExtendedCommunityRules); - 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 IpExtendedCommunityInner object itself. - */ - public IpExtendedCommunityInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpExtendedCommunityProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model IpExtendedCommunityInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityInner.class); - /** * {@inheritDoc} */ @@ -220,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -252,8 +167,7 @@ public static IpExtendedCommunityInner fromJson(JsonReader jsonReader) throws IO Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedIpExtendedCommunityInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedIpExtendedCommunityInner.innerProperties - = IpExtendedCommunityProperties.fromJson(reader); + deserializedIpExtendedCommunityInner.properties = IpExtendedCommunityProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedIpExtendedCommunityInner.systemData = SystemData.fromJson(reader); } else { 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 d91926868cf9..bf3b6cdb98b6 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 @@ -1,22 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.azure.resourcemanager.managednetworkfabric.models.IpPrefixProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -25,9 +20,9 @@ @Fluent public final class IpPrefixInner extends Resource { /* - * Resource properties. + * The IP Prefix properties */ - private IpPrefixProperties innerProperties = new IpPrefixProperties(); + private IpPrefixProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -56,12 +51,23 @@ public IpPrefixInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The IP Prefix properties. * - * @return the innerProperties value. + * @return the properties value. */ - private IpPrefixProperties innerProperties() { - return this.innerProperties; + public IpPrefixProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The IP Prefix properties. + * + * @param properties the properties value to set. + * @return the IpPrefixInner object itself. + */ + public IpPrefixInner withProperties(IpPrefixProperties properties) { + this.properties = properties; + return this; } /** @@ -121,95 +127,6 @@ public IpPrefixInner withTags(Map tags) { 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. - */ - 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() { - 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 IpPrefixInner object itself. - */ - public IpPrefixInner withIpPrefixRules(List ipPrefixRules) { - if (this.innerProperties() == null) { - this.innerProperties = new IpPrefixProperties(); - } - 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 IpPrefixInner object itself. - */ - public IpPrefixInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpPrefixProperties(); - } - 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.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model IpPrefixInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpPrefixInner.class); - /** * {@inheritDoc} */ @@ -218,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -250,7 +167,7 @@ public static IpPrefixInner fromJson(JsonReader jsonReader) throws IOException { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedIpPrefixInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedIpPrefixInner.innerProperties = IpPrefixProperties.fromJson(reader); + deserializedIpPrefixInner.properties = IpPrefixProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedIpPrefixInner.systemData = SystemData.fromJson(reader); } else { 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 9e5b1f3da88d..78941e827bd0 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 @@ -1,19 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.L2IsolationDomainProperties; import java.io.IOException; import java.util.Map; @@ -23,9 +20,9 @@ @Fluent public final class L2IsolationDomainInner extends Resource { /* - * Resource properties. + * The L2IsolationDomain properties */ - private L2IsolationDomainProperties innerProperties = new L2IsolationDomainProperties(); + private L2IsolationDomainProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,12 +51,23 @@ public L2IsolationDomainInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The L2IsolationDomain properties. * - * @return the innerProperties value. + * @return the properties value. */ - private L2IsolationDomainProperties innerProperties() { - return this.innerProperties; + public L2IsolationDomainProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The L2IsolationDomain properties. + * + * @param properties the properties value to set. + * @return the L2IsolationDomainInner object itself. + */ + public L2IsolationDomainInner withProperties(L2IsolationDomainProperties properties) { + this.properties = properties; + return this; } /** @@ -119,142 +127,6 @@ public L2IsolationDomainInner withTags(Map 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 L2IsolationDomainInner object itself. - */ - public L2IsolationDomainInner withNetworkFabricId(String networkFabricId) { - if (this.innerProperties() == null) { - this.innerProperties = new L2IsolationDomainProperties(); - } - this.innerProperties().withNetworkFabricId(networkFabricId); - return this; - } - - /** - * Get the vlanId property: Vlan Identifier of the Network Fabric. Example: 501. - * - * @return the vlanId value. - */ - public int vlanId() { - return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); - } - - /** - * 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(int vlanId) { - if (this.innerProperties() == null) { - this.innerProperties = new L2IsolationDomainProperties(); - } - this.innerProperties().withVlanId(vlanId); - return this; - } - - /** - * Get the mtu property: Maximum transmission unit. Default value is 1500. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.innerProperties() == null ? null : this.innerProperties().mtu(); - } - - /** - * Set the mtu property: Maximum transmission unit. Default value is 1500. - * - * @param mtu the mtu value to set. - * @return the L2IsolationDomainInner object itself. - */ - public L2IsolationDomainInner withMtu(Integer mtu) { - if (this.innerProperties() == null) { - this.innerProperties = new L2IsolationDomainProperties(); - } - this.innerProperties().withMtu(mtu); - 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. - */ - 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. - * - * @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 L2IsolationDomainInner object itself. - */ - public L2IsolationDomainInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new L2IsolationDomainProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model L2IsolationDomainInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L2IsolationDomainInner.class); - /** * {@inheritDoc} */ @@ -263,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -295,7 +167,7 @@ public static L2IsolationDomainInner fromJson(JsonReader jsonReader) throws IOEx Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedL2IsolationDomainInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedL2IsolationDomainInner.innerProperties = L2IsolationDomainProperties.fromJson(reader); + deserializedL2IsolationDomainInner.properties = L2IsolationDomainProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedL2IsolationDomainInner.systemData = SystemData.fromJson(reader); } else { 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 deleted file mode 100644 index a3881293c1d6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import java.io.IOException; - -/** - * 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. - */ - private Integer mtu; - - /** - * Creates an instance of L2IsolationDomainPatchProperties class. - */ - public L2IsolationDomainPatchProperties() { - } - - /** - * Get the mtu property: Maximum transmission unit. Default value is 1500. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.mtu; - } - - /** - * Set the mtu property: Maximum transmission unit. Default value is 1500. - * - * @param mtu the mtu value to set. - * @return the L2IsolationDomainPatchProperties object itself. - */ - public L2IsolationDomainPatchProperties withMtu(Integer mtu) { - this.mtu = mtu; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public L2IsolationDomainPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeNumberField("mtu", this.mtu); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L2IsolationDomainPatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L2IsolationDomainPatchProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the L2IsolationDomainPatchProperties. - */ - public static L2IsolationDomainPatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L2IsolationDomainPatchProperties deserializedL2IsolationDomainPatchProperties - = new L2IsolationDomainPatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedL2IsolationDomainPatchProperties.withAnnotation(reader.getString()); - } else if ("mtu".equals(fieldName)) { - deserializedL2IsolationDomainPatchProperties.mtu = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedL2IsolationDomainPatchProperties; - }); - } -} 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 667e6834ae70..79d794987e57 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 @@ -1,23 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -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.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainProperties; import java.io.IOException; import java.util.Map; @@ -27,9 +20,9 @@ @Fluent public final class L3IsolationDomainInner extends Resource { /* - * Resource properties. + * The L3 Isolation Domain Properties */ - private L3IsolationDomainProperties innerProperties = new L3IsolationDomainProperties(); + private L3IsolationDomainProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,12 +51,23 @@ public L3IsolationDomainInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The L3 Isolation Domain Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private L3IsolationDomainProperties innerProperties() { - return this.innerProperties; + public L3IsolationDomainProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The L3 Isolation Domain Properties. + * + * @param properties the properties value to set. + * @return the L3IsolationDomainInner object itself. + */ + public L3IsolationDomainInner withProperties(L3IsolationDomainProperties properties) { + this.properties = properties; + return this; } /** @@ -123,191 +127,6 @@ public L3IsolationDomainInner withTags(Map 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 L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner withNetworkFabricId(String networkFabricId) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - this.innerProperties().withNetworkFabricId(networkFabricId); - 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. - */ - 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 redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". - * - * @return the redistributeConnectedSubnets value. - */ - public RedistributeConnectedSubnets redistributeConnectedSubnets() { - return this.innerProperties() == null ? null : this.innerProperties().redistributeConnectedSubnets(); - } - - /** - * Set the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". - * - * @param redistributeConnectedSubnets the redistributeConnectedSubnets value to set. - * @return the L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner - withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - this.innerProperties().withRedistributeConnectedSubnets(redistributeConnectedSubnets); - return this; - } - - /** - * Get the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @return the redistributeStaticRoutes value. - */ - public RedistributeStaticRoutes redistributeStaticRoutes() { - return this.innerProperties() == null ? null : this.innerProperties().redistributeStaticRoutes(); - } - - /** - * Set the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @param redistributeStaticRoutes the redistributeStaticRoutes value to set. - * @return the L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - this.innerProperties().withRedistributeStaticRoutes(redistributeStaticRoutes); - return this; - } - - /** - * Get the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @return the aggregateRouteConfiguration value. - */ - public AggregateRouteConfiguration aggregateRouteConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().aggregateRouteConfiguration(); - } - - /** - * Set the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. - * @return the L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - this.innerProperties().withAggregateRouteConfiguration(aggregateRouteConfiguration); - return this; - } - - /** - * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @return the connectedSubnetRoutePolicy value. - */ - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy(); - } - - /** - * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set. - * @return the L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner - withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - this.innerProperties().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); - 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 L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model L3IsolationDomainInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L3IsolationDomainInner.class); - /** * {@inheritDoc} */ @@ -316,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -348,7 +167,7 @@ public static L3IsolationDomainInner fromJson(JsonReader jsonReader) throws IOEx Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedL3IsolationDomainInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedL3IsolationDomainInner.innerProperties = L3IsolationDomainProperties.fromJson(reader); + deserializedL3IsolationDomainInner.properties = L3IsolationDomainProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedL3IsolationDomainInner.systemData = SystemData.fromJson(reader); } else { 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 index 29344f891b94..305c074b31d2 100644 --- 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 @@ -1,20 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -23,9 +20,9 @@ @Fluent public final class NeighborGroupInner extends Resource { /* - * Resource properties. + * The NeighborGroup Properties */ - private NeighborGroupProperties innerProperties = new NeighborGroupProperties(); + private NeighborGroupProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,12 +51,23 @@ public NeighborGroupInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NeighborGroup Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NeighborGroupProperties innerProperties() { - return this.innerProperties; + public NeighborGroupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NeighborGroup Properties. + * + * @param properties the properties value to set. + * @return the NeighborGroupInner object itself. + */ + public NeighborGroupInner withProperties(NeighborGroupProperties properties) { + this.properties = properties; + return this; } /** @@ -119,96 +127,6 @@ public NeighborGroupInner withTags(Map 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NeighborGroupInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NeighborGroupInner.class); - /** * {@inheritDoc} */ @@ -217,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -249,7 +167,7 @@ public static NeighborGroupInner fromJson(JsonReader jsonReader) throws IOExcept Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNeighborGroupInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNeighborGroupInner.innerProperties = NeighborGroupProperties.fromJson(reader); + deserializedNeighborGroupInner.properties = NeighborGroupProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNeighborGroupInner.systemData = SystemData.fromJson(reader); } else { 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 41e9aab3d42d..d460a6ecbc8b 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 @@ -1,20 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties; import java.io.IOException; import java.util.Map; @@ -24,9 +20,9 @@ @Fluent public final class NetworkDeviceInner extends Resource { /* - * Resource properties. + * The NetworkDevice properties */ - private NetworkDeviceProperties innerProperties = new NetworkDeviceProperties(); + private NetworkDeviceProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -55,12 +51,23 @@ public NetworkDeviceInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkDevice properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkDeviceProperties innerProperties() { - return this.innerProperties; + public NetworkDeviceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkDevice properties. + * + * @param properties the properties value to set. + * @return the NetworkDeviceInner object itself. + */ + public NetworkDeviceInner withProperties(NetworkDeviceProperties properties) { + this.properties = properties; + return this; } /** @@ -120,189 +127,6 @@ public NetworkDeviceInner withTags(Map tags) { return this; } - /** - * Get the version property: Current version of the device as defined in SKU. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Get the networkDeviceSku property: Network Device SKU name. - * - * @return the networkDeviceSku value. - */ - public String networkDeviceSku() { - return this.innerProperties() == null ? null : this.innerProperties().networkDeviceSku(); - } - - /** - * Set the networkDeviceSku property: Network Device SKU name. - * - * @param networkDeviceSku the networkDeviceSku value to set. - * @return the NetworkDeviceInner object itself. - */ - public NetworkDeviceInner withNetworkDeviceSku(String networkDeviceSku) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withNetworkDeviceSku(networkDeviceSku); - return this; - } - - /** - * Get the networkDeviceRole property: NetworkDeviceRole is the device role: Example: CE | ToR. - * - * @return the networkDeviceRole value. - */ - public NetworkDeviceRole networkDeviceRole() { - return this.innerProperties() == null ? null : this.innerProperties().networkDeviceRole(); - } - - /** - * Get the networkRackId property: Reference to network rack resource id. - * - * @return the networkRackId value. - */ - public String networkRackId() { - return this.innerProperties() == null ? null : this.innerProperties().networkRackId(); - } - - /** - * 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. - */ - 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 hostname property: The host name of the device. - * - * @return the hostname value. - */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); - } - - /** - * Set the hostname property: The host name of the device. - * - * @param hostname the hostname value to set. - * @return the NetworkDeviceInner object itself. - */ - public NetworkDeviceInner withHostname(String hostname) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withHostname(hostname); - return this; - } - - /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); - } - - /** - * 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. - */ - public NetworkDeviceInner withSerialNumber(String serialNumber) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withSerialNumber(serialNumber); - 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 NetworkDeviceInner object itself. - */ - public NetworkDeviceInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkDeviceInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceInner.class); - /** * {@inheritDoc} */ @@ -311,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -343,7 +167,7 @@ public static NetworkDeviceInner fromJson(JsonReader jsonReader) throws IOExcept Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkDeviceInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkDeviceInner.innerProperties = NetworkDeviceProperties.fromJson(reader); + deserializedNetworkDeviceInner.properties = NetworkDeviceProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkDeviceInner.systemData = SystemData.fromJson(reader); } else { 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 a826de6b1ced..1bf0b688f137 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 @@ -1,32 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkuProperties; import java.io.IOException; -import java.util.List; /** * The NetworkDeviceSku resource definition. */ -@Fluent +@Immutable public final class NetworkDeviceSkuInner extends ProxyResource { /* - * Resource properties. + * The NetworkDeviceSku properties */ - private NetworkDeviceSkuProperties innerProperties = new NetworkDeviceSkuProperties(); + private NetworkDeviceSkuProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -51,16 +46,16 @@ public final class NetworkDeviceSkuInner extends ProxyResource { /** * Creates an instance of NetworkDeviceSkuInner class. */ - public NetworkDeviceSkuInner() { + private NetworkDeviceSkuInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkDeviceSku properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkDeviceSkuProperties innerProperties() { - return this.innerProperties; + public NetworkDeviceSkuProperties properties() { + return this.properties; } /** @@ -102,154 +97,13 @@ public String id() { return this.id; } - /** - * Get the model property: Model of the network device. - * - * @return the model value. - */ - public String model() { - return this.innerProperties() == null ? null : this.innerProperties().model(); - } - - /** - * Set the model property: Model of the network device. - * - * @param model the model value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withModel(String model) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withModel(model); - return this; - } - - /** - * Get the manufacturer property: Manufacturer of the network device. - * - * @return the manufacturer value. - */ - public String manufacturer() { - return this.innerProperties() == null ? null : this.innerProperties().manufacturer(); - } - - /** - * Set the manufacturer property: Manufacturer of the network device. - * - * @param manufacturer the manufacturer value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withManufacturer(String manufacturer) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withManufacturer(manufacturer); - return this; - } - - /** - * Get the supportedVersions property: List of supported version details of network device. - * - * @return the supportedVersions value. - */ - public List supportedVersions() { - return this.innerProperties() == null ? null : this.innerProperties().supportedVersions(); - } - - /** - * Set the supportedVersions property: List of supported version details of network device. - * - * @param supportedVersions the supportedVersions value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withSupportedVersions(List supportedVersions) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withSupportedVersions(supportedVersions); - return this; - } - - /** - * Get the supportedRoleTypes property: Available roles for the network device. - * - * @return the supportedRoleTypes value. - */ - public List supportedRoleTypes() { - return this.innerProperties() == null ? null : this.innerProperties().supportedRoleTypes(); - } - - /** - * Set the supportedRoleTypes property: Available roles for the network device. - * - * @param supportedRoleTypes the supportedRoleTypes value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withSupportedRoleTypes(List supportedRoleTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withSupportedRoleTypes(supportedRoleTypes); - return this; - } - - /** - * Get the interfaces property: List of network device interfaces. - * - * @return the interfaces value. - */ - public List interfaces() { - return this.innerProperties() == null ? null : this.innerProperties().interfaces(); - } - - /** - * Set the interfaces property: List of network device interfaces. - * - * @param interfaces the interfaces value to set. - * @return the NetworkDeviceSkuInner object itself. - */ - public NetworkDeviceSkuInner withInterfaces(List interfaces) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceSkuProperties(); - } - this.innerProperties().withInterfaces(interfaces); - 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(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkDeviceSkuInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceSkuInner.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -276,7 +130,7 @@ public static NetworkDeviceSkuInner fromJson(JsonReader jsonReader) throws IOExc } else if ("type".equals(fieldName)) { deserializedNetworkDeviceSkuInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedNetworkDeviceSkuInner.innerProperties = NetworkDeviceSkuProperties.fromJson(reader); + deserializedNetworkDeviceSkuInner.properties = NetworkDeviceSkuProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkDeviceSkuInner.systemData = SystemData.fromJson(reader); } else { 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 4c639cf0b900..a3f379de673b 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 @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; -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 com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -27,9 +20,9 @@ @Fluent public final class NetworkFabricControllerInner extends Resource { /* - * Resource properties. + * The NetworkFabricController Properties */ - private NetworkFabricControllerProperties innerProperties = new NetworkFabricControllerProperties(); + private NetworkFabricControllerProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,12 +51,23 @@ public NetworkFabricControllerInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkFabricController Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkFabricControllerProperties innerProperties() { - return this.innerProperties; + public NetworkFabricControllerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkFabricController Properties. + * + * @param properties the properties value to set. + * @return the NetworkFabricControllerInner object itself. + */ + public NetworkFabricControllerInner withProperties(NetworkFabricControllerProperties properties) { + this.properties = properties; + return this; } /** @@ -123,282 +127,6 @@ public NetworkFabricControllerInner withTags(Map tags) { return this; } - /** - * Get the infrastructureServices property: InfrastructureServices IP ranges. - * - * @return the infrastructureServices value. - */ - public ControllerServices infrastructureServices() { - return this.innerProperties() == null ? null : this.innerProperties().infrastructureServices(); - } - - /** - * Get the workloadServices property: WorkloadServices IP ranges. - * - * @return the workloadServices value. - */ - public ControllerServices workloadServices() { - return this.innerProperties() == null ? null : this.innerProperties().workloadServices(); - } - - /** - * Get the managedResourceGroupConfiguration property: Managed Resource Group configuration properties. - * - * @return the managedResourceGroupConfiguration value. - */ - public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupConfiguration(); - } - - /** - * Set the managedResourceGroupConfiguration property: Managed Resource Group configuration properties. - * - * @param managedResourceGroupConfiguration the managedResourceGroupConfiguration value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner - withManagedResourceGroupConfiguration(ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); - return this; - } - - /** - * Get the networkFabricIds property: The NF-ID will be an input parameter used by the NF to link and get associated - * with the parent NFC Service. - * - * @return the networkFabricIds value. - */ - public List networkFabricIds() { - return this.innerProperties() == null ? null : this.innerProperties().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. This is used for the backward compatibility. - * - * @return the workloadManagementNetwork value. - */ - 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. - * - * @return the ipv4AddressSpace value. - */ - public String ipv4AddressSpace() { - return this.innerProperties() == null ? null : this.innerProperties().ipv4AddressSpace(); - } - - /** - * Set the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space. - * - * @param ipv4AddressSpace the ipv4AddressSpace value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withIpv4AddressSpace(String ipv4AddressSpace) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withIpv4AddressSpace(ipv4AddressSpace); - return this; - } - - /** - * Get the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space. - * - * @return the ipv6AddressSpace value. - */ - public String ipv6AddressSpace() { - return this.innerProperties() == null ? null : this.innerProperties().ipv6AddressSpace(); - } - - /** - * Set the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space. - * - * @param ipv6AddressSpace the ipv6AddressSpace value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withIpv6AddressSpace(String ipv6AddressSpace) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withIpv6AddressSpace(ipv6AddressSpace); - return this; - } - - /** - * 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. - * - * @param nfcSku the nfcSku value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withNfcSku(NfcSku nfcSku) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withNfcSku(nfcSku); - return this; - } - - /** - * 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 infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @return the infrastructureExpressRouteConnections value. - */ - public List infrastructureExpressRouteConnections() { - return this.innerProperties() == null ? null : this.innerProperties().infrastructureExpressRouteConnections(); - } - - /** - * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); - return this; - } - - /** - * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @return the workloadExpressRouteConnections value. - */ - public List workloadExpressRouteConnections() { - return this.innerProperties() == null ? null : this.innerProperties().workloadExpressRouteConnections(); - } - - /** - * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. - * @return the NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner - withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections); - 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 NetworkFabricControllerInner object itself. - */ - public NetworkFabricControllerInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkFabricControllerInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricControllerInner.class); - /** * {@inheritDoc} */ @@ -407,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -439,7 +167,7 @@ public static NetworkFabricControllerInner fromJson(JsonReader jsonReader) throw Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkFabricControllerInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkFabricControllerInner.innerProperties + deserializedNetworkFabricControllerInner.properties = NetworkFabricControllerProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkFabricControllerInner.systemData = SystemData.fromJson(reader); 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 f2d92ddb7617..9a3261d5a00c 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 @@ -1,23 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -26,9 +21,14 @@ @Fluent public final class NetworkFabricInner extends Resource { /* - * Resource properties. + * The NetworkFabric Properties */ - private NetworkFabricProperties innerProperties = new NetworkFabricProperties(); + private NetworkFabricProperties properties; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -57,12 +57,43 @@ public NetworkFabricInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkFabric Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkFabricProperties innerProperties() { - return this.innerProperties; + public NetworkFabricProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkFabric Properties. + * + * @param properties the properties value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withProperties(NetworkFabricProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; } /** @@ -122,351 +153,6 @@ public NetworkFabricInner withTags(Map tags) { return this; } - /** - * Get the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user - * chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it - * is a single / multi rack Network Fabric. - * - * @return the networkFabricSku value. - */ - public String networkFabricSku() { - return this.innerProperties() == null ? null : this.innerProperties().networkFabricSku(); - } - - /** - * Set the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user - * chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it - * is a single / multi rack Network Fabric. - * - * @param networkFabricSku the networkFabricSku value to set. - * @return the NetworkFabricInner object itself. - */ - public NetworkFabricInner withNetworkFabricSku(String networkFabricSku) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withNetworkFabricSku(networkFabricSku); - return this; - } - - /** - * Get the fabricVersion property: The version of Network Fabric. - * - * @return the fabricVersion value. - */ - public String fabricVersion() { - return this.innerProperties() == null ? null : this.innerProperties().fabricVersion(); - } - - /** - * Set the fabricVersion property: The version of Network Fabric. - * - * @param fabricVersion the fabricVersion value to set. - * @return the NetworkFabricInner object itself. - */ - public NetworkFabricInner withFabricVersion(String fabricVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withFabricVersion(fabricVersion); - return this; - } - - /** - * 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. - */ - 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 NetworkFabricInner object itself. - */ - public NetworkFabricInner withRackCount(Integer rackCount) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withRackCount(rackCount); - return this; - } - - /** - * Get the serverCountPerRack property: Number of servers.Possible values are from 1-16. - * - * @return the serverCountPerRack value. - */ - public int serverCountPerRack() { - return this.innerProperties() == null ? 0 : 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 NetworkFabricInner object itself. - */ - public NetworkFabricInner withServerCountPerRack(int serverCountPerRack) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - 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 NetworkFabricInner object itself. - */ - public NetworkFabricInner withIpv4Prefix(String ipv4Prefix) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - 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 NetworkFabricInner object itself. - */ - public NetworkFabricInner withIpv6Prefix(String ipv6Prefix) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - 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 ? 0L : this.innerProperties().fabricAsn(); - } - - /** - * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @param fabricAsn the fabricAsn value to set. - * @return the NetworkFabricInner object itself. - */ - public NetworkFabricInner withFabricAsn(long fabricAsn) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withFabricAsn(fabricAsn); - return this; - } - - /** - * Get the terminalServerConfiguration property: Network and credentials configuration currently applied to terminal - * server. - * - * @return the terminalServerConfiguration value. - */ - public TerminalServerConfiguration terminalServerConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().terminalServerConfiguration(); - } - - /** - * Set the terminalServerConfiguration property: Network and credentials configuration currently applied to terminal - * server. - * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. - * @return the NetworkFabricInner object itself. - */ - public NetworkFabricInner withTerminalServerConfiguration(TerminalServerConfiguration terminalServerConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withTerminalServerConfiguration(terminalServerConfiguration); - return this; - } - - /** - * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. - * - * @return the managementNetworkConfiguration value. - */ - public ManagementNetworkConfigurationProperties 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 NetworkFabricInner object itself. - */ - public NetworkFabricInner - withManagementNetworkConfiguration(ManagementNetworkConfigurationProperties managementNetworkConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withManagementNetworkConfiguration(managementNetworkConfiguration); - 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 L2 Isolation Domain 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 L3 Isolation Domain resource IDs under the Network Fabric. - * - * @return the l3IsolationDomains value. - */ - 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. - * - * @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 NetworkFabricInner object itself. - */ - public NetworkFabricInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkFabricInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricInner.class); - /** * {@inheritDoc} */ @@ -475,7 +161,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -507,7 +194,9 @@ public static NetworkFabricInner fromJson(JsonReader jsonReader) throws IOExcept Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkFabricInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkFabricInner.innerProperties = NetworkFabricProperties.fromJson(reader); + deserializedNetworkFabricInner.properties = NetworkFabricProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkFabricInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkFabricInner.systemData = SystemData.fromJson(reader); } else { 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 deleted file mode 100644 index 160f29ca40e4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; -import java.io.IOException; - -/** - * Network Fabric Patch properties. - */ -@Fluent -public final class NetworkFabricPatchProperties extends AnnotationResource { - /* - * Number of compute racks associated to Network Fabric. - */ - private Integer rackCount; - - /* - * Number of servers.Possible values are from 1-16. - */ - private Integer serverCountPerRack; - - /* - * IPv4Prefix for Management Network. Example: 10.1.0.0/19. - */ - private String ipv4Prefix; - - /* - * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - */ - private String ipv6Prefix; - - /* - * ASN of CE devices for CE/PE connectivity. - */ - private Long fabricAsn; - - /* - * Network and credentials configuration already applied to terminal server. - */ - private NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration; - - /* - * Configuration to be used to setup the management network. - */ - 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() { - if (terminalServerConfiguration() != null) { - terminalServerConfiguration().validate(); - } - if (managementNetworkConfiguration() != null) { - managementNetworkConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeNumberField("rackCount", this.rackCount); - jsonWriter.writeNumberField("serverCountPerRack", this.serverCountPerRack); - jsonWriter.writeStringField("ipv4Prefix", this.ipv4Prefix); - jsonWriter.writeStringField("ipv6Prefix", this.ipv6Prefix); - jsonWriter.writeNumberField("fabricASN", this.fabricAsn); - jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); - jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricPatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricPatchProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricPatchProperties. - */ - public static NetworkFabricPatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricPatchProperties deserializedNetworkFabricPatchProperties = new NetworkFabricPatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.withAnnotation(reader.getString()); - } else if ("rackCount".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.rackCount = reader.getNullable(JsonReader::getInt); - } else if ("serverCountPerRack".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.serverCountPerRack - = reader.getNullable(JsonReader::getInt); - } else if ("ipv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.ipv4Prefix = reader.getString(); - } else if ("ipv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.ipv6Prefix = reader.getString(); - } else if ("fabricASN".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("terminalServerConfiguration".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.terminalServerConfiguration - = NetworkFabricPatchablePropertiesTerminalServerConfiguration.fromJson(reader); - } else if ("managementNetworkConfiguration".equals(fieldName)) { - deserializedNetworkFabricPatchProperties.managementNetworkConfiguration - = ManagementNetworkConfigurationPatchableProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricPatchProperties; - }); - } -} 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 81a9f1c955e2..0b46cd1a9f24 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 @@ -1,30 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkuProperties; import java.io.IOException; -import java.util.List; /** * The Network Fabric SKU resource definition. */ -@Fluent +@Immutable public final class NetworkFabricSkuInner extends ProxyResource { /* - * Resource properties. + * The Network Fabric Sku properties */ - private NetworkFabricSkuProperties innerProperties = new NetworkFabricSkuProperties(); + private NetworkFabricSkuProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -49,16 +46,16 @@ public final class NetworkFabricSkuInner extends ProxyResource { /** * Creates an instance of NetworkFabricSkuInner class. */ - public NetworkFabricSkuInner() { + private NetworkFabricSkuInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The Network Fabric Sku properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkFabricSkuProperties innerProperties() { - return this.innerProperties; + public NetworkFabricSkuProperties properties() { + return this.properties; } /** @@ -100,114 +97,13 @@ public String id() { return this.id; } - /** - * Get the type property: Type of Network Fabric SKU. - * - * @return the type value. - */ - 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. The - * value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. - * - * @return the maxComputeRacks value. - */ - public Integer maxComputeRacks() { - return this.innerProperties() == null ? null : this.innerProperties().maxComputeRacks(); - } - - /** - * 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. - */ - public NetworkFabricSkuInner withMaxComputeRacks(Integer maxComputeRacks) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricSkuProperties(); - } - this.innerProperties().withMaxComputeRacks(maxComputeRacks); - return this; - } - - /** - * Get the maximumServerCount property: Maximum number of servers available for this Network Fabric 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 Network Fabric SKU. - * - * @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 List supportedVersions() { - return this.innerProperties() == null ? null : this.innerProperties().supportedVersions(); - } - - /** - * Get the details property: URL providing detailed configuration of the fabric SKU. - * - * @return the details value. - */ - public String details() { - return this.innerProperties() == null ? null : this.innerProperties().details(); - } - - /** - * 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkFabricSkuInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricSkuInner.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -234,7 +130,7 @@ public static NetworkFabricSkuInner fromJson(JsonReader jsonReader) throws IOExc } else if ("type".equals(fieldName)) { deserializedNetworkFabricSkuInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedNetworkFabricSkuInner.innerProperties = NetworkFabricSkuProperties.fromJson(reader); + deserializedNetworkFabricSkuInner.properties = NetworkFabricSkuProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkFabricSkuInner.systemData = SystemData.fromJson(reader); } else { 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 75faff9e0d98..f6555af5f16a 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 @@ -1,19 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties; import java.io.IOException; /** @@ -22,9 +19,9 @@ @Fluent public final class NetworkInterfaceInner extends ProxyResource { /* - * Resource properties. + * The NetworkInterface properties */ - private NetworkInterfaceProperties innerProperties = new NetworkInterfaceProperties(); + private NetworkInterfaceProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,12 +50,23 @@ public NetworkInterfaceInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkInterface properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkInterfaceProperties innerProperties() { - return this.innerProperties; + public NetworkInterfaceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkInterface properties. + * + * @param properties the properties value to set. + * @return the NetworkInterfaceInner object itself. + */ + public NetworkInterfaceInner withProperties(NetworkInterfaceProperties properties) { + this.properties = properties; + return this; } /** @@ -100,116 +108,13 @@ public String id() { return this.id; } - /** - * Get the physicalIdentifier property: Physical Identifier of the network interface. - * - * @return the physicalIdentifier value. - */ - public String physicalIdentifier() { - return this.innerProperties() == null ? null : this.innerProperties().physicalIdentifier(); - } - - /** - * Get the connectedTo property: The ARM resource id of the interface or compute server its connected to. - * - * @return the connectedTo value. - */ - public String connectedTo() { - return this.innerProperties() == null ? null : this.innerProperties().connectedTo(); - } - - /** - * Get the interfaceType property: The Interface Type. Example: Management/Data. - * - * @return the interfaceType value. - */ - public InterfaceType interfaceType() { - return this.innerProperties() == null ? null : this.innerProperties().interfaceType(); - } - - /** - * Get the ipv4Address property: IPv4Address of the interface. - * - * @return the ipv4Address value. - */ - public String ipv4Address() { - return this.innerProperties() == null ? null : this.innerProperties().ipv4Address(); - } - - /** - * Get the ipv6Address property: IPv6Address of the interface. - * - * @return the ipv6Address value. - */ - 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. - * - * @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 NetworkInterfaceInner object itself. - */ - public NetworkInterfaceInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkInterfaceProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkInterfaceInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkInterfaceInner.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -236,7 +141,7 @@ public static NetworkInterfaceInner fromJson(JsonReader jsonReader) throws IOExc } else if ("type".equals(fieldName)) { deserializedNetworkInterfaceInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedNetworkInterfaceInner.innerProperties = NetworkInterfaceProperties.fromJson(reader); + deserializedNetworkInterfaceInner.properties = NetworkInterfaceProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkInterfaceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfacePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfacePatchProperties.java deleted file mode 100644 index 6cc6ced4a80b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfacePatchProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import java.io.IOException; - -/** - * Network Interface Patch properties. - */ -@Fluent -public final class NetworkInterfacePatchProperties extends AnnotationResource { - /** - * Creates an instance of NetworkInterfacePatchProperties class. - */ - public NetworkInterfacePatchProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkInterfacePatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkInterfacePatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkInterfacePatchProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkInterfacePatchProperties. - */ - public static NetworkInterfacePatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkInterfacePatchProperties deserializedNetworkInterfacePatchProperties - = new NetworkInterfacePatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedNetworkInterfacePatchProperties.withAnnotation(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkInterfacePatchProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorInner.java new file mode 100644 index 000000000000..06b6d4c408f2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The NetworkMonitor resource definition. + */ +@Fluent +public final class NetworkMonitorInner extends Resource { + /* + * The NetworkFabric Properties + */ + private NetworkMonitorProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NetworkMonitorInner class. + */ + public NetworkMonitorInner() { + } + + /** + * Get the properties property: The NetworkFabric Properties. + * + * @return the properties value. + */ + public NetworkMonitorProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkFabric Properties. + * + * @param properties the properties value to set. + * @return the NetworkMonitorInner object itself. + */ + public NetworkMonitorInner withProperties(NetworkMonitorProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkMonitorInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NetworkMonitorInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkMonitorInner. + */ + public static NetworkMonitorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorInner deserializedNetworkMonitorInner = new NetworkMonitorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkMonitorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkMonitorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetworkMonitorInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNetworkMonitorInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkMonitorInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNetworkMonitorInner.properties = NetworkMonitorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetworkMonitorInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorInner; + }); + } +} 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 index 8cf5d7aa4718..ffc34832f106 100644 --- 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 @@ -1,19 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -22,9 +20,9 @@ @Fluent public final class NetworkPacketBrokerInner extends Resource { /* - * Resource properties. + * The NetworkPacketBroker properties */ - private NetworkPacketBrokerProperties innerProperties = new NetworkPacketBrokerProperties(); + private NetworkPacketBrokerProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -53,12 +51,23 @@ public NetworkPacketBrokerInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkPacketBroker properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkPacketBrokerProperties innerProperties() { - return this.innerProperties; + public NetworkPacketBrokerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkPacketBroker properties. + * + * @param properties the properties value to set. + * @return the NetworkPacketBrokerInner object itself. + */ + public NetworkPacketBrokerInner withProperties(NetworkPacketBrokerProperties properties) { + this.properties = properties; + return this; } /** @@ -118,92 +127,6 @@ public NetworkPacketBrokerInner withTags(Map 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkPacketBrokerInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokerInner.class); - /** * {@inheritDoc} */ @@ -212,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -244,8 +167,7 @@ public static NetworkPacketBrokerInner fromJson(JsonReader jsonReader) throws IO Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkPacketBrokerInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkPacketBrokerInner.innerProperties - = NetworkPacketBrokerProperties.fromJson(reader); + deserializedNetworkPacketBrokerInner.properties = NetworkPacketBrokerProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkPacketBrokerInner.systemData = SystemData.fromJson(reader); } else { 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 c90a251ef846..4dd3be211cf2 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 @@ -1,20 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -23,9 +20,9 @@ @Fluent public final class NetworkRackInner extends Resource { /* - * Resource properties. + * The NetworkRack properties */ - private NetworkRackProperties innerProperties = new NetworkRackProperties(); + private NetworkRackProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,12 +51,23 @@ public NetworkRackInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkRack properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkRackProperties innerProperties() { - return this.innerProperties; + public NetworkRackProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkRack properties. + * + * @param properties the properties value to set. + * @return the NetworkRackInner object itself. + */ + public NetworkRackInner withProperties(NetworkRackProperties properties) { + this.properties = properties; + return this; } /** @@ -119,110 +127,6 @@ public NetworkRackInner withTags(Map tags) { return this; } - /** - * Get the networkRackType property: Network Rack SKU name. - * - * @return the networkRackType value. - */ - public NetworkRackType networkRackType() { - return this.innerProperties() == null ? null : this.innerProperties().networkRackType(); - } - - /** - * Set the networkRackType property: Network Rack SKU name. - * - * @param networkRackType the networkRackType value to set. - * @return the NetworkRackInner object itself. - */ - public NetworkRackInner withNetworkRackType(NetworkRackType networkRackType) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackProperties(); - } - this.innerProperties().withNetworkRackType(networkRackType); - 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 NetworkRackInner object itself. - */ - public NetworkRackInner withNetworkFabricId(String networkFabricId) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackProperties(); - } - this.innerProperties().withNetworkFabricId(networkFabricId); - return this; - } - - /** - * Get the networkDevices property: List of network device ARM resource IDs. - * - * @return the networkDevices value. - */ - public List networkDevices() { - return this.innerProperties() == null ? null : this.innerProperties().networkDevices(); - } - - /** - * 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 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 NetworkRackInner object itself. - */ - public NetworkRackInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkRackInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackInner.class); - /** * {@inheritDoc} */ @@ -231,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -263,7 +167,7 @@ public static NetworkRackInner fromJson(JsonReader jsonReader) throws IOExceptio Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkRackInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkRackInner.innerProperties = NetworkRackProperties.fromJson(reader); + deserializedNetworkRackInner.properties = NetworkRackProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkRackInner.systemData = SystemData.fromJson(reader); } else { 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 index 07aae6f08890..735337bb5fff 100644 --- 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 @@ -1,23 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.azure.resourcemanager.managednetworkfabric.models.NetworkTapProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -26,9 +20,9 @@ @Fluent public final class NetworkTapInner extends Resource { /* - * Resource properties. + * The NetworkTap Properties */ - private NetworkTapProperties innerProperties = new NetworkTapProperties(); + private NetworkTapProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -57,12 +51,23 @@ public NetworkTapInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkTap Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkTapProperties innerProperties() { - return this.innerProperties; + public NetworkTapProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkTap Properties. + * + * @param properties the properties value to set. + * @return the NetworkTapInner object itself. + */ + public NetworkTapInner withProperties(NetworkTapProperties properties) { + this.properties = properties; + return this; } /** @@ -122,153 +127,6 @@ public NetworkTapInner withTags(Map 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.atError() - .log( - new IllegalArgumentException("Missing required property innerProperties in model NetworkTapInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkTapInner.class); - /** * {@inheritDoc} */ @@ -277,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -309,7 +167,7 @@ public static NetworkTapInner fromJson(JsonReader jsonReader) throws IOException Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkTapInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkTapInner.innerProperties = NetworkTapProperties.fromJson(reader); + deserializedNetworkTapInner.properties = NetworkTapProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkTapInner.systemData = SystemData.fromJson(reader); } else { 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 deleted file mode 100644 index d65a2897ca55..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; -import com.azure.resourcemanager.managednetworkfabric.models.PollingType; -import java.io.IOException; -import java.util.List; - -/** - * The Network Tap resource patch definition. - */ -@Fluent -public final class NetworkTapPatchableParameters extends AnnotationResource { - /* - * Polling type. - */ - private PollingType pollingType; - - /* - * List of destination properties to send the filter traffic. - */ - 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() { - if (destinations() != null) { - destinations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("pollingType", this.pollingType == null ? null : this.pollingType.toString()); - jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapPatchableParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapPatchableParameters if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapPatchableParameters. - */ - public static NetworkTapPatchableParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapPatchableParameters deserializedNetworkTapPatchableParameters - = new NetworkTapPatchableParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedNetworkTapPatchableParameters.withAnnotation(reader.getString()); - } else if ("pollingType".equals(fieldName)) { - deserializedNetworkTapPatchableParameters.pollingType = PollingType.fromString(reader.getString()); - } else if ("destinations".equals(fieldName)) { - List destinations - = reader.readArray(reader1 -> NetworkTapPatchableParametersDestinationsItem.fromJson(reader1)); - deserializedNetworkTapPatchableParameters.destinations = destinations; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapPatchableParameters; - }); - } -} 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 index e2d6803c5480..712b23c8ef86 100644 --- 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 @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleProperties; import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; import java.util.Map; /** @@ -29,9 +20,9 @@ @Fluent public final class NetworkTapRuleInner extends Resource { /* - * Resource properties. + * The NetworkTapRule Properties */ - private NetworkTapRuleProperties innerProperties = new NetworkTapRuleProperties(); + private NetworkTapRuleProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -60,12 +51,23 @@ public NetworkTapRuleInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkTapRule Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkTapRuleProperties innerProperties() { - return this.innerProperties; + public NetworkTapRuleProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkTapRule Properties. + * + * @param properties the properties value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withProperties(NetworkTapRuleProperties properties) { + this.properties = properties; + return this; } /** @@ -125,207 +127,6 @@ public NetworkTapRuleInner withTags(Map 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkTapRuleInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkTapRuleInner.class); - /** * {@inheritDoc} */ @@ -334,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -366,7 +167,7 @@ public static NetworkTapRuleInner fromJson(JsonReader jsonReader) throws IOExcep Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetworkTapRuleInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedNetworkTapRuleInner.innerProperties = NetworkTapRuleProperties.fromJson(reader); + deserializedNetworkTapRuleInner.properties = NetworkTapRuleProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkTapRuleInner.systemData = SystemData.fromJson(reader); } else { 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 631740c5d309..2a3a0992166f 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 @@ -1,27 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; import java.io.IOException; /** @@ -30,9 +19,9 @@ @Fluent public final class NetworkToNetworkInterconnectInner extends ProxyResource { /* - * Resource properties. + * The NetworkToNetworkInterconnect Properties */ - private NetworkToNetworkInterconnectProperties innerProperties = new NetworkToNetworkInterconnectProperties(); + private NetworkToNetworkInterconnectProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -61,12 +50,23 @@ public NetworkToNetworkInterconnectInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The NetworkToNetworkInterconnect Properties. * - * @return the innerProperties value. + * @return the properties value. */ - private NetworkToNetworkInterconnectProperties innerProperties() { - return this.innerProperties; + public NetworkToNetworkInterconnectProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The NetworkToNetworkInterconnect Properties. + * + * @param properties the properties value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withProperties(NetworkToNetworkInterconnectProperties properties) { + this.properties = properties; + return this; } /** @@ -108,289 +108,13 @@ public String id() { return this.id; } - /** - * Get the nniType property: Type of NNI used. Example: CE | NPB. - * - * @return the nniType value. - */ - public NniType nniType() { - return this.innerProperties() == null ? null : this.innerProperties().nniType(); - } - - /** - * Set the nniType property: Type of NNI used. Example: CE | NPB. - * - * @param nniType the nniType value to set. - * @return the NetworkToNetworkInterconnectInner object itself. - */ - public NetworkToNetworkInterconnectInner withNniType(NniType nniType) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectProperties(); - } - this.innerProperties().withNniType(nniType); - return this; - } - - /** - * Get the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: True/False. - * - * @return the isManagementType value. - */ - public IsManagementType isManagementType() { - return this.innerProperties() == null ? null : this.innerProperties().isManagementType(); - } - - /** - * Set the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: True/False. - * - * @param isManagementType the isManagementType value to set. - * @return the NetworkToNetworkInterconnectInner object itself. - */ - public NetworkToNetworkInterconnectInner withIsManagementType(IsManagementType isManagementType) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectProperties(); - } - this.innerProperties().withIsManagementType(isManagementType); - return this; - } - - /** - * Get the useOptionB property: Based on this option layer3 parameters are mandatory. Example: True/False. - * - * @return the useOptionB value. - */ - public BooleanEnumProperty useOptionB() { - return this.innerProperties() == null ? null : this.innerProperties().useOptionB(); - } - - /** - * 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. - */ - public NetworkToNetworkInterconnectInner withUseOptionB(BooleanEnumProperty useOptionB) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectProperties(); - } - this.innerProperties().withUseOptionB(useOptionB); - return this; - } - - /** - * Get the layer2Configuration property: Common properties for Layer2 Configuration. - * - * @return the layer2Configuration value. - */ - public Layer2Configuration layer2Configuration() { - return this.innerProperties() == null ? null : this.innerProperties().layer2Configuration(); - } - - /** - * Set the layer2Configuration property: Common properties for Layer2 Configuration. - * - * @param layer2Configuration the layer2Configuration value to set. - * @return the NetworkToNetworkInterconnectInner object itself. - */ - public NetworkToNetworkInterconnectInner withLayer2Configuration(Layer2Configuration layer2Configuration) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectProperties(); - } - this.innerProperties().withLayer2Configuration(layer2Configuration); - return this; - } - - /** - * 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 importRoutePolicy value. - */ - public ImportRoutePolicyInformation importRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); - } - - /** - * Set the importRoutePolicy property: Import Route Policy configuration. - * - * @param importRoutePolicy the importRoutePolicy value to set. - * @return the NetworkToNetworkInterconnectInner object itself. - */ - public NetworkToNetworkInterconnectInner withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectProperties(); - } - this.innerProperties().withImportRoutePolicy(importRoutePolicy); - return this; - } - - /** - * 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. - */ - 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model NetworkToNetworkInterconnectInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectInner.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -418,7 +142,7 @@ public static NetworkToNetworkInterconnectInner fromJson(JsonReader jsonReader) } else if ("type".equals(fieldName)) { deserializedNetworkToNetworkInterconnectInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectInner.innerProperties + deserializedNetworkToNetworkInterconnectInner.properties = NetworkToNetworkInterconnectProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkToNetworkInterconnectInner.systemData = SystemData.fromJson(reader); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniBfdAdministrativeStateResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniBfdAdministrativeStateResponseInner.java new file mode 100644 index 000000000000..400ddbbfede1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniBfdAdministrativeStateResponseInner.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; +import java.io.IOException; + +/** + * NNI Bidirectional Forwarding Detection (BFD) Administrative State response. + */ +@Immutable +public final class NniBfdAdministrativeStateResponseInner + implements JsonSerializable { + /* + * Route Type. Choose either Static or OptionA. + */ + private RouteType routeType; + + /* + * State. Select either enable or disable. + */ + private BfdAdministrativeState administrativeState; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of NniBfdAdministrativeStateResponseInner class. + */ + private NniBfdAdministrativeStateResponseInner() { + } + + /** + * Get the routeType property: Route Type. Choose either Static or OptionA. + * + * @return the routeType value. + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Get the administrativeState property: State. Select either enable or disable. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniBfdAdministrativeStateResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniBfdAdministrativeStateResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniBfdAdministrativeStateResponseInner. + */ + public static NniBfdAdministrativeStateResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniBfdAdministrativeStateResponseInner deserializedNniBfdAdministrativeStateResponseInner + = new NniBfdAdministrativeStateResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedNniBfdAdministrativeStateResponseInner.routeType + = RouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNniBfdAdministrativeStateResponseInner.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNniBfdAdministrativeStateResponseInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNniBfdAdministrativeStateResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java index 8cad07f50ef3..ed3939cb7e2b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ private Boolean isDataAction; @@ -45,14 +45,14 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -67,7 +67,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -84,17 +84,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". @@ -106,8 +95,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ @@ -115,17 +104,6 @@ public ActionType actionType() { return this.actionType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ 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 19b949d8f5f5..589291fa61ce 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 @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -27,9 +20,9 @@ @Fluent public final class RoutePolicyInner extends Resource { /* - * Resource properties. + * The RoutePolicy properties */ - private RoutePolicyProperties innerProperties = new RoutePolicyProperties(); + private RoutePolicyProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,12 +51,23 @@ public RoutePolicyInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the properties property: The RoutePolicy properties. * - * @return the innerProperties value. + * @return the properties value. */ - private RoutePolicyProperties innerProperties() { - return this.innerProperties; + public RoutePolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The RoutePolicy properties. + * + * @param properties the properties value to set. + * @return the RoutePolicyInner object itself. + */ + public RoutePolicyInner withProperties(RoutePolicyProperties properties) { + this.properties = properties; + return this; } /** @@ -123,169 +127,6 @@ public RoutePolicyInner withTags(Map tags) { return this; } - /** - * Get the networkFabricId property: Arm Resource ID of 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 Network Fabric. - * - * @param networkFabricId the networkFabricId value to set. - * @return the RoutePolicyInner object itself. - */ - public RoutePolicyInner withNetworkFabricId(String networkFabricId) { - if (this.innerProperties() == null) { - this.innerProperties = new RoutePolicyProperties(); - } - 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 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 defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.innerProperties() == null ? null : this.innerProperties().defaultAction(); - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the RoutePolicyInner object itself. - */ - public RoutePolicyInner withDefaultAction(CommunityActionTypes defaultAction) { - if (this.innerProperties() == null) { - this.innerProperties = new RoutePolicyProperties(); - } - this.innerProperties().withDefaultAction(defaultAction); - 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 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. - * - * @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 RoutePolicyInner object itself. - */ - public RoutePolicyInner withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new RoutePolicyProperties(); - } - 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.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model RoutePolicyInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RoutePolicyInner.class); - /** * {@inheritDoc} */ @@ -294,7 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -326,7 +167,7 @@ public static RoutePolicyInner fromJson(JsonReader jsonReader) throws IOExceptio Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedRoutePolicyInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedRoutePolicyInner.innerProperties = RoutePolicyProperties.fromJson(reader); + deserializedRoutePolicyInner.properties = RoutePolicyProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedRoutePolicyInner.systemData = SystemData.fromJson(reader); } else { 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 index e69c09c80de1..13e37b45b4fe 100644 --- 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,8 +16,13 @@ /** * The response of the action validate configuration. */ -@Fluent +@Immutable public final class ValidateConfigurationResponseInner implements JsonSerializable { + /* + * The error object. + */ + private ManagementError error; + /* * Gets the configuration state. */ @@ -28,44 +33,10 @@ public final class ValidateConfigurationResponseInner implements JsonSerializabl */ private String url; - /* - * The error object. - */ - private ManagementError error; - /** * Creates an instance of ValidateConfigurationResponseInner class. */ - public ValidateConfigurationResponseInner() { - } - - /** - * Get the configurationState property: Gets the configuration state. - * - * @return the configurationState value. - */ - public ConfigurationState configurationState() { - return this.configurationState; - } - - /** - * Get the url property: URL for the details of the response. - * - * @return the url value. - */ - public String url() { - 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; + private ValidateConfigurationResponseInner() { } /** @@ -78,22 +49,21 @@ public ManagementError error() { } /** - * Set the error property: The error object. + * Get the configurationState property: Gets the configuration state. * - * @param error the error value to set. - * @return the ValidateConfigurationResponseInner object itself. + * @return the configurationState value. */ - public ValidateConfigurationResponseInner withError(ManagementError error) { - this.error = error; - return this; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Validates the instance. + * Get the url property: URL for the details of the response. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the url value. */ - public void validate() { + public String url() { + return this.url; } /** @@ -102,8 +72,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", this.url); jsonWriter.writeJsonField("error", this.error); + jsonWriter.writeStringField("url", this.url); return jsonWriter.writeEndObject(); } @@ -123,13 +93,13 @@ public static ValidateConfigurationResponseInner fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("configurationState".equals(fieldName)) { + if ("error".equals(fieldName)) { + deserializedValidateConfigurationResponseInner.error = ManagementError.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { deserializedValidateConfigurationResponseInner.configurationState = ConfigurationState.fromString(reader.getString()); } else if ("url".equals(fieldName)) { deserializedValidateConfigurationResponseInner.url = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedValidateConfigurationResponseInner.error = ManagementError.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationResponseInner.java new file mode 100644 index 000000000000..f50a71768c4a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationResponseInner.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * View Device Configuration Response. + */ +@Immutable +public final class ViewDeviceConfigurationResponseInner + implements JsonSerializable { + /* + * Storage URL to the device configuration file. + */ + private String deviceConfigurationUrl; + + /* + * The error object. + */ + private ManagementError error; + + /** + * Creates an instance of ViewDeviceConfigurationResponseInner class. + */ + private ViewDeviceConfigurationResponseInner() { + } + + /** + * Get the deviceConfigurationUrl property: Storage URL to the device configuration file. + * + * @return the deviceConfigurationUrl value. + */ + public String deviceConfigurationUrl() { + return this.deviceConfigurationUrl; + } + + /** + * Get the error property: The error object. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("deviceConfigurationUrl", this.deviceConfigurationUrl); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ViewDeviceConfigurationResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ViewDeviceConfigurationResponseInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ViewDeviceConfigurationResponseInner. + */ + public static ViewDeviceConfigurationResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ViewDeviceConfigurationResponseInner deserializedViewDeviceConfigurationResponseInner + = new ViewDeviceConfigurationResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deviceConfigurationUrl".equals(fieldName)) { + deserializedViewDeviceConfigurationResponseInner.deviceConfigurationUrl = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedViewDeviceConfigurationResponseInner.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedViewDeviceConfigurationResponseInner; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java index 4c1e0e23ad75..234c94b4b3ca 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AzureNetworkFabricManagementServiceApi. + * Package containing the inner data models for Fileshares. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.fluent.models; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java index 928a465a0fd5..3f43db122d11 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AzureNetworkFabricManagementServiceApi. + * Package containing the service clients for Fileshares. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.fluent; 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 efbae30b0836..692572a3a58a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,27 +9,20 @@ 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.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -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; public final class AccessControlListImpl implements AccessControlList, AccessControlList.Definition, AccessControlList.Update { private AccessControlListInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -56,58 +49,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - 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 aclsUrl() { - return this.innerModel().aclsUrl(); - } - - public CommunityActionTypes defaultAction() { - return this.innerModel().defaultAction(); - } - - public List matchConfigurations() { - List inner = this.innerModel().matchConfigurations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public AccessControlListProperties properties() { + return this.innerModel().properties(); } - 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 SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -126,7 +73,7 @@ public AccessControlListInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -134,7 +81,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String accessControlListName; - private AccessControlListPatch updateBody; + private AccessControlListPatch updateProperties; public AccessControlListImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -156,33 +103,33 @@ public AccessControlList create(Context context) { } AccessControlListImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new AccessControlListInner(); this.serviceManager = serviceManager; this.accessControlListName = name; } public AccessControlListImpl update() { - this.updateBody = new AccessControlListPatch(); + this.updateProperties = new AccessControlListPatch(); return this; } public AccessControlList apply() { this.innerObject = serviceManager.serviceClient() .getAccessControlLists() - .update(resourceGroupName, accessControlListName, updateBody, Context.NONE); + .update(resourceGroupName, accessControlListName, updateProperties, Context.NONE); return this; } public AccessControlList apply(Context context) { this.innerObject = serviceManager.serviceClient() .getAccessControlLists() - .update(resourceGroupName, accessControlListName, updateBody, context); + .update(resourceGroupName, accessControlListName, updateProperties, context); return this; } AccessControlListImpl(AccessControlListInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -243,79 +190,27 @@ public AccessControlListImpl withRegion(String location) { return this; } - public AccessControlListImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public AccessControlListImpl withConfigurationType(ConfigurationType configurationType) { - if (isInCreateMode()) { - this.innerModel().withConfigurationType(configurationType); - return this; - } else { - this.updateBody.withConfigurationType(configurationType); - return this; - } - } - - public AccessControlListImpl withAclsUrl(String aclsUrl) { - if (isInCreateMode()) { - this.innerModel().withAclsUrl(aclsUrl); - return this; - } else { - this.updateBody.withAclsUrl(aclsUrl); - return this; - } - } - - public AccessControlListImpl withDefaultAction(CommunityActionTypes defaultAction) { - if (isInCreateMode()) { - this.innerModel().withDefaultAction(defaultAction); - return this; - } else { - this.updateBody.withDefaultAction(defaultAction); - return this; - } - } - - public AccessControlListImpl - withMatchConfigurations(List matchConfigurations) { - if (isInCreateMode()) { - this.innerModel().withMatchConfigurations(matchConfigurations); - return this; - } else { - this.updateBody.withMatchConfigurations(matchConfigurations); - return this; - } + public AccessControlListImpl withProperties(AccessControlListProperties properties) { + this.innerModel().withProperties(properties); + return this; } - public AccessControlListImpl - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + public AccessControlListImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); + this.updateProperties.withTags(tags); return this; } } - public AccessControlListImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public AccessControlListImpl withProperties(AccessControlListPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 656cc0667f31..e67f278c0552 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -37,8 +38,8 @@ 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.implementation.models.AccessControlListListResult; 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; @@ -56,103 +57,175 @@ public final class AccessControlListsClientImpl implements AccessControlListsCli /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of AccessControlListsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AccessControlListsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + AccessControlListsClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(AccessControlListsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiAccessControlLists to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientAccessControlLists to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientAccessControlLists") public interface AccessControlListsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("accessControlListName") String accessControlListName, - @BodyParam("application/json") AccessControlListInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, - @BodyParam("application/json") AccessControlListPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessControlListPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") @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("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") @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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, 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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/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, + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accessControlListName") String accessControlListName, @HeaderParam("Accept") String accept, Context context); @@ -160,37 +233,60 @@ Mono>> resync(@HostParam("$host") String endpoint, @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, + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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) + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accessControlListName") String accessControlListName, @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("endpoint") String endpoint, + @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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET 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. @@ -198,388 +294,252 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListInner 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String accessControlListName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET 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 along with {@link Response} 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>> createWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListInner 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, body, accept, 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 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String accessControlListName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accessControlListName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET 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. + * @return the Access Control List resource definition along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String accessControlListName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, context); } /** - * Creates Access Control List. - * - * Implements Access Control List PUT method. + * Implements Access Control List GET 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. + * @return 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(); + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName) { + return getByResourceGroupWithResponse(resourceGroupName, accessControlListName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String accessControlListName, AccessControlListInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 resource 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 Access Control List resource definition on successful completion of {@link Mono}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accessControlListName, - AccessControlListInner body) { - return beginCreateAsync(resourceGroupName, accessControlListName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String accessControlListName, + AccessControlListInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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 on successful completion of {@link Mono}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accessControlListName, - AccessControlListInner body, Context context) { - return beginCreateAsync(resourceGroupName, accessControlListName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String accessControlListName, + AccessControlListInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, resource, + 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. + * @param resource 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 Access Control List resource definition. + * @return the {@link PollerFlux} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessControlListInner create(String resourceGroupName, String accessControlListName, - AccessControlListInner body) { - return createAsync(resourceGroupName, accessControlListName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessControlListInner> + beginCreateAsync(String resourceGroupName, String accessControlListName, AccessControlListInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, accessControlListName, resource); + 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. + * @param resource 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 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(); - } - - /** - * Gets a Access Control List. - * - * Implements Access Control List GET 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 the Access Control List resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner resource) { + Response response = createWithResponse(resourceGroupName, accessControlListName, resource); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, Context.NONE); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * 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 resource 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginCreate(String resourceGroupName, + String accessControlListName, AccessControlListInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, accessControlListName, resource, context); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, context); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * 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 resource 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 Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String accessControlListName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accessControlListName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String accessControlListName, + AccessControlListInner resource) { + return beginCreateAsync(resourceGroupName, accessControlListName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * 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 context The context to associate with this operation. + * @param resource 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 Access Control List resource definition along with {@link Response}. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String accessControlListName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accessControlListName, context).block(); + public AccessControlListInner create(String resourceGroupName, String accessControlListName, + AccessControlListInner resource) { + return beginCreate(resourceGroupName, accessControlListName, resource).getFinalResult(); } /** - * Gets a Access Control List. - * - * Implements Access Control List GET method. + * 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 resource 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 getByResourceGroup(String resourceGroupName, String accessControlListName) { - return getByResourceGroupWithResponse(resourceGroupName, accessControlListName, Context.NONE).getValue(); + public AccessControlListInner create(String resourceGroupName, String accessControlListName, + AccessControlListInner resource, Context context) { + return beginCreate(resourceGroupName, accessControlListName, resource, context).getFinalResult(); } /** - * 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 properties 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. @@ -588,134 +548,86 @@ public AccessControlListInner getByResourceGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListPatch 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(); - } + String accessControlListName, AccessControlListPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. + * @param properties 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 Access Control List resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String accessControlListName, AccessControlListPatch 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(); - } + private Response updateWithResponse(String resourceGroupName, String accessControlListName, + AccessControlListPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, properties, + Context.NONE); } /** - * 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 properties 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. + * @return the Access Control List resource definition along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accessControlListName, + AccessControlListPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, properties, + 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. - * @param context The context to associate with this operation. + * @param properties 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, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, AccessControlListInner> + beginUpdateAsync(String resourceGroupName, String accessControlListName, AccessControlListPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, accessControlListName, body, context); + = updateWithResponseAsync(resourceGroupName, accessControlListName, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AccessControlListInner.class, AccessControlListInner.class, context); + 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 properties 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. @@ -723,18 +635,18 @@ private PollerFlux, AccessControlListInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessControlListInner> beginUpdate(String resourceGroupName, - String accessControlListName, AccessControlListPatch body) { - return this.beginUpdateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + String accessControlListName, AccessControlListPatch properties) { + Response response = updateWithResponse(resourceGroupName, accessControlListName, properties); + return this.client.getLroResult(response, + AccessControlListInner.class, AccessControlListInner.class, Context.NONE); } /** - * 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 properties 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. @@ -743,39 +655,19 @@ public SyncPoller, AccessControlListInner> be */ @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. - * - * @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 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 beginUpdateAsync(resourceGroupName, accessControlListName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + String accessControlListName, AccessControlListPatch properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, accessControlListName, properties, context); + return this.client.getLroResult(response, + 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -783,19 +675,17 @@ private Mono updateAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String accessControlListName, - AccessControlListPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accessControlListName, body, context).last() + AccessControlListPatch properties) { + return beginUpdateAsync(resourceGroupName, accessControlListName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * 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 properties 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. @@ -803,18 +693,16 @@ private Mono updateAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner update(String resourceGroupName, String accessControlListName, - AccessControlListPatch body) { - return updateAsync(resourceGroupName, accessControlListName, body).block(); + AccessControlListPatch properties) { + return beginUpdate(resourceGroupName, accessControlListName, properties).getFinalResult(); } /** - * 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 properties 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. @@ -823,13 +711,11 @@ public AccessControlListInner update(String resourceGroupName, String accessCont */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner update(String resourceGroupName, String accessControlListName, - AccessControlListPatch body, Context context) { - return updateAsync(resourceGroupName, accessControlListName, body, context).block(); + AccessControlListPatch properties, Context context) { + return beginUpdate(resourceGroupName, accessControlListName, properties, context).getFinalResult(); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -842,113 +728,65 @@ public AccessControlListInner update(String resourceGroupName, String accessCont @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accessControlListName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accessControlListName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String accessControlListName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, Context.NONE); } /** - * 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 the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accessControlListName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 accessControlListName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accessControlListName, context); + 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, - context); + this.client.getContext()); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -960,12 +798,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName) { - return this.beginDeleteAsync(resourceGroupName, accessControlListName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accessControlListName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -975,53 +812,31 @@ public SyncPoller, Void> beginDelete(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 the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); - } - - /** - * 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. - * @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); + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, accessControlListName, context); + return this.client.getLroResult(response, Void.class, Void.class, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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() + 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. @@ -1032,12 +847,10 @@ private Mono deleteAsync(String resourceGroupName, String accessControlLis */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accessControlListName) { - deleteAsync(resourceGroupName, accessControlListName).block(); + beginDelete(resourceGroupName, accessControlListName).getFinalResult(); } /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1049,99 +862,64 @@ public void delete(String resourceGroupName, String accessControlListName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accessControlListName, Context context) { - deleteAsync(resourceGroupName, accessControlListName, context).block(); + beginDelete(resourceGroupName, accessControlListName, context).getFinalResult(); } /** - * 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}. + * @return the response of a AccessControlList list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * 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 as paginated response with {@link PagedFlux}. + * @return the response of a AccessControlList list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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. @@ -1149,33 +927,34 @@ 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 Access Control Lists as paginated response with {@link PagedFlux}. + * @return the response of a AccessControlList list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * 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. @@ -1183,136 +962,108 @@ 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a AccessControlList list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 subscription. - * * Implements AccessControlLists 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 Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedFlux}. + * @return the response of a AccessControlList list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedFlux}. + * @return the response of a AccessControlList list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, 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. @@ -1321,143 +1072,88 @@ 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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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 contentType = "application/json"; 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)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accessControlListName, + contentType, accept, body, 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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String accessControlListName, UpdateAdministrativeState body) { + final String contentType = "application/json"; 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); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String accessControlListName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, contentType, accept, body, + 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String accessControlListName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1466,19 +1162,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, accessControlListName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1488,20 +1187,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, accessControlListName, body, context); + return this.client + .getLroResult( + response, 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. @@ -1510,7 +1211,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1520,29 +1221,6 @@ private Mono updateAdministrativeSt } /** - * 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. @@ -1551,17 +1229,15 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, accessControlListName, body).getFinalResult(); } /** - * 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. @@ -1571,17 +1247,15 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, accessControlListName, body, context).getFinalResult(); } /** - * 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. @@ -1589,126 +1263,76 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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)) + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response resyncWithResponse(String resourceGroupName, String accessControlListName) { 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); + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String accessControlListName, + Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String accessControlListName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resyncWithResponseAsync(resourceGroupName, accessControlListName, context); + beginResyncAsync(String resourceGroupName, String accessControlListName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, accessControlListName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1716,18 +1340,20 @@ private Mono>> resyncWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String accessControlListName) { - return this.beginResyncAsync(resourceGroupName, accessControlListName).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, accessControlListName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1736,18 +1362,20 @@ private Mono>> resyncWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String accessControlListName, Context context) { - return this.beginResyncAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, accessControlListName, context); + return this.client + .getLroResult( + response, 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. @@ -1755,7 +1383,7 @@ private Mono>> resyncWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resyncAsync(String resourceGroupName, @@ -1765,28 +1393,6 @@ private Mono resyncAsync(String res } /** - * 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. @@ -1794,16 +1400,14 @@ private Mono resyncAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName) { - return resyncAsync(resourceGroupName, accessControlListName).block(); + return beginResync(resourceGroupName, accessControlListName).getFinalResult(); } /** - * 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. @@ -1812,17 +1416,15 @@ public CommonPostActionResponseForStateUpdateInner resync(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName, Context context) { - return resyncAsync(resourceGroupName, accessControlListName, context).block(); + return beginResync(resourceGroupName, accessControlListName, context).getFinalResult(); } /** - * 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. @@ -1830,124 +1432,77 @@ public CommonPostActionResponseForStateUpdateInner resync(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 the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String accessControlListName) { 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); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accessControlListName, accept, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, + String accessControlListName, Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + 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. @@ -1955,17 +1510,17 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String accessControlListName) { - return this.beginValidateConfigurationAsync(resourceGroupName, accessControlListName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, accessControlListName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * 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. @@ -1974,17 +1529,18 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String accessControlListName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, accessControlListName, context); + return this.client.getLroResult( + response, 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. @@ -1992,7 +1548,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -2002,28 +1558,6 @@ private Mono validateConfigurationAsync(Stri } /** - * 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. @@ -2031,17 +1565,15 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName) { - return validateConfigurationAsync(resourceGroupName, accessControlListName).block(); + return beginValidateConfiguration(resourceGroupName, accessControlListName).getFinalResult(); } /** - * 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. @@ -2050,12 +1582,12 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName, Context context) { - return validateConfigurationAsync(resourceGroupName, accessControlListName, context).block(); + return beginValidateConfiguration(resourceGroupName, accessControlListName, context).getFinalResult(); } /** @@ -2065,17 +1597,11 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a AccessControlList list operation 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( @@ -2085,6 +1611,24 @@ private Mono> listByResourceGroupNextSingl .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a AccessControlList list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2093,23 +1637,15 @@ 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 Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a AccessControlList list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2119,17 +1655,11 @@ 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 Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a AccessControlList list operation 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( @@ -2139,6 +1669,24 @@ private Mono> listBySubscriptionNextSingle .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a AccessControlList list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2147,22 +1695,14 @@ 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 Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a AccessControlList list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/AccessControlListsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java index 5829f76c18ae..25cdb5d0dbf7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -24,10 +24,10 @@ public final class AccessControlListsImpl implements AccessControlLists { private final AccessControlListsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public AccessControlListsImpl(AccessControlListsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -207,7 +207,7 @@ private AccessControlListsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffResponseImpl.java new file mode 100644 index 000000000000..9a41bd7ba654 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffResponseImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponse; + +public final class ArmConfigurationDiffResponseImpl implements ArmConfigurationDiffResponse { + private ArmConfigurationDiffResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + ArmConfigurationDiffResponseImpl(ArmConfigurationDiffResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String configurationDiffUrl() { + return this.innerModel().configurationDiffUrl(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public ArmConfigurationDiffResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusResponseImpl.java new file mode 100644 index 000000000000..cacf9e552f38 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusResponseImpl.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchState; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponse; + +public final class CommitBatchStatusResponseImpl implements CommitBatchStatusResponse { + private CommitBatchStatusResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + CommitBatchStatusResponseImpl(CommitBatchStatusResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String commitBatchId() { + return this.innerModel().commitBatchId(); + } + + public CommitBatchState commitBatchState() { + return this.innerModel().commitBatchState(); + } + + public CommitBatchDetails commitBatchDetails() { + return this.innerModel().commitBatchDetails(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public CommitBatchStatusResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java new file mode 100644 index 000000000000..b58abd481fcc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult; +import java.time.OffsetDateTime; + +public final class CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl + implements CommonPostActionResponseForDeviceROCommandsOperationStatusResult { + private CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl( + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public CommonPostActionResponseForDeviceROCommands properties() { + return this.innerModel().properties(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public String status() { + return this.innerModel().status(); + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceRWCommandsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceRWCommandsImpl.java new file mode 100644 index 000000000000..9041c1e65187 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceRWCommandsImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceRWCommands; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; + +public final class CommonPostActionResponseForDeviceRWCommandsImpl + implements CommonPostActionResponseForDeviceRWCommands { + private CommonPostActionResponseForDeviceRWCommandsInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + CommonPostActionResponseForDeviceRWCommandsImpl(CommonPostActionResponseForDeviceRWCommandsInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public String outputUrl() { + return this.innerModel().outputUrl(); + } + + public CommonPostActionResponseForDeviceRWCommandsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} 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 index 87f5cde14568..9f12d3ca4e6c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -14,14 +14,18 @@ public final class CommonPostActionResponseForDeviceUpdateImpl implements CommonPostActionResponseForDeviceUpdate { private CommonPostActionResponseForDeviceUpdateInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; CommonPostActionResponseForDeviceUpdateImpl(CommonPostActionResponseForDeviceUpdateInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public ManagementError error() { + return this.innerModel().error(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -44,15 +48,11 @@ public List failedDevices() { } } - public ManagementError error() { - return this.innerModel().error(); - } - public CommonPostActionResponseForDeviceUpdateInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java index e533d6f2b218..2a054f099aa8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -12,27 +12,27 @@ public final class CommonPostActionResponseForStateUpdateImpl implements CommonPostActionResponseForStateUpdate { private CommonPostActionResponseForStateUpdateInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; CommonPostActionResponseForStateUpdateImpl(CommonPostActionResponseForStateUpdateInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - public ManagementError error() { return this.innerModel().error(); } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + public CommonPostActionResponseForStateUpdateInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchResponseImpl.java new file mode 100644 index 000000000000..7c4d938aca6f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchResponseImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponse; + +public final class DiscardCommitBatchResponseImpl implements DiscardCommitBatchResponse { + private DiscardCommitBatchResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + DiscardCommitBatchResponseImpl(DiscardCommitBatchResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String commitBatchId() { + return this.innerModel().commitBatchId(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public DiscardCommitBatchResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkBfdAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkBfdAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..2624d678f5c7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkBfdAdministrativeStateResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; + +public final class ExternalNetworkBfdAdministrativeStateResponseImpl + implements ExternalNetworkBfdAdministrativeStateResponse { + private ExternalNetworkBfdAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + ExternalNetworkBfdAdministrativeStateResponseImpl(ExternalNetworkBfdAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ExternalNetworkRouteType routeType() { + return this.innerModel().routeType(); + } + + public BfdAdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public ExternalNetworkBfdAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} 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 42893192397b..ced297c13572 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 @@ -1,30 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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.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.ExternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateResponse; 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.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.ExternalNetworkPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; public final class ExternalNetworkImpl implements ExternalNetwork, ExternalNetwork.Definition, ExternalNetwork.Update { private ExternalNetworkInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -38,56 +33,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PeeringOption peeringOption() { - return this.innerModel().peeringOption(); - } - - public L3OptionBProperties optionBProperties() { - return this.innerModel().optionBProperties(); - } - - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.innerModel().optionAProperties(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); - } - - public String networkToNetworkInterconnectId() { - return this.innerModel().networkToNetworkInterconnectId(); - } - - public String importRoutePolicyId() { - return this.innerModel().importRoutePolicyId(); - } - - public String exportRoutePolicyId() { - return this.innerModel().exportRoutePolicyId(); - } - - public ImportRoutePolicy importRoutePolicy() { - return this.innerModel().importRoutePolicy(); + public ExternalNetworkProperties properties() { + return this.innerModel().properties(); } - public ExportRoutePolicy exportRoutePolicy() { - return this.innerModel().exportRoutePolicy(); - } - - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -98,7 +49,7 @@ public ExternalNetworkInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -108,7 +59,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String externalNetworkName; - private ExternalNetworkPatch updateBody; + private ExternalNetworkPatch updateProperties; public ExternalNetworkImpl withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName) { this.resourceGroupName = resourceGroupName; @@ -130,34 +81,33 @@ public ExternalNetwork create(Context context) { return this; } - ExternalNetworkImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + ExternalNetworkImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new ExternalNetworkInner(); this.serviceManager = serviceManager; this.externalNetworkName = name; } public ExternalNetworkImpl update() { - this.updateBody = new ExternalNetworkPatch(); + this.updateProperties = new ExternalNetworkPatch(); return this; } public ExternalNetwork apply() { this.innerObject = serviceManager.serviceClient() .getExternalNetworks() - .update(resourceGroupName, l3IsolationDomainName, externalNetworkName, updateBody, Context.NONE); + .update(resourceGroupName, l3IsolationDomainName, externalNetworkName, updateProperties, Context.NONE); return this; } public ExternalNetwork apply(Context context) { this.innerObject = serviceManager.serviceClient() .getExternalNetworks() - .update(resourceGroupName, l3IsolationDomainName, externalNetworkName, updateBody, context); + .update(resourceGroupName, l3IsolationDomainName, externalNetworkName, updateProperties, context); return this; } ExternalNetworkImpl(ExternalNetworkInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -192,112 +142,25 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAd .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { + public ExternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkBfdAdministrativeStateRequest body) { return serviceManager.externalNetworks() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, - body); + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context) { + public ExternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkBfdAdministrativeStateRequest body, Context context) { return serviceManager.externalNetworks() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, - body, context); - } - - public ExternalNetworkImpl withPeeringOption(PeeringOption peeringOption) { - if (isInCreateMode()) { - this.innerModel().withPeeringOption(peeringOption); - return this; - } else { - this.updateBody.withPeeringOption(peeringOption); - return this; - } + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); } - public ExternalNetworkImpl withOptionBProperties(L3OptionBProperties optionBProperties) { - if (isInCreateMode()) { - this.innerModel().withOptionBProperties(optionBProperties); - return this; - } else { - this.updateBody.withOptionBProperties(optionBProperties); - return this; - } - } - - public ExternalNetworkImpl withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { - this.innerModel().withOptionAProperties(optionAProperties); + public ExternalNetworkImpl withProperties(ExternalNetworkProperties properties) { + this.innerModel().withProperties(properties); return this; } - public ExternalNetworkImpl withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - if (isInCreateMode()) { - this.innerModel().withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); - return this; - } else { - this.updateBody.withNetworkToNetworkInterconnectId(networkToNetworkInterconnectId); - return this; - } - } - - public ExternalNetworkImpl withImportRoutePolicyId(String importRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicyId(importRoutePolicyId); - return this; - } else { - this.updateBody.withImportRoutePolicyId(importRoutePolicyId); - return this; - } - } - - public ExternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicyId(exportRoutePolicyId); - return this; - } else { - this.updateBody.withExportRoutePolicyId(exportRoutePolicyId); - return this; - } - } - - 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); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } - } - - public ExternalNetworkImpl - withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { - this.updateBody.withOptionAProperties(optionAProperties); + public ExternalNetworkImpl withProperties(ExternalNetworkPatchProperties properties) { + this.updateProperties.withProperties(properties); 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/ExternalNetworksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java index 7e8f5157606f..b15d99243165 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,18 @@ 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.BinaryData; 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.ExternalNetworksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkBfdAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworkListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,124 +58,199 @@ public final class ExternalNetworksClientImpl implements ExternalNetworksClient /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of ExternalNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - ExternalNetworksClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + ExternalNetworksClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(ExternalNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiExternalNetworks to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientExternalNetworks to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientExternalNetworks") public interface ExternalNetworksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") ExternalNetworkInner body, @HeaderParam("Accept") String accept, + @PathParam("externalNetworkName") String externalNetworkName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") ExternalNetworkPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") @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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("externalNetworkName") String externalNetworkName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByL3IsolationDomain(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByL3IsolationDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateStaticRouteBfdAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkBfdAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("externalNetworkName") String externalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalNetworkBfdAdministrativeStateRequest body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByL3IsolationDomainNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByL3IsolationDomainNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -180,424 +258,270 @@ Mono> listByL3IsolationDomainNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner 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(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context); - } - - /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 External Network resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); + private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName) { + return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 External Network resource. + * @return defines the External Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, l3IsolationDomainName, externalNetworkName, accept, context); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * - * Creates ExternalNetwork PUT method. + * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 External Network resource. + * @return defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName) { + return getWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, Context.NONE).getValue(); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param resource 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 External Network resource. + * @return defines the External Network resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. + * @param resource 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 External Network resource on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkInner body) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, resource, Context.NONE); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. + * @param resource 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 External Network resource on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkInner body, Context context) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, resource, context); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body Request payload. + * @param resource 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 External Network resource. + * @return the {@link PollerFlux} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkInner body) { - return createAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalNetworkInner> beginCreateAsync( + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); } /** - * Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external services - * * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 External Network resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkInner body, Context context) { - return createAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).block(); - } - - /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param externalNetworkName Name of the External Network. + * @param resource 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 External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner resource) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, resource); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, Context.NONE); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param resource 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 External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, resource, context); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, context); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param resource 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 External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner resource) { + return beginCreateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param context The context to associate with this operation. + * @param resource 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 External Network resource along with {@link Response}. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).block(); + public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner resource) { + return beginCreate(resourceGroupName, l3IsolationDomainName, externalNetworkName, resource).getFinalResult(); } /** - * Retrieves details of ExternalNetwork. - * - * Implements ExternalNetworks GET method. + * Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param externalNetworkName Name of the External Network. + * @param resource 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 External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName) { - return getWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, Context.NONE).getValue(); + public ExternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkInner resource, Context context) { + return beginCreate(resourceGroupName, l3IsolationDomainName, externalNetworkName, resource, context) + .getFinalResult(); } /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -606,123 +530,68 @@ public ExternalNetworkInner get(String resourceGroupName, String l3IsolationDoma */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch 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(); - } + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, + contentType, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 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. + * @param properties 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 External Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch 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(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, properties, Context.NONE); } /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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 External Network resource. + * @return defines the External Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ExternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, properties, context); } /** - * 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 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. + * @param properties 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. @@ -730,24 +599,21 @@ private PollerFlux, ExternalNetworkInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, + ExternalNetworkPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExternalNetworkInner.class, ExternalNetworkInner.class, context); + ExternalNetworkInner.class, ExternalNetworkInner.class, this.client.getContext()); } /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -755,20 +621,20 @@ private PollerFlux, ExternalNetworkInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch properties) { + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, properties); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, Context.NONE); } /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -777,42 +643,20 @@ public SyncPoller, ExternalNetworkInner> beginU */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * 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 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 External Network resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkPatch body) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, properties, context); + return this.client.getLroResult(response, + ExternalNetworkInner.class, ExternalNetworkInner.class, context); } /** - * 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 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. + * @param properties 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. @@ -820,20 +664,18 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).last() + String externalNetworkName, ExternalNetworkPatch properties) { + return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -841,19 +683,17 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkPatch body) { - return updateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); + String externalNetworkName, ExternalNetworkPatch properties) { + return beginUpdate(resourceGroupName, l3IsolationDomainName, externalNetworkName, properties).getFinalResult(); } /** - * 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 L3 Isolation Domain. * @param externalNetworkName Name of the External Network. - * @param body ExternalNetwork properties to update. Only annotations are supported. + * @param properties 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. @@ -862,13 +702,12 @@ public ExternalNetworkInner update(String resourceGroupName, String l3IsolationD */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, ExternalNetworkPatch body, Context context) { - return updateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).block(); + String externalNetworkName, ExternalNetworkPatch properties, Context context) { + return beginUpdate(resourceGroupName, l3IsolationDomainName, externalNetworkName, properties, context) + .getFinalResult(); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -882,108 +721,55 @@ public ExternalNetworkInner update(String resourceGroupName, String l3IsolationD @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, + Context.NONE); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, context); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -991,17 +777,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, Context context) { - context = this.client.mergeContext(context); + String externalNetworkName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context); + = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1015,12 +798,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1035,13 +818,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, externalNetworkName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1059,29 +841,6 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai } /** - * Deletes a ExternalNetworks. - * - * Implements ExternalNetworks DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - Context context) { - return beginDeleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1093,12 +852,10 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName) { - deleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, externalNetworkName).getFinalResult(); } /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1112,12 +869,10 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context) { - deleteAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, externalNetworkName, context).getFinalResult(); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1125,81 +880,40 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, 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 list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ExternalNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, String l3IsolationDomainName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, 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 External Networks within an isolation domain. - * * 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 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 External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, - String l3IsolationDomainName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + String l3IsolationDomainName) { + return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1207,18 +921,20 @@ private Mono> listByL3IsolationDomainSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedFlux}. + * @return the response of a ExternalNetwork list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName) { - return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1227,19 +943,20 @@ private PagedFlux listByL3IsolationDomainAsync(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 External Networks as paginated response with {@link PagedFlux}. + * @return the response of a ExternalNetwork list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedFlux<>( - () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1247,17 +964,16 @@ private PagedFlux listByL3IsolationDomainAsync(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 External Networks as paginated response with {@link PagedIterable}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName)); + return new PagedIterable<>(() -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink)); } /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1266,17 +982,17 @@ public PagedIterable listByL3IsolationDomain(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 External Networks as paginated response with {@link PagedIterable}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName, context)); + return new PagedIterable<>( + () -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName, context), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1286,155 +1002,91 @@ public PagedIterable listByL3IsolationDomain(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, 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 (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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - externalNetworkName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * 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 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, externalNetworkName, body, accept, - context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * 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 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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, context); } /** - * Implements the operation to the underlying resources. - * * 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 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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String externalNetworkName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, externalNetworkName, body, context); + l3IsolationDomainName, externalNetworkName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1444,21 +1096,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + externalNetworkName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1469,22 +1122,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, - context) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + externalNetworkName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1494,7 +1147,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1505,51 +1158,25 @@ private Mono updateAdministrativeSt } /** - * Implements the operation to the underlying resources. - * * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - * 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1560,19 +1187,17 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, - context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, + context).getFinalResult(); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1581,158 +1206,93 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - 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 (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(); - } + private Mono>> updateBfdAdministrativeStateWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - externalNetworkName, body, accept, context)) + .withContext(context -> service.updateBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + externalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - 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(); - } + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - externalNetworkName, body, accept, context); + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, externalNetworkName, contentType, + accept, body, context); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + PollerFlux, ExternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body) { + Mono>> mono = updateBfdAdministrativeStateWithResponseAsync(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), ExternalNetworkBfdAdministrativeStateResponseInner.class, + ExternalNetworkBfdAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1741,23 +1301,23 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body) - .getSyncPoller(); + SyncPoller, ExternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body); + return this.client + .getLroResult( + response, ExternalNetworkBfdAdministrativeStateResponseInner.class, + ExternalNetworkBfdAdministrativeStateResponseInner.class, Context.NONE); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1767,23 +1327,23 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String externalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body, context) - .getSyncPoller(); + SyncPoller, ExternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, Context context) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, externalNetworkName, body, context); + return this.client + .getLroResult( + response, ExternalNetworkBfdAdministrativeStateResponseInner.class, + ExternalNetworkBfdAdministrativeStateResponseInner.class, context); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1792,80 +1352,75 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( + private Mono updateBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - UpdateAdministrativeState body) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body).last().flatMap(this.client::getLroFinalResultOrError); + ExternalNetworkBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, + body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, - UpdateAdministrativeState body, Context context) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body, context).last().flatMap(this.client::getLroFinalResultOrError); + public ExternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .getFinalResult(); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body).block(); + public ExternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, + Context context) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, + context).getFinalResult(); } /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response of a ExternalNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - externalNetworkName, body, context).block(); + private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByL3IsolationDomainNext(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())); } /** @@ -1875,24 +1430,15 @@ public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ExternalNetwork list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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.")); - } + private PagedResponse listByL3IsolationDomainNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByL3IsolationDomainNext(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())); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1903,22 +1449,15 @@ private Mono> listByL3IsolationDomainNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ExternalNetwork list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink, + private PagedResponse listByL3IsolationDomainNextSinglePage(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.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ExternalNetworksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java index 4b1db75edc81..b8835a7f71b5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -11,9 +11,12 @@ 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.ExternalNetworkBfdAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -22,10 +25,10 @@ public final class ExternalNetworksImpl implements ExternalNetworks { private final ExternalNetworksClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public ExternalNetworksImpl(ExternalNetworksClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -97,25 +100,24 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(String r } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, - body); + public ExternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body) { + ExternalNetworkBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new ExternalNetworkBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, - body, context); + public ExternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, + Context context) { + ExternalNetworkBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new ExternalNetworkBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } @@ -202,7 +204,7 @@ private ExternalNetworksClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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/FilesharesManagementClientBuilder.java similarity index 62% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/FilesharesManagementClientBuilder.java index d5b2c4cd9645..6941252b3381 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/FilesharesManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AzureNetworkFabricManagementServiceApiImpl type. + * A builder for creating a new instance of the FilesharesManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AzureNetworkFabricManagementServiceApiImpl.class }) -public final class AzureNetworkFabricManagementServiceApiBuilder { +@ServiceClientBuilder(serviceClients = { FilesharesManagementClientImpl.class }) +public final class FilesharesManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @param endpoint the endpoint value. + * @return the FilesharesManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public FilesharesManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @param subscriptionId the subscriptionId value. + * @return the FilesharesManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public FilesharesManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AzureNetworkFabricManagementServiceApiBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the FilesharesManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder environment(AzureEnvironment environment) { + public FilesharesManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AzureNetworkFabricManagementServiceApiBuilder environment(AzureEnvironmen * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the FilesharesManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder pipeline(HttpPipeline pipeline) { + public FilesharesManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AzureNetworkFabricManagementServiceApiBuilder pipeline(HttpPipeline pipel * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the FilesharesManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder defaultPollInterval(Duration defaultPollInterval) { + public FilesharesManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AzureNetworkFabricManagementServiceApiBuilder defaultPollInterval(Duratio * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureNetworkFabricManagementServiceApiBuilder. + * @return the FilesharesManagementClientBuilder. */ - public AzureNetworkFabricManagementServiceApiBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public FilesharesManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureNetworkFabricManagementServiceApiImpl with the provided parameters. + * Builds an instance of FilesharesManagementClientImpl with the provided parameters. * - * @return an instance of AzureNetworkFabricManagementServiceApiImpl. + * @return an instance of FilesharesManagementClientImpl. */ - public AzureNetworkFabricManagementServiceApiImpl buildClient() { + public FilesharesManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,9 +131,8 @@ public AzureNetworkFabricManagementServiceApiImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureNetworkFabricManagementServiceApiImpl client - = new AzureNetworkFabricManagementServiceApiImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + FilesharesManagementClientImpl client = new FilesharesManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } 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/FilesharesManagementClientImpl.java similarity index 90% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/FilesharesManagementClientImpl.java index 866b7db2282b..da290e3c7aea 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/FilesharesManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -15,17 +15,20 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.AzureNetworkFabricManagementServiceApi; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.FilesharesManagementClient; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient; @@ -41,6 +44,7 @@ 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.NetworkMonitorsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; @@ -58,31 +62,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AzureNetworkFabricManagementServiceApiImpl type. + * Initializes a new instance of the FilesharesManagementClientImpl type. */ -@ServiceClient(builder = AzureNetworkFabricManagementServiceApiBuilder.class) -public final class AzureNetworkFabricManagementServiceApiImpl implements AzureNetworkFabricManagementServiceApi { +@ServiceClient(builder = FilesharesManagementClientBuilder.class) +public final class FilesharesManagementClientImpl implements FilesharesManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -91,12 +81,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -104,6 +94,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -147,31 +151,31 @@ public Duration getDefaultPollInterval() { } /** - * The AccessControlListsClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final AccessControlListsClient accessControlLists; + private final OperationsClient operations; /** - * Gets the AccessControlListsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AccessControlListsClient object. + * @return the OperationsClient object. */ - public AccessControlListsClient getAccessControlLists() { - return this.accessControlLists; + public OperationsClient getOperations() { + return this.operations; } /** - * The InternetGatewaysClient object to access its operations. + * The AccessControlListsClient object to access its operations. */ - private final InternetGatewaysClient internetGateways; + private final AccessControlListsClient accessControlLists; /** - * Gets the InternetGatewaysClient object to access its operations. + * Gets the AccessControlListsClient object to access its operations. * - * @return the InternetGatewaysClient object. + * @return the AccessControlListsClient object. */ - public InternetGatewaysClient getInternetGateways() { - return this.internetGateways; + public AccessControlListsClient getAccessControlLists() { + return this.accessControlLists; } /** @@ -188,6 +192,20 @@ public InternetGatewayRulesClient getInternetGatewayRules() { return this.internetGatewayRules; } + /** + * 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 IpCommunitiesClient object to access its operations. */ @@ -455,54 +473,55 @@ public NetworkTapsClient getNetworkTaps() { } /** - * The OperationsClient object to access its operations. + * The RoutePoliciesClient object to access its operations. */ - private final OperationsClient operations; + private final RoutePoliciesClient routePolicies; /** - * Gets the OperationsClient object to access its operations. + * Gets the RoutePoliciesClient object to access its operations. * - * @return the OperationsClient object. + * @return the RoutePoliciesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public RoutePoliciesClient getRoutePolicies() { + return this.routePolicies; } /** - * The RoutePoliciesClient object to access its operations. + * The NetworkMonitorsClient object to access its operations. */ - private final RoutePoliciesClient routePolicies; + private final NetworkMonitorsClient networkMonitors; /** - * Gets the RoutePoliciesClient object to access its operations. + * Gets the NetworkMonitorsClient object to access its operations. * - * @return the RoutePoliciesClient object. + * @return the NetworkMonitorsClient object. */ - public RoutePoliciesClient getRoutePolicies() { - return this.routePolicies; + public NetworkMonitorsClient getNetworkMonitors() { + return this.networkMonitors; } /** - * Initializes an instance of AzureNetworkFabricManagementServiceApi client. + * Initializes an instance of FilesharesManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @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 endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ - AzureNetworkFabricManagementServiceApiImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + FilesharesManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-06-15"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2024-06-15-preview"; + this.operations = new OperationsClientImpl(this); this.accessControlLists = new AccessControlListsClientImpl(this); - this.internetGateways = new InternetGatewaysClientImpl(this); this.internetGatewayRules = new InternetGatewayRulesClientImpl(this); + this.internetGateways = new InternetGatewaysClientImpl(this); this.ipCommunities = new IpCommunitiesClientImpl(this); this.ipExtendedCommunities = new IpExtendedCommunitiesClientImpl(this); this.ipPrefixes = new IpPrefixesClientImpl(this); @@ -522,8 +541,8 @@ public RoutePoliciesClient getRoutePolicies() { 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); + this.networkMonitors = new NetworkMonitorsClientImpl(this); } /** @@ -563,6 +582,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -652,5 +688,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureNetworkFabricManagementServiceApiImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(FilesharesManagementClientImpl.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBfdAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBfdAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..8047d9789e98 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBfdAdministrativeStateResponseImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus; +import java.util.Collections; +import java.util.List; + +public final class InternalNetworkBfdAdministrativeStateResponseImpl + implements InternalNetworkBfdAdministrativeStateResponse { + private InternalNetworkBfdAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + InternalNetworkBfdAdministrativeStateResponseImpl(InternalNetworkBfdAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List neighborAddressAdministrativeStatus() { + List inner = this.innerModel().neighborAddressAdministrativeStatus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public InternalNetworkBfdAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBgpAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBgpAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..de111798833d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBgpAdministrativeStateResponseImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus; +import java.util.Collections; +import java.util.List; + +public final class InternalNetworkBgpAdministrativeStateResponseImpl + implements InternalNetworkBgpAdministrativeStateResponse { + private InternalNetworkBgpAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + InternalNetworkBgpAdministrativeStateResponseImpl(InternalNetworkBgpAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List neighborAddressAdministrativeStatus() { + List inner = this.innerModel().neighborAddressAdministrativeStatus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public InternalNetworkBgpAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 1f4c622fcb39..fed82a87e9a8 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 @@ -1,35 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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.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.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateResponse; 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.InternalNetworkPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Collections; -import java.util.List; public final class InternalNetworkImpl implements InternalNetwork, InternalNetwork.Definition, InternalNetwork.Update { private InternalNetworkInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -43,90 +35,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public int vlanId() { - return this.innerModel().vlanId(); - } - - public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { - return this.innerModel().bgpConfiguration(); - } - - public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { - return this.innerModel().staticRouteConfiguration(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); - } - - public Integer mtu() { - return this.innerModel().mtu(); - } - - public List connectedIPv4Subnets() { - List inner = this.innerModel().connectedIPv4Subnets(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List connectedIPv6Subnets() { - List inner = this.innerModel().connectedIPv6Subnets(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String importRoutePolicyId() { - return this.innerModel().importRoutePolicyId(); - } - - public String exportRoutePolicyId() { - return this.innerModel().exportRoutePolicyId(); + public InternalNetworkProperties properties() { + return this.innerModel().properties(); } - 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(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -137,7 +51,7 @@ public InternalNetworkInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -147,7 +61,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String internalNetworkName; - private InternalNetworkPatch updateBody; + private InternalNetworkPatch updateProperties; public InternalNetworkImpl withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName) { this.resourceGroupName = resourceGroupName; @@ -169,34 +83,33 @@ public InternalNetwork create(Context context) { return this; } - InternalNetworkImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + InternalNetworkImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new InternalNetworkInner(); this.serviceManager = serviceManager; this.internalNetworkName = name; } public InternalNetworkImpl update() { - this.updateBody = new InternalNetworkPatch(); + this.updateProperties = new InternalNetworkPatch(); return this; } public InternalNetwork apply() { this.innerObject = serviceManager.serviceClient() .getInternalNetworks() - .update(resourceGroupName, l3IsolationDomainName, internalNetworkName, updateBody, Context.NONE); + .update(resourceGroupName, l3IsolationDomainName, internalNetworkName, updateProperties, Context.NONE); return this; } public InternalNetwork apply(Context context) { this.innerObject = serviceManager.serviceClient() .getInternalNetworks() - .update(resourceGroupName, l3IsolationDomainName, internalNetworkName, updateBody, context); + .update(resourceGroupName, l3IsolationDomainName, internalNetworkName, updateProperties, context); return this; } InternalNetworkImpl(InternalNetworkInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -231,173 +144,37 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAd .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body) { + public InternalNetworkBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkBgpAdministrativeStateRequest body) { return serviceManager.internalNetworks() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body, - Context context) { + public InternalNetworkBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkBgpAdministrativeStateRequest body, Context context) { return serviceManager.internalNetworks() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body) { + public InternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkBfdAdministrativeStateRequest body) { return serviceManager.internalNetworks() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body); + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public CommonPostActionResponseForStateUpdate - updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, Context context) { + public InternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkBfdAdministrativeStateRequest body, Context context) { return serviceManager.internalNetworks() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body, context); + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public InternalNetworkImpl withVlanId(int vlanId) { - this.innerModel().withVlanId(vlanId); + public InternalNetworkImpl withProperties(InternalNetworkProperties properties) { + this.innerModel().withProperties(properties); return this; } - public InternalNetworkImpl withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { - this.innerModel().withBgpConfiguration(bgpConfiguration); + public InternalNetworkImpl withProperties(InternalNetworkPatchProperties properties) { + this.updateProperties.withProperties(properties); return this; } - - public InternalNetworkImpl - withStaticRouteConfiguration(InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { - this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); - return this; - } - - public InternalNetworkImpl withMtu(Integer mtu) { - if (isInCreateMode()) { - this.innerModel().withMtu(mtu); - return this; - } else { - this.updateBody.withMtu(mtu); - return this; - } - } - - public InternalNetworkImpl withConnectedIPv4Subnets(List connectedIPv4Subnets) { - if (isInCreateMode()) { - this.innerModel().withConnectedIPv4Subnets(connectedIPv4Subnets); - return this; - } else { - this.updateBody.withConnectedIPv4Subnets(connectedIPv4Subnets); - return this; - } - } - - public InternalNetworkImpl withConnectedIPv6Subnets(List connectedIPv6Subnets) { - if (isInCreateMode()) { - this.innerModel().withConnectedIPv6Subnets(connectedIPv6Subnets); - return this; - } else { - this.updateBody.withConnectedIPv6Subnets(connectedIPv6Subnets); - return this; - } - } - - public InternalNetworkImpl withImportRoutePolicyId(String importRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicyId(importRoutePolicyId); - return this; - } else { - this.updateBody.withImportRoutePolicyId(importRoutePolicyId); - return this; - } - } - - public InternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicyId(exportRoutePolicyId); - return this; - } else { - this.updateBody.withExportRoutePolicyId(exportRoutePolicyId); - return this; - } - } - - public InternalNetworkImpl withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withImportRoutePolicy(importRoutePolicy); - return this; - } else { - this.updateBody.withImportRoutePolicy(importRoutePolicy); - return this; - } - } - - public InternalNetworkImpl withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withExportRoutePolicy(exportRoutePolicy); - return this; - } else { - 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); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } - } - - 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 7d2d03cb5c69..edef582e5c49 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,20 @@ 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.BinaryData; 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.InternalNetworksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworkListResult; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,559 +60,491 @@ public final class InternalNetworksClientImpl implements InternalNetworksClient /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of InternalNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - InternalNetworksClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + InternalNetworksClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(InternalNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiInternalNetworks to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientInternalNetworks to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientInternalNetworks") public interface InternalNetworksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") InternalNetworkInner body, @HeaderParam("Accept") String accept, + @PathParam("internalNetworkName") String internalNetworkName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") InternalNetworkPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") @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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("internalNetworkName") String internalNetworkName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByL3IsolationDomain(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByL3IsolationDomain(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByL3IsolationDomainSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateBgpAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> updateBgpAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkBgpAdministrativeStateRequest body, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateStaticRouteBfdAdministrativeState(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response updateBgpAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkBgpAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkBfdAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @PathParam("internalNetworkName") String internalNetworkName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternalNetworkBfdAdministrativeStateRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByL3IsolationDomainNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByL3IsolationDomainNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByL3IsolationDomainNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Internal Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a InternalNetworks along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner 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(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Internal Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return a InternalNetworks on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context); - } - - /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Internal Network resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); + private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName) { + return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Internal Network resource. + * @return a InternalNetworks along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternalNetworkInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, l3IsolationDomainName, internalNetworkName, accept, context); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * - * Creates InternalNetwork PUT method. + * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Internal Network resource. + * @return a InternalNetworks. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName) { + return getWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, Context.NONE).getValue(); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param resource 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 Internal Network resource. + * @return defines the Internal Network resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. + * @param resource 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 Internal Network resource on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkInner body) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, resource, Context.NONE); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. + * @param resource 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 Internal Network resource on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkInner body, Context context) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, resource, context); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. + * @param resource 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 Internal Network resource. + * @return the {@link PollerFlux} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkInner body) { - return createAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternalNetworkInner> beginCreateAsync( + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); } /** - * Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and across racks. - * * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param resource 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 Internal Network resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkInner body, Context context) { - return createAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).block(); - } - - /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. - * @return a InternalNetworks along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner resource) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, resource); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, Context.NONE); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param resource 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 InternalNetworks along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternalNetworkInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, resource, context); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, context); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param resource 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 InternalNetworks on successful completion of {@link Mono}. + * @return defines the Internal Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner resource) { + return beginCreateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. - * @param context The context to associate with this operation. + * @param resource 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 InternalNetworks along with {@link Response}. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).block(); + public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner resource) { + return beginCreate(resourceGroupName, l3IsolationDomainName, internalNetworkName, resource).getFinalResult(); } /** - * Retrieves details of InternalNetworks using GET method. - * - * Gets a InternalNetworks. + * Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param internalNetworkName Name of the Internal Network. + * @param resource 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 InternalNetworks. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName) { - return getWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, Context.NONE).getValue(); + public InternalNetworkInner create(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkInner resource, Context context) { + return beginCreate(resourceGroupName, l3IsolationDomainName, internalNetworkName, resource, context) + .getFinalResult(); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -616,123 +553,68 @@ public InternalNetworkInner get(String resourceGroupName, String l3IsolationDoma */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch 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(); - } + String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, + contentType, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param properties 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 Internal Network resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the Internal Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch 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(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, properties, Context.NONE); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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 Internal Network resource. + * @return defines the Internal Network resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, properties, context); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param properties 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. @@ -740,24 +622,21 @@ private PollerFlux, InternalNetworkInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternalNetworkInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, + InternalNetworkPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternalNetworkInner.class, InternalNetworkInner.class, context); + InternalNetworkInner.class, InternalNetworkInner.class, this.client.getContext()); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -765,20 +644,20 @@ private PollerFlux, InternalNetworkInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch properties) { + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, properties); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, Context.NONE); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -787,42 +666,20 @@ public SyncPoller, InternalNetworkInner> beginU */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * API to update certain properties of the InternalNetworks resources. - * - * Updates a InternalNetworks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Internal Network resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkPatch body) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + String l3IsolationDomainName, String internalNetworkName, InternalNetworkPatch properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, properties, context); + return this.client.getLroResult(response, + InternalNetworkInner.class, InternalNetworkInner.class, context); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param properties 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. @@ -830,20 +687,18 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).last() + String internalNetworkName, InternalNetworkPatch properties) { + return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -851,19 +706,17 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkPatch body) { - return updateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); + String internalNetworkName, InternalNetworkPatch properties) { + return beginUpdate(resourceGroupName, l3IsolationDomainName, internalNetworkName, properties).getFinalResult(); } /** - * API to update certain properties of the InternalNetworks resources. - * * Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 properties 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. @@ -872,13 +725,12 @@ public InternalNetworkInner update(String resourceGroupName, String l3IsolationD */ @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner update(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, InternalNetworkPatch body, Context context) { - return updateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).block(); + String internalNetworkName, InternalNetworkPatch properties, Context context) { + return beginUpdate(resourceGroupName, l3IsolationDomainName, internalNetworkName, properties, context) + .getFinalResult(); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -892,108 +744,55 @@ public InternalNetworkInner update(String resourceGroupName, String l3IsolationD @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, + Context.NONE); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, context); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1001,17 +800,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, Context context) { - context = this.client.mergeContext(context); + String internalNetworkName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context); + = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1025,12 +821,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1045,13 +841,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, l3IsolationDomainName, internalNetworkName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1069,29 +864,6 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai } /** - * Deletes a InternalNetworks. - * - * Implements InternalNetworks DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. - * @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 l3IsolationDomainName, String internalNetworkName, - Context context) { - return beginDeleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1103,12 +875,10 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName) { - deleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, internalNetworkName).getFinalResult(); } /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1122,12 +892,10 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context) { - deleteAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, internalNetworkName, context).getFinalResult(); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1135,81 +903,40 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, 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 list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternalNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, String l3IsolationDomainName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + context -> service.listByL3IsolationDomain(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, 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 list of all internal networks - * * 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 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 Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainSinglePageAsync(String resourceGroupName, - String l3IsolationDomainName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByL3IsolationDomain(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + String l3IsolationDomainName) { + return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1217,18 +944,20 @@ private Mono> listByL3IsolationDomainSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedFlux}. + * @return the response of a InternalNetwork list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName) { - return new PagedFlux<>(() -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1237,19 +966,20 @@ private PagedFlux listByL3IsolationDomainAsync(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 Internal Networks as paginated response with {@link PagedFlux}. + * @return the response of a InternalNetwork list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByL3IsolationDomainAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByL3IsolationDomainSinglePage(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedFlux<>( - () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), - nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByL3IsolationDomainSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1257,17 +987,16 @@ private PagedFlux listByL3IsolationDomainAsync(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 Internal Networks as paginated response with {@link PagedIterable}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName)); + return new PagedIterable<>(() -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink)); } /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1276,17 +1005,17 @@ public PagedIterable listByL3IsolationDomain(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 Internal Networks as paginated response with {@link PagedIterable}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName, context)); + return new PagedIterable<>( + () -> listByL3IsolationDomainSinglePage(resourceGroupName, l3IsolationDomainName, context), + nextLink -> listByL3IsolationDomainNextSinglePage(nextLink, context)); } /** - * Executes the operation to the underlying resources. - * * 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. @@ -1296,155 +1025,91 @@ public PagedIterable listByL3IsolationDomain(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes the operation to the underlying resources. - * * 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 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, - context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Executes the operation to the underlying resources. - * * 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 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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * Executes the operation to the underlying resources. - * * 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 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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String internalNetworkName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, internalNetworkName, body, context); + l3IsolationDomainName, internalNetworkName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Executes the operation to the underlying resources. - * * 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. @@ -1454,21 +1119,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Executes the operation to the underlying resources. - * * 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. @@ -1479,22 +1145,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, + internalNetworkName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Executes the operation to the underlying resources. - * * 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. @@ -1504,7 +1170,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1515,30 +1181,6 @@ private Mono updateAdministrativeSt } /** - * Executes the operation to the underlying resources. - * - * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes the operation to the underlying resources. - * * 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. @@ -1548,18 +1190,16 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .getFinalResult(); } /** - * Executes the operation to the underlying resources. - * * 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. @@ -1570,18 +1210,16 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, + context).getFinalResult(); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1591,155 +1229,92 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateBgpAdministrativeStateWithResponseAsync(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(); - } + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateBgpAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * 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 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBgpAdministrativeStateWithResponseAsync(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(); - } + private Response updateBgpAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateBgpAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, internalNetworkName, body, accept, - context); + return service.updateBgpAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * 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 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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBgpAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBgpAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * 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 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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> + PollerFlux, InternalNetworkBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body) { Mono>> mono = updateBgpAdministrativeStateWithResponseAsync(resourceGroupName, - l3IsolationDomainName, internalNetworkName, body, context); + l3IsolationDomainName, internalNetworkName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), InternalNetworkBgpAdministrativeStateResponseInner.class, + InternalNetworkBgpAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1749,21 +1324,22 @@ private Mono>> updateBgpAdministrativeStateWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, InternalNetworkBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); + String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body) { + Response response = updateBgpAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client + .getLroResult( + response, InternalNetworkBgpAdministrativeStateResponseInner.class, + InternalNetworkBgpAdministrativeStateResponseInner.class, Context.NONE); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1774,22 +1350,22 @@ private Mono>> updateBgpAdministrativeStateWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> + SyncPoller, InternalNetworkBgpAdministrativeStateResponseInner> beginUpdateBgpAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context) - .getSyncPoller(); + String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, Context context) { + Response response = updateBgpAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body, context); + return this.client + .getLroResult( + response, InternalNetworkBgpAdministrativeStateResponseInner.class, + InternalNetworkBgpAdministrativeStateResponseInner.class, context); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1799,42 +1375,17 @@ private Mono>> updateBgpAdministrativeStateWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( + private Mono updateBgpAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body) { + InternalNetworkBgpAdministrativeStateRequest body) { return beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * - * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body, Context context) { - return beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1844,18 +1395,16 @@ private Mono updateBgpAdministrativ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .block(); + public InternalNetworkBgpAdministrativeStateResponseInner updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body) { + return beginUpdateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .getFinalResult(); } /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1866,19 +1415,18 @@ public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, - context).block(); + public InternalNetworkBgpAdministrativeStateResponseInner updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, + Context context) { + return beginUpdateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, + context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -1887,158 +1435,93 @@ public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - 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(); - } + private Mono>> updateBfdAdministrativeStateWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context)) + .withContext(context -> service.updateBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + internalNetworkName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( - 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(); - } + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateStaticRouteBfdAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - internalNetworkName, body, accept, context); + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, internalNetworkName, contentType, + accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateStaticRouteBfdAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + PollerFlux, InternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body) { + Mono>> mono = updateBfdAdministrativeStateWithResponseAsync(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), InternalNetworkBfdAdministrativeStateResponseInner.class, + InternalNetworkBfdAdministrativeStateResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -2047,23 +1530,23 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body) - .getSyncPoller(); + SyncPoller, InternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body); + return this.client + .getLroResult( + response, InternalNetworkBfdAdministrativeStateResponseInner.class, + InternalNetworkBfdAdministrativeStateResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -2073,23 +1556,23 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateStaticRouteBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, - String internalNetworkName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body, context) - .getSyncPoller(); + SyncPoller, InternalNetworkBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String l3IsolationDomainName, + String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, Context context) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, + l3IsolationDomainName, internalNetworkName, body, context); + return this.client + .getLroResult( + response, InternalNetworkBfdAdministrativeStateResponseInner.class, + InternalNetworkBfdAdministrativeStateResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -2098,80 +1581,75 @@ private Mono>> updateStaticRouteBfdAdministrativeState * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( + private Mono updateBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body).last().flatMap(this.client::getLroFinalResultOrError); + InternalNetworkBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, + body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateStaticRouteBfdAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, - UpdateAdministrativeState body, Context context) { - return beginUpdateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body, context).last().flatMap(this.client::getLroFinalResultOrError); + public InternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body).block(); + public InternalNetworkBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, + Context context) { + return beginUpdateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, + context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state 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 L3 Isolation Domain. - * @param internalNetworkName Name of the Internal Network. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response of a InternalNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return updateStaticRouteBfdAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, - internalNetworkName, body, context).block(); + private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByL3IsolationDomainNext(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())); } /** @@ -2181,24 +1659,15 @@ public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternalNetwork list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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.")); - } + private PagedResponse listByL3IsolationDomainNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByL3IsolationDomainNext(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())); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2209,22 +1678,15 @@ private Mono> listByL3IsolationDomainNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternalNetwork list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink, + private PagedResponse listByL3IsolationDomainNextSinglePage(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.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByL3IsolationDomainNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/InternalNetworksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java index 5a666bd91c41..8e129708d402 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -11,9 +11,15 @@ 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.InternalNetworkBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -22,10 +28,10 @@ public final class InternalNetworksImpl implements InternalNetworks { private final InternalNetworksClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public InternalNetworksImpl(InternalNetworksClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -97,47 +103,47 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(String r } } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + public InternalNetworkBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body) { + InternalNetworkBgpAdministrativeStateResponseInner inner = this.serviceClient() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new InternalNetworkBgpAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() + public InternalNetworkBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, + Context context) { + InternalNetworkBgpAdministrativeStateResponseInner inner = this.serviceClient() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new InternalNetworkBgpAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body); + public InternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body) { + InternalNetworkBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new InternalNetworkBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateStaticRouteBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, - body, context); + public InternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, + Context context) { + InternalNetworkBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new InternalNetworkBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } @@ -224,7 +230,7 @@ private InternalNetworksClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 index 013f3503ec07..eacd8510bf6b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,17 +8,17 @@ 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 com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; 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; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -45,36 +45,12 @@ public Map tags() { } } - 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 InternetGatewayProperties properties() { + return this.innerModel().properties(); } - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -93,7 +69,7 @@ public InternetGatewayInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -101,7 +77,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String internetGatewayName; - private InternetGatewayPatch updateBody; + private InternetGatewayPatch updateProperties; public InternetGatewayImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -122,34 +98,33 @@ public InternetGateway create(Context context) { return this; } - InternetGatewayImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + InternetGatewayImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new InternetGatewayInner(); this.serviceManager = serviceManager; this.internetGatewayName = name; } public InternetGatewayImpl update() { - this.updateBody = new InternetGatewayPatch(); + this.updateProperties = new InternetGatewayPatch(); return this; } public InternetGateway apply() { this.innerObject = serviceManager.serviceClient() .getInternetGateways() - .update(resourceGroupName, internetGatewayName, updateBody, Context.NONE); + .update(resourceGroupName, internetGatewayName, updateProperties, Context.NONE); return this; } public InternetGateway apply(Context context) { this.innerObject = serviceManager.serviceClient() .getInternetGateways() - .update(resourceGroupName, internetGatewayName, updateBody, context); + .update(resourceGroupName, internetGatewayName, updateProperties, context); return this; } InternetGatewayImpl(InternetGatewayInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -182,13 +157,8 @@ public InternetGatewayImpl withRegion(String location) { return this; } - public InternetGatewayImpl withTypePropertiesType(GatewayType typePropertiesType) { - this.innerModel().withTypePropertiesType(typePropertiesType); - return this; - } - - public InternetGatewayImpl withNetworkFabricControllerId(String networkFabricControllerId) { - this.innerModel().withNetworkFabricControllerId(networkFabricControllerId); + public InternetGatewayImpl withProperties(InternetGatewayProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -197,27 +167,17 @@ public InternetGatewayImpl withTags(Map tags) { 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); + this.updateProperties.withTags(tags); return this; } } - public InternetGatewayImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public InternetGatewayImpl withProperties(InternetGatewayPatchProperties properties) { + this.updateProperties.withProperties(properties); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 index 678ec0ba80b4..eee2d78ebbc0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,17 +10,15 @@ 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 com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; 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; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -47,29 +45,12 @@ public Map tags() { } } - 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 InternetGatewayRuleProperties properties() { + return this.innerModel().properties(); } - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -88,7 +69,7 @@ public InternetGatewayRuleInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -96,7 +77,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String internetGatewayRuleName; - private InternetGatewayRulePatch updateBody; + private InternetGatewayRulePatch updateProperties; public InternetGatewayRuleImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -118,33 +99,33 @@ public InternetGatewayRule create(Context context) { } InternetGatewayRuleImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new InternetGatewayRuleInner(); this.serviceManager = serviceManager; this.internetGatewayRuleName = name; } public InternetGatewayRuleImpl update() { - this.updateBody = new InternetGatewayRulePatch(); + this.updateProperties = new InternetGatewayRulePatch(); return this; } public InternetGatewayRule apply() { this.innerObject = serviceManager.serviceClient() .getInternetGatewayRules() - .update(resourceGroupName, internetGatewayRuleName, updateBody, Context.NONE); + .update(resourceGroupName, internetGatewayRuleName, updateProperties, Context.NONE); return this; } public InternetGatewayRule apply(Context context) { this.innerObject = serviceManager.serviceClient() .getInternetGatewayRules() - .update(resourceGroupName, internetGatewayRuleName, updateBody, context); + .update(resourceGroupName, internetGatewayRuleName, updateProperties, context); return this; } InternetGatewayRuleImpl(InternetGatewayRuleInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -178,8 +159,8 @@ public InternetGatewayRuleImpl withRegion(String location) { return this; } - public InternetGatewayRuleImpl withRuleProperties(RuleProperties ruleProperties) { - this.innerModel().withRuleProperties(ruleProperties); + public InternetGatewayRuleImpl withProperties(InternetGatewayRuleProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -188,17 +169,12 @@ public InternetGatewayRuleImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); + this.updateProperties.withTags(tags); return this; } } - public InternetGatewayRuleImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); - return this; - } - private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 index 1331e6d722fb..43e144a3636c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.implementation.models.InternetGatewayRuleListResult; 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; @@ -52,498 +53,429 @@ public final class InternetGatewayRulesClientImpl implements InternetGatewayRule /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of InternetGatewayRulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - InternetGatewayRulesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + InternetGatewayRulesClientImpl(FilesharesManagementClientImpl 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. + * The interface defining all the services for FilesharesManagementClientInternetGatewayRules to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientInternetGatewayRules") public interface InternetGatewayRulesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200 }) @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, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, @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, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayRuleName") String internetGatewayRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRuleInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRuleInner resource, Context context); + @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayRuleName") String internetGatewayRuleName, - @BodyParam("application/json") InternetGatewayRulePatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRulePatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayRulePatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * 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 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}. + * @return an Internet Gateway Rule resource 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String internetGatewayRuleName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * 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 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}. + * @return an Internet Gateway Rule resource 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String internetGatewayRuleName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * 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 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. + * @return an Internet Gateway Rule resource along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String internetGatewayRuleName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, accept, context); } /** - * Creates an Internet Gateway rule. - * - * Creates an Internet Gateway rule resource. + * 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 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. + * @return an Internet Gateway Rule resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InternetGatewayRuleInner> - beginCreate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { - return this.beginCreateAsync(resourceGroupName, internetGatewayRuleName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { + return getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String internetGatewayRuleName, InternetGatewayRuleInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, + resource, 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 resource 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}. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRuleInner body) { - return beginCreateAsync(resourceGroupName, internetGatewayRuleName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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}. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ @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); + private Response createWithResponse(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, resource, + 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. + * @param resource 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. + * @return the {@link PollerFlux} for polling of 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(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayRuleInner> + beginCreateAsync(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, internetGatewayRuleName, resource); + 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 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. + * @param resource 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 an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> + beginCreate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner resource) { + Response response = createWithResponse(resourceGroupName, internetGatewayRuleName, resource); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, Context.NONE); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * 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 resource 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 an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. */ - @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); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> beginCreate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, internetGatewayRuleName, resource, context); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, context); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * 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 resource 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 an Internet Gateway Rule resource on successful completion of {@link Mono}. + * @return the Internet Gateway Rule resource definition 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())); + private Mono createAsync(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource) { + return beginCreateAsync(resourceGroupName, internetGatewayRuleName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * 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 context The context to associate with this operation. + * @param resource 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 an Internet Gateway Rule resource along with {@link Response}. + * @return the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String internetGatewayRuleName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName, context).block(); + public InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource) { + return beginCreate(resourceGroupName, internetGatewayRuleName, resource).getFinalResult(); } /** - * Gets an Internet Gateway Rule. - * - * Gets an Internet Gateway Rule resource. + * 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 resource 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 an Internet Gateway Rule resource. + * @return the Internet Gateway Rule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { - return getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE).getValue(); + public InternetGatewayRuleInner create(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRuleInner resource, Context context) { + return beginCreate(resourceGroupName, internetGatewayRuleName, resource, context).getFinalResult(); } /** - * 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 properties 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. @@ -552,112 +484,65 @@ public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, Str */ @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(); - } + String internetGatewayRuleName, InternetGatewayRulePatch properties) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, + properties, 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. + * @param properties 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}. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ @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(); - } + private Response updateWithResponse(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRulePatch properties) { + final String contentType = "application/json"; 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); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, + properties, Context.NONE); } /** - * 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 properties 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. + * @return the Internet Gateway Rule resource definition along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String internetGatewayRuleName, + InternetGatewayRulePatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, contentType, accept, + properties, 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -665,22 +550,20 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternetGatewayRuleInner> beginUpdateAsync( - String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, body, context); + = updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, context); + 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 properties 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. @@ -688,18 +571,18 @@ private PollerFlux, InternetGatewayRuleInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternetGatewayRuleInner> - beginUpdate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { - return this.beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body).getSyncPoller(); + beginUpdate(String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch properties) { + Response response = updateWithResponse(resourceGroupName, internetGatewayRuleName, properties); + return this.client.getLroResult(response, + InternetGatewayRuleInner.class, InternetGatewayRuleInner.class, Context.NONE); } /** - * 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 properties 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. @@ -708,39 +591,20 @@ private PollerFlux, InternetGatewayRuleInne */ @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); + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch properties, + Context context) { + Response response + = updateWithResponse(resourceGroupName, internetGatewayRuleName, properties, context); + return this.client.getLroResult(response, + 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -748,19 +612,17 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRulePatch body, Context context) { - return beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body, context).last() + InternetGatewayRulePatch properties) { + return beginUpdateAsync(resourceGroupName, internetGatewayRuleName, properties).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 properties 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. @@ -768,18 +630,16 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayRuleInner update(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRulePatch body) { - return updateAsync(resourceGroupName, internetGatewayRuleName, body).block(); + InternetGatewayRulePatch properties) { + return beginUpdate(resourceGroupName, internetGatewayRuleName, properties).getFinalResult(); } /** - * 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 properties 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. @@ -788,13 +648,11 @@ public InternetGatewayRuleInner update(String resourceGroupName, String internet */ @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayRuleInner update(String resourceGroupName, String internetGatewayRuleName, - InternetGatewayRulePatch body, Context context) { - return updateAsync(resourceGroupName, internetGatewayRuleName, body, context).block(); + InternetGatewayRulePatch properties, Context context) { + return beginUpdate(resourceGroupName, internetGatewayRuleName, properties, context).getFinalResult(); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -807,95 +665,51 @@ public InternetGatewayRuleInner update(String resourceGroupName, String internet @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, 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}. + * @return the response body along with {@link Response}. */ @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); + private Response deleteWithResponse(String resourceGroupName, String internetGatewayRuleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String internetGatewayRuleName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayRuleName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -903,17 +717,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @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); + String internetGatewayRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayRuleName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + 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. @@ -925,12 +735,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayRuleName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayRuleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -944,12 +753,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName, Context context) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayRuleName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayRuleName, context); + return this.client.getLroResult(response, 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. @@ -966,27 +774,6 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayR } /** - * 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. @@ -997,12 +784,10 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayR */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayRuleName) { - deleteAsync(resourceGroupName, internetGatewayRuleName).block(); + beginDelete(resourceGroupName, internetGatewayRuleName).getFinalResult(); } /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1014,99 +799,64 @@ public void delete(String resourceGroupName, String internetGatewayRuleName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayRuleName, Context context) { - deleteAsync(resourceGroupName, internetGatewayRuleName, context).block(); + beginDelete(resourceGroupName, internetGatewayRuleName, context).getFinalResult(); } /** - * 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}. + * @return the response of a InternetGatewayRule list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a InternetGatewayRule list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGatewayRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return 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. @@ -1114,33 +864,34 @@ 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 Internet Gateway Rules as paginated response with {@link PagedFlux}. + * @return the response of a InternetGatewayRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return 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 PagedIterable}. + * @return the response of a InternetGatewayRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(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. @@ -1148,131 +899,105 @@ 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 Internet Gateway Rules as paginated response with {@link PagedIterable}. + * @return the response of a InternetGatewayRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGatewayRule list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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}. + * @return the response of a InternetGatewayRule list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * * @throws ManagementException thrown 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}. + * @return the response of a InternetGatewayRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return 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. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGatewayRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return 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 PagedIterable}. + * @return the response of a InternetGatewayRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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 PagedIterable}. + * @return the response of a InternetGatewayRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1282,17 +1007,11 @@ 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 Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGatewayRule list operation 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( @@ -1302,6 +1021,24 @@ private Mono> listByResourceGroupNextSin .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a InternetGatewayRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1310,23 +1047,16 @@ 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 Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGatewayRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1336,17 +1066,11 @@ 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 Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGatewayRule list operation 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( @@ -1356,6 +1080,24 @@ private Mono> listBySubscriptionNextSing .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a InternetGatewayRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1364,22 +1106,14 @@ 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 Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGatewayRule list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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 index 90285a233f8f..3766bd662d0c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class InternetGatewayRulesImpl implements InternetGatewayRules { private final InternetGatewayRulesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public InternetGatewayRulesImpl(InternetGatewayRulesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -138,7 +138,7 @@ private InternetGatewayRulesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 index ce63280f47f5..39b730b1aabf 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.implementation.models.InternetGatewayListResult; 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; @@ -52,110 +53,176 @@ public final class InternetGatewaysClientImpl implements InternetGatewaysClient /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of InternetGatewaysClientImpl. * * @param client the instance of the service client containing this operation class. */ - InternetGatewaysClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + InternetGatewaysClientImpl(FilesharesManagementClientImpl 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. + * The interface defining all the services for FilesharesManagementClientInternetGateways to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientInternetGateways") public interface InternetGatewaysService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200 }) @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, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, @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, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayName") String internetGatewayName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayInner resource, Context context); + @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("internetGatewayName") String internetGatewayName, - @BodyParam("application/json") InternetGatewayPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InternetGatewayPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("internetGatewayName") String internetGatewayName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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("endpoint") String endpoint, @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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * 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 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. @@ -163,386 +230,250 @@ Mono> listBySubscriptionNext( * {@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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String internetGatewayName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, 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. + * 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 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}. + * @return the Internet Gateway resource definition 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, String internetGatewayName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * 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 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. + * @return the Internet Gateway resource definition along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String internetGatewayName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, accept, context); } /** - * Create a Network Fabric Service Internet Gateway. - * - * Creates a Network Fabric Service Internet Gateway resource instance. + * 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 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. + * @return 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(); + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName) { + return getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String internetGatewayName, InternetGatewayInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, resource, + 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 resource 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}. + * @return the Internet Gateway resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String internetGatewayName, - InternetGatewayInner body) { - return beginCreateAsync(resourceGroupName, internetGatewayName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String internetGatewayName, + InternetGatewayInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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}. + * @return the Internet Gateway resource definition along with {@link Response}. */ @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); + private Response createWithResponse(String resourceGroupName, String internetGatewayName, + InternetGatewayInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, resource, + 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. + * @param resource 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. + * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, - InternetGatewayInner body) { - return createAsync(resourceGroupName, internetGatewayName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayInner> + beginCreateAsync(String resourceGroupName, String internetGatewayName, InternetGatewayInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, internetGatewayName, resource); + 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 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. + * @param resource 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}. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner resource) { + Response response = createWithResponse(resourceGroupName, internetGatewayName, resource); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, Context.NONE); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * 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 resource 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}. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. */ - @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); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginCreate(String resourceGroupName, + String internetGatewayName, InternetGatewayInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, internetGatewayName, resource, context); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, context); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * 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 resource 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 getByResourceGroupAsync(String resourceGroupName, String internetGatewayName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String internetGatewayName, + InternetGatewayInner resource) { + return beginCreateAsync(resourceGroupName, internetGatewayName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * 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 context The context to associate with this operation. + * @param resource 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}. + * @return the Internet Gateway resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String internetGatewayName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName, context).block(); + public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, + InternetGatewayInner resource) { + return beginCreate(resourceGroupName, internetGatewayName, resource).getFinalResult(); } /** - * Retrieves details of Network Fabric Service Internet Gateway. - * - * Implements Gateway GET method. + * 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 resource 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 getByResourceGroup(String resourceGroupName, String internetGatewayName) { - return getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE).getValue(); + public InternetGatewayInner create(String resourceGroupName, String internetGatewayName, + InternetGatewayInner resource, Context context) { + return beginCreate(resourceGroupName, internetGatewayName, resource, context).getFinalResult(); } /** - * 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 properties API to update certain properties of the InternetGateway 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. @@ -551,133 +482,85 @@ public InternetGatewayInner getByResourceGroup(String resourceGroupName, String */ @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(); - } + String internetGatewayName, InternetGatewayPatch properties) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, + properties, 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. + * @param properties API to update certain properties of the InternetGateway 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}. + * @return the Internet Gateway resource definition along with {@link Response}. */ @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(); - } + private Response updateWithResponse(String resourceGroupName, String internetGatewayName, + InternetGatewayPatch properties) { + final String contentType = "application/json"; 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); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, properties, + Context.NONE); } /** - * 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 properties API to update certain properties of the InternetGateway 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. + * @return the Internet Gateway resource definition along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String internetGatewayName, + InternetGatewayPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, contentType, accept, properties, + 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.. - * @param context The context to associate with this operation. + * @param properties API to update certain properties of the InternetGateway 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, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, InternetGatewayInner> + beginUpdateAsync(String resourceGroupName, String internetGatewayName, InternetGatewayPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, internetGatewayName, body, context); + = updateWithResponseAsync(resourceGroupName, internetGatewayName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InternetGatewayInner.class, InternetGatewayInner.class, context); + 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 properties API to update certain properties of the InternetGateway 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. @@ -685,18 +568,18 @@ private PollerFlux, InternetGatewayInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternetGatewayInner> beginUpdate(String resourceGroupName, - String internetGatewayName, InternetGatewayPatch body) { - return this.beginUpdateAsync(resourceGroupName, internetGatewayName, body).getSyncPoller(); + String internetGatewayName, InternetGatewayPatch properties) { + Response response = updateWithResponse(resourceGroupName, internetGatewayName, properties); + return this.client.getLroResult(response, + InternetGatewayInner.class, InternetGatewayInner.class, Context.NONE); } /** - * 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 properties API to update certain properties of the InternetGateway 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. @@ -705,39 +588,18 @@ public SyncPoller, InternetGatewayInner> beginU */ @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); + String internetGatewayName, InternetGatewayPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, internetGatewayName, properties, context); + return this.client.getLroResult(response, + 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.. - * @param context The context to associate with this operation. + * @param properties API to update certain properties of the InternetGateway 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. @@ -745,19 +607,17 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String internetGatewayName, - InternetGatewayPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, internetGatewayName, body, context).last() + InternetGatewayPatch properties) { + return beginUpdateAsync(resourceGroupName, internetGatewayName, properties).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 properties API to update certain properties of the InternetGateway 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. @@ -765,18 +625,16 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) public InternetGatewayInner update(String resourceGroupName, String internetGatewayName, - InternetGatewayPatch body) { - return updateAsync(resourceGroupName, internetGatewayName, body).block(); + InternetGatewayPatch properties) { + return beginUpdate(resourceGroupName, internetGatewayName, properties).getFinalResult(); } /** - * 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 properties API to update certain properties of the InternetGateway 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. @@ -784,14 +642,12 @@ public InternetGatewayInner update(String resourceGroupName, String internetGate * @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(); + public InternetGatewayInner update(String resourceGroupName, String internetGatewayName, + InternetGatewayPatch properties, Context context) { + return beginUpdate(resourceGroupName, internetGatewayName, properties, context).getFinalResult(); } /** - * 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. @@ -804,112 +660,64 @@ public InternetGatewayInner update(String resourceGroupName, String internetGate @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, 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}. + * @return the response body along with {@link Response}. */ @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); + private Response deleteWithResponse(String resourceGroupName, String internetGatewayName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String internetGatewayName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, internetGatewayName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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); + 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, - context); + 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. @@ -921,12 +729,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * 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. @@ -940,12 +747,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName, Context context) { - return this.beginDeleteAsync(resourceGroupName, internetGatewayName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, internetGatewayName, context); + return this.client.getLroResult(response, 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. @@ -962,27 +768,6 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayN } /** - * 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. @@ -993,12 +778,10 @@ private Mono deleteAsync(String resourceGroupName, String internetGatewayN */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayName) { - deleteAsync(resourceGroupName, internetGatewayName).block(); + beginDelete(resourceGroupName, internetGatewayName).getFinalResult(); } /** - * 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. @@ -1010,99 +793,64 @@ public void delete(String resourceGroupName, String internetGatewayName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String internetGatewayName, Context context) { - deleteAsync(resourceGroupName, internetGatewayName, context).block(); + beginDelete(resourceGroupName, internetGatewayName, context).getFinalResult(); } /** - * 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}. + * @return the response of a InternetGateway list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a InternetGateway list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGateway list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return 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. @@ -1110,33 +858,34 @@ private PagedFlux listByResourceGroupAsync(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 InternetGateways as paginated response with {@link PagedFlux}. + * @return the response of a InternetGateway list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return 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 PagedIterable}. + * @return the response of a InternetGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(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. @@ -1144,131 +893,105 @@ public PagedIterable listByResourceGroup(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 InternetGateways as paginated response with {@link PagedIterable}. + * @return the response of a InternetGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGateway list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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}. + * @return the response of a InternetGateway list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * * @throws ManagementException thrown 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}. + * @return the response of a InternetGateway list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return 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. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGateway list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return 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 PagedIterable}. + * @return the response of a InternetGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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 PagedIterable}. + * @return the response of a InternetGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1278,17 +1001,11 @@ 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 InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InternetGateway list operation 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( @@ -1298,6 +1015,24 @@ private Mono> listByResourceGroupNextSingleP .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a InternetGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1306,23 +1041,15 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGateway list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1332,17 +1059,11 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGateway list operation 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( @@ -1352,6 +1073,24 @@ private Mono> listBySubscriptionNextSinglePa .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a InternetGateway list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1360,22 +1099,14 @@ private Mono> listBySubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a InternetGateway list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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 index f104baac1302..d85ad51c65c3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class InternetGatewaysImpl implements InternetGateways { private final InternetGatewaysClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public InternetGatewaysImpl(InternetGatewaysClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -137,7 +137,7 @@ private InternetGatewaysClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 028bbd764dc1..2053ed2780c6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,13 +28,14 @@ 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.BinaryData; 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.IpCommunitiesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunitiesListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunityListResult; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,108 +53,176 @@ public final class IpCommunitiesClientImpl implements IpCommunitiesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of IpCommunitiesClientImpl. * * @param client the instance of the service client containing this operation class. */ - IpCommunitiesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + IpCommunitiesClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(IpCommunitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiIpCommunities to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientIpCommunities to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientIpCommunities") public interface IpCommunitiesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipCommunityName") String ipCommunityName, @BodyParam("application/json") IpCommunityInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityInner resource, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") @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("ipCommunityName") String ipCommunityName, @BodyParam("application/json") IpCommunityPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityPatch properties, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") IpCommunityPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") @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("ipCommunityName") String ipCommunityName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipCommunityName") String ipCommunityName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @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. @@ -161,385 +230,248 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityInner 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String ipCommunityName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipCommunityName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @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 IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityInner 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(), ipCommunityName, body, accept, context); - } - - /** - * Create an IP Community. - * - * Implements an IP Community PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @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 IP Community resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpCommunityInner> beginCreateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, ipCommunityName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String ipCommunityName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ipCommunityName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @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 IP Community resource definition. + * @return the IP Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpCommunityInner> beginCreateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, ipCommunityName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, accept, context); } /** - * Create an IP Community. - * - * Implements an IP Community PUT method. + * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @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 IP Community resource definition. + * @return the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body) { - return this.beginCreateAsync(resourceGroupName, ipCommunityName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName) { + return getByResourceGroupWithResponse(resourceGroupName, ipCommunityName, Context.NONE).getValue(); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 IP Community resource definition. + * @return the IP Community resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, - String ipCommunityName, IpCommunityInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, ipCommunityName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String ipCommunityName, + IpCommunityInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. + * @param resource 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 IP Community resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipCommunityName, - IpCommunityInner body) { - return beginCreateAsync(resourceGroupName, ipCommunityName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, resource, + Context.NONE); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. + * @param resource 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 IP Community resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipCommunityName, IpCommunityInner body, - Context context) { - return beginCreateAsync(resourceGroupName, ipCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, resource, + context); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. + * @param resource 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 IP Community resource definition. + * @return the {@link PollerFlux} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body) { - return createAsync(resourceGroupName, ipCommunityName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IpCommunityInner> beginCreateAsync(String resourceGroupName, + String ipCommunityName, IpCommunityInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, ipCommunityName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); } /** - * Create an IP Community. - * * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 IP Community resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, - Context context) { - return createAsync(resourceGroupName, ipCommunityName, body, context).block(); - } - - /** - * Gets an IP Community. - * - * Implements an IP Community GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipCommunityName) { - 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(), ipCommunityName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner resource) { + Response response = createWithResponse(resourceGroupName, ipCommunityName, resource); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, Context.NONE); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param resource 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 IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipCommunityName, 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(), ipCommunityName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpCommunityInner> beginCreate(String resourceGroupName, + String ipCommunityName, IpCommunityInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, ipCommunityName, resource, context); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, context); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param resource 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 IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String ipCommunityName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipCommunityName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String ipCommunityName, + IpCommunityInner resource) { + return beginCreateAsync(resourceGroupName, ipCommunityName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. + * @param resource 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 IP Community resource definition along with {@link Response}. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String ipCommunityName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipCommunityName, context).block(); + public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner resource) { + return beginCreate(resourceGroupName, ipCommunityName, resource).getFinalResult(); } /** - * Gets an IP Community. - * - * Implements an IP Community GET method. + * Implements an IP Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param resource 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 IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName) { - return getByResourceGroupWithResponse(resourceGroupName, ipCommunityName, Context.NONE).getValue(); + public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner resource, + Context context) { + return beginCreate(resourceGroupName, ipCommunityName, resource, context).getFinalResult(); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -548,110 +480,65 @@ public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCo */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityPatch 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(); - } + IpCommunityPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipCommunityName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. - * @param context The context to associate with this operation. + * @param properties IP Community 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 IP Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String ipCommunityName, - IpCommunityPatch 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(); - } + private Response updateWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipCommunityName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, properties, + Context.NONE); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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 IP Community resource definition. + * @return the IP Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpCommunityInner> beginUpdateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, ipCommunityName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String ipCommunityName, + IpCommunityPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, contentType, accept, properties, + context); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. - * @param context The context to associate with this operation. + * @param properties IP Community 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. @@ -659,22 +546,18 @@ private PollerFlux, IpCommunityInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpCommunityInner> beginUpdateAsync(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, ipCommunityName, body, context); + String ipCommunityName, IpCommunityPatch properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, ipCommunityName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpCommunityInner.class, IpCommunityInner.class, context); + IpCommunityInner.class, IpCommunityInner.class, this.client.getContext()); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -682,18 +565,18 @@ private PollerFlux, IpCommunityInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginUpdate(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body) { - return this.beginUpdateAsync(resourceGroupName, ipCommunityName, body).getSyncPoller(); + String ipCommunityName, IpCommunityPatch properties) { + Response response = updateWithResponse(resourceGroupName, ipCommunityName, properties); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, Context.NONE); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -702,18 +585,18 @@ public SyncPoller, IpCommunityInner> beginUpdate(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginUpdate(String resourceGroupName, - String ipCommunityName, IpCommunityPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, ipCommunityName, body, context).getSyncPoller(); + String ipCommunityName, IpCommunityPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, ipCommunityName, properties, context); + return this.client.getLroResult(response, IpCommunityInner.class, + IpCommunityInner.class, context); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -721,58 +604,33 @@ public SyncPoller, IpCommunityInner> beginUpdate(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String ipCommunityName, - IpCommunityPatch body) { - return beginUpdateAsync(resourceGroupName, ipCommunityName, body).last() + IpCommunityPatch properties) { + return beginUpdateAsync(resourceGroupName, ipCommunityName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community 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 IP Community resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, ipCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an IP Community. - * - * API to update certain properties of the IP Community resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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 IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body) { - return updateAsync(resourceGroupName, ipCommunityName, body).block(); + public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch properties) { + return beginUpdate(resourceGroupName, ipCommunityName, properties).getFinalResult(); } /** - * Updates an IP Community. - * * API to update certain properties of the IP Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param body IP Community properties to update. + * @param properties IP Community 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. @@ -780,14 +638,12 @@ public IpCommunityInner update(String resourceGroupName, String ipCommunityName, * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, + public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch properties, Context context) { - return updateAsync(resourceGroupName, ipCommunityName, body, context).block(); + return beginUpdate(resourceGroupName, ipCommunityName, properties, context).getFinalResult(); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -799,111 +655,63 @@ public IpCommunityInner update(String resourceGroupName, String ipCommunityName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipCommunityName) { - 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(), ipCommunityName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipCommunityName, - 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 (ipCommunityName == null) { - return Mono - .error(new IllegalArgumentException("Parameter ipCommunityName 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(), ipCommunityName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ipCommunityName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, Context.NONE); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipCommunityName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipCommunityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String ipCommunityName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipCommunityName, context); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 ipCommunityName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipCommunityName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipCommunityName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipCommunityName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -915,12 +723,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName) { - return this.beginDeleteAsync(resourceGroupName, ipCommunityName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipCommunityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -934,12 +741,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipCommunityName, Context context) { - return this.beginDeleteAsync(resourceGroupName, ipCommunityName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipCommunityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -956,27 +762,6 @@ private Mono deleteAsync(String resourceGroupName, String ipCommunityName) } /** - * Deletes an IP Community. - * - * Implements IP Community DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipCommunityName Name of the IP Community. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ipCommunityName, Context context) { - return beginDeleteAsync(resourceGroupName, ipCommunityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -987,12 +772,10 @@ private Mono deleteAsync(String resourceGroupName, String ipCommunityName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipCommunityName) { - deleteAsync(resourceGroupName, ipCommunityName).block(); + beginDelete(resourceGroupName, ipCommunityName).getFinalResult(); } /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1004,99 +787,64 @@ public void delete(String resourceGroupName, String ipCommunityName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipCommunityName, Context context) { - deleteAsync(resourceGroupName, ipCommunityName, context).block(); + beginDelete(resourceGroupName, ipCommunityName, context).getFinalResult(); } /** - * List IP Communities by resource group. - * * 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 IP Communities by resource group. - * * 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List IP Communities by resource group. - * * 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 IP Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1104,33 +852,33 @@ 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 IP Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by resource group. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1138,131 +886,105 @@ 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List IP Communities by subscription. - * * 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 IP Communities by subscription. - * * 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1272,17 +994,11 @@ 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation 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( @@ -1292,6 +1008,24 @@ private Mono> listByResourceGroupNextSinglePageA .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a IpCommunity list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1300,23 +1034,15 @@ 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1326,17 +1052,11 @@ 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation 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( @@ -1346,6 +1066,24 @@ private Mono> listBySubscriptionNextSinglePageAs .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a IpCommunity list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1354,22 +1092,14 @@ 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 IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpCommunity list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/IpCommunitiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java index 5906922b8461..5317685d588f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class IpCommunitiesImpl implements IpCommunities { private final IpCommunitiesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public IpCommunitiesImpl(IpCommunitiesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -136,7 +136,7 @@ private IpCommunitiesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 b7738fe66401..e9ef053d1327 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,20 +8,17 @@ 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.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.IpCommunityPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityProperties; import java.util.Collections; -import java.util.List; import java.util.Map; public final class IpCommunityImpl implements IpCommunity, IpCommunity.Definition, IpCommunity.Update { private IpCommunityInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -48,33 +45,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); - } - - public List ipCommunityRules() { - List inner = this.innerModel().ipCommunityRules(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public IpCommunityProperties properties() { + return this.innerModel().properties(); } - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -93,7 +69,7 @@ public IpCommunityInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -101,7 +77,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String ipCommunityName; - private IpCommunityPatch updateBody; + private IpCommunityPatch updateProperties; public IpCommunityImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -122,34 +98,33 @@ public IpCommunity create(Context context) { return this; } - IpCommunityImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + IpCommunityImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new IpCommunityInner(); this.serviceManager = serviceManager; this.ipCommunityName = name; } public IpCommunityImpl update() { - this.updateBody = new IpCommunityPatch(); + this.updateProperties = new IpCommunityPatch(); return this; } public IpCommunity apply() { this.innerObject = serviceManager.serviceClient() .getIpCommunities() - .update(resourceGroupName, ipCommunityName, updateBody, Context.NONE); + .update(resourceGroupName, ipCommunityName, updateProperties, Context.NONE); return this; } public IpCommunity apply(Context context) { this.innerObject = serviceManager.serviceClient() .getIpCommunities() - .update(resourceGroupName, ipCommunityName, updateBody, context); + .update(resourceGroupName, ipCommunityName, updateProperties, context); return this; } IpCommunityImpl(IpCommunityInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -182,32 +157,27 @@ public IpCommunityImpl withRegion(String location) { return this; } - public IpCommunityImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } + public IpCommunityImpl withProperties(IpCommunityProperties properties) { + this.innerModel().withProperties(properties); + return this; } - public IpCommunityImpl withIpCommunityRules(List ipCommunityRules) { + public IpCommunityImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withIpCommunityRules(ipCommunityRules); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withIpCommunityRules(ipCommunityRules); + this.updateProperties.withTags(tags); return this; } } - public IpCommunityImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public IpCommunityImpl withProperties(IpCommunityPatchableProperties properties) { + this.updateProperties.withProperties(properties); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 46d36c01e892..8aabbbc5116f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,13 +28,14 @@ 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.BinaryData; 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.IpExtendedCommunitiesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpExtendedCommunityListResult; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,83 +53,136 @@ public final class IpExtendedCommunitiesClientImpl implements IpExtendedCommunit /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of IpExtendedCommunitiesClientImpl. * * @param client the instance of the service client containing this operation class. */ - IpExtendedCommunitiesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + IpExtendedCommunitiesClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(IpExtendedCommunitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiIpExtendedCommunities to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientIpExtendedCommunities to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientIpExtendedCommunities") public interface IpExtendedCommunitiesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, - @BodyParam("application/json") IpExtendedCommunityInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, - @BodyParam("application/json") IpExtendedCommunityPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpExtendedCommunityPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") @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("ipExtendedCommunityName") String ipExtendedCommunityName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("ipExtendedCommunityName") String ipExtendedCommunityName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,7 +190,15 @@ Mono> list(@HostParam("$host") String en @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,18 +206,23 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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. @@ -163,389 +230,253 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityInner 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String ipExtendedCommunityName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition along with {@link Response} 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>> createWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityInner 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(), ipExtendedCommunityName, body, accept, context); - } - - /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> - beginCreateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String ipExtendedCommunityName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ipExtendedCommunityName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> beginCreateAsync( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String ipExtendedCommunityName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, accept, context); } /** - * Create an IP Extended Community. - * - * Implements IP Extended Community PUT method. + * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition. + * @return the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpExtendedCommunityInner> - beginCreate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body) { - return this.beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName) { + return getByResourceGroupWithResponse(resourceGroupName, ipExtendedCommunityName, Context.NONE).getValue(); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpExtendedCommunityInner> beginCreate( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String ipExtendedCommunityName, IpExtendedCommunityInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. + * @param resource 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 IP Extended Community resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body) { - return beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, resource, + Context.NONE); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. + * @param resource 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 IP Extended Community resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body, Context context) { - return beginCreateAsync(resourceGroupName, ipExtendedCommunityName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, resource, + context); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body Request payload. + * @param resource 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 IP Extended Community resource definition. + * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body) { - return createAsync(resourceGroupName, ipExtendedCommunityName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IpExtendedCommunityInner> + beginCreateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, ipExtendedCommunityName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, + this.client.getContext()); } /** - * Create an IP Extended Community. - * * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @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 IP Extended Community resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityInner body, Context context) { - return createAsync(resourceGroupName, ipExtendedCommunityName, body, context).block(); - } - - /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param resource 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 IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName) { - 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(), ipExtendedCommunityName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpExtendedCommunityInner> + beginCreate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner resource) { + Response response = createWithResponse(resourceGroupName, ipExtendedCommunityName, resource); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, Context.NONE); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param resource 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 IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(), ipExtendedCommunityName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpExtendedCommunityInner> beginCreate( + String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, ipExtendedCommunityName, resource, context); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param resource 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 IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String ipExtendedCommunityName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipExtendedCommunityName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource) { + return beginCreateAsync(resourceGroupName, ipExtendedCommunityName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. + * @param resource 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 IP Extended Community resource definition along with {@link Response}. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String ipExtendedCommunityName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipExtendedCommunityName, context).block(); + public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource) { + return beginCreate(resourceGroupName, ipExtendedCommunityName, resource).getFinalResult(); } /** - * Gets an IP Extended Community. - * - * Implements IP Extended Community GET method. + * Implements IP Extended Community PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param resource 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 IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName) { - return getByResourceGroupWithResponse(resourceGroupName, ipExtendedCommunityName, Context.NONE).getValue(); + public IpExtendedCommunityInner create(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityInner resource, Context context) { + return beginCreate(resourceGroupName, ipExtendedCommunityName, resource, context).getFinalResult(); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -554,112 +485,65 @@ public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityPatch 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(); - } + String ipExtendedCommunityName, IpExtendedCommunityPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. - * @param context The context to associate with this operation. + * @param properties IP Extended Community 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 IP Extended Community resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, IpExtendedCommunityPatch 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(); - } + private Response updateWithResponse(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipExtendedCommunityName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, + properties, Context.NONE); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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 IP Extended Community resource definition. + * @return the IP Extended Community resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpExtendedCommunityInner> - beginUpdateAsync(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String ipExtendedCommunityName, + IpExtendedCommunityPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, contentType, accept, + properties, context); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. - * @param context The context to associate with this operation. + * @param properties IP Extended Community 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. @@ -667,22 +551,20 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpExtendedCommunityInner> beginUpdateAsync( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, ipExtendedCommunityName, body, context); + = updateWithResponseAsync(resourceGroupName, ipExtendedCommunityName, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); + this.client.getHttpPipeline(), IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, + this.client.getContext()); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -690,18 +572,18 @@ private PollerFlux, IpExtendedCommunityInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> - beginUpdate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body) { - return this.beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body).getSyncPoller(); + beginUpdate(String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch properties) { + Response response = updateWithResponse(resourceGroupName, ipExtendedCommunityName, properties); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, Context.NONE); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -710,39 +592,20 @@ private PollerFlux, IpExtendedCommunityInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginUpdate( - String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body, context).getSyncPoller(); - } - - /** - * Updates the IP Extended Community. - * - * API to update certain properties of the IP Extended Community resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community 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 IP Extended Community resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body) { - return beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + String resourceGroupName, String ipExtendedCommunityName, IpExtendedCommunityPatch properties, + Context context) { + Response response + = updateWithResponse(resourceGroupName, ipExtendedCommunityName, properties, context); + return this.client.getLroResult(response, + IpExtendedCommunityInner.class, IpExtendedCommunityInner.class, context); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. - * @param context The context to associate with this operation. + * @param properties IP Extended Community 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. @@ -750,19 +613,17 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, body, context).last() + IpExtendedCommunityPatch properties) { + return beginUpdateAsync(resourceGroupName, ipExtendedCommunityName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -770,18 +631,16 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body) { - return updateAsync(resourceGroupName, ipExtendedCommunityName, body).block(); + IpExtendedCommunityPatch properties) { + return beginUpdate(resourceGroupName, ipExtendedCommunityName, properties).getFinalResult(); } /** - * Updates the IP Extended Community. - * * API to update certain properties of the IP Extended Community resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param body IP Extended Community properties to update. + * @param properties IP Extended Community 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. @@ -790,13 +649,11 @@ public IpExtendedCommunityInner update(String resourceGroupName, String ipExtend */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner update(String resourceGroupName, String ipExtendedCommunityName, - IpExtendedCommunityPatch body, Context context) { - return updateAsync(resourceGroupName, ipExtendedCommunityName, body, context).block(); + IpExtendedCommunityPatch properties, Context context) { + return beginUpdate(resourceGroupName, ipExtendedCommunityName, properties, context).getFinalResult(); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -809,95 +666,51 @@ public IpExtendedCommunityInner update(String resourceGroupName, String ipExtend @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipExtendedCommunityName) { - 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(), ipExtendedCommunityName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String ipExtendedCommunityName, 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 (ipExtendedCommunityName == null) { - return Mono.error( - new IllegalArgumentException("Parameter ipExtendedCommunityName 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(), ipExtendedCommunityName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ipExtendedCommunityName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, Context.NONE); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String ipExtendedCommunityName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipExtendedCommunityName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String ipExtendedCommunityName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipExtendedCommunityName, context); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -905,17 +718,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String ipExtendedCommunityName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, ipExtendedCommunityName, context); + String ipExtendedCommunityName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipExtendedCommunityName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -927,12 +736,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipExtendedCommunityName) { - return this.beginDeleteAsync(resourceGroupName, ipExtendedCommunityName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipExtendedCommunityName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -946,12 +754,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipExtendedCommunityName, Context context) { - return this.beginDeleteAsync(resourceGroupName, ipExtendedCommunityName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipExtendedCommunityName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -968,27 +775,6 @@ private Mono deleteAsync(String resourceGroupName, String ipExtendedCommun } /** - * Deletes the IP Extended Community. - * - * Implements IP Extended Community DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipExtendedCommunityName Name of the IP Extended Community. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ipExtendedCommunityName, Context context) { - return beginDeleteAsync(resourceGroupName, ipExtendedCommunityName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -999,12 +785,10 @@ private Mono deleteAsync(String resourceGroupName, String ipExtendedCommun */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipExtendedCommunityName) { - deleteAsync(resourceGroupName, ipExtendedCommunityName).block(); + beginDelete(resourceGroupName, ipExtendedCommunityName).getFinalResult(); } /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1016,101 +800,64 @@ public void delete(String resourceGroupName, String ipExtendedCommunityName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipExtendedCommunityName, Context context) { - deleteAsync(resourceGroupName, ipExtendedCommunityName, context).block(); + beginDelete(resourceGroupName, ipExtendedCommunityName, context).getFinalResult(); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1118,33 +865,34 @@ 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 IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1152,133 +900,105 @@ 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedFlux}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1288,18 +1008,11 @@ 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation 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( @@ -1309,6 +1022,24 @@ private Mono> listByResourceGroupNextSin .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a IpExtendedCommunity list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1317,24 +1048,16 @@ 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1344,18 +1067,11 @@ 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation 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( @@ -1365,6 +1081,24 @@ private Mono> listBySubscriptionNextSing .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a IpExtendedCommunity list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1373,23 +1107,14 @@ 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 IP Extended Communities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a IpExtendedCommunity list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/IpExtendedCommunitiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java index 157c39f359e9..11365064a049 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class IpExtendedCommunitiesImpl implements IpExtendedCommunities { private final IpExtendedCommunitiesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public IpExtendedCommunitiesImpl(IpExtendedCommunitiesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -138,7 +138,7 @@ private IpExtendedCommunitiesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 537c0659906f..6eb228659c2a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,21 +8,18 @@ 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.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 com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties; import java.util.Collections; -import java.util.List; import java.util.Map; public final class IpExtendedCommunityImpl implements IpExtendedCommunity, IpExtendedCommunity.Definition, IpExtendedCommunity.Update { private IpExtendedCommunityInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -49,33 +46,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public IpExtendedCommunityProperties properties() { + return this.innerModel().properties(); } - public List ipExtendedCommunityRules() { - List inner = this.innerModel().ipExtendedCommunityRules(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -94,7 +70,7 @@ public IpExtendedCommunityInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -102,7 +78,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String ipExtendedCommunityName; - private IpExtendedCommunityPatch updateBody; + private IpExtendedCommunityPatch updateProperties; public IpExtendedCommunityImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -124,33 +100,33 @@ public IpExtendedCommunity create(Context context) { } IpExtendedCommunityImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new IpExtendedCommunityInner(); this.serviceManager = serviceManager; this.ipExtendedCommunityName = name; } public IpExtendedCommunityImpl update() { - this.updateBody = new IpExtendedCommunityPatch(); + this.updateProperties = new IpExtendedCommunityPatch(); return this; } public IpExtendedCommunity apply() { this.innerObject = serviceManager.serviceClient() .getIpExtendedCommunities() - .update(resourceGroupName, ipExtendedCommunityName, updateBody, Context.NONE); + .update(resourceGroupName, ipExtendedCommunityName, updateProperties, Context.NONE); return this; } public IpExtendedCommunity apply(Context context) { this.innerObject = serviceManager.serviceClient() .getIpExtendedCommunities() - .update(resourceGroupName, ipExtendedCommunityName, updateBody, context); + .update(resourceGroupName, ipExtendedCommunityName, updateProperties, context); return this; } IpExtendedCommunityImpl(IpExtendedCommunityInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -184,15 +160,9 @@ 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 withProperties(IpExtendedCommunityProperties properties) { + this.innerModel().withProperties(properties); + return this; } public IpExtendedCommunityImpl withTags(Map tags) { @@ -200,22 +170,17 @@ public IpExtendedCommunityImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); + this.updateProperties.withTags(tags); return this; } } - public IpExtendedCommunityImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public IpExtendedCommunityImpl withProperties(IpExtendedCommunityPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 5cc40fad97da..b59dbb893e66 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,20 +8,17 @@ 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.IpPrefixRule; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixProperties; import java.util.Collections; -import java.util.List; import java.util.Map; public final class IpPrefixImpl implements IpPrefix, IpPrefix.Definition, IpPrefix.Update { private IpPrefixInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -48,33 +45,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ConfigurationState configurationState() { - return this.innerModel().configurationState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); + public IpPrefixProperties properties() { + return this.innerModel().properties(); } - public List ipPrefixRules() { - List inner = this.innerModel().ipPrefixRules(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -93,7 +69,7 @@ public IpPrefixInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -101,7 +77,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String ipPrefixName; - private IpPrefixPatch updateBody; + private IpPrefixPatch updateProperties; public IpPrefixImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -122,34 +98,33 @@ public IpPrefix create(Context context) { return this; } - IpPrefixImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + IpPrefixImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new IpPrefixInner(); this.serviceManager = serviceManager; this.ipPrefixName = name; } public IpPrefixImpl update() { - this.updateBody = new IpPrefixPatch(); + this.updateProperties = new IpPrefixPatch(); return this; } public IpPrefix apply() { this.innerObject = serviceManager.serviceClient() .getIpPrefixes() - .update(resourceGroupName, ipPrefixName, updateBody, Context.NONE); + .update(resourceGroupName, ipPrefixName, updateProperties, Context.NONE); return this; } public IpPrefix apply(Context context) { this.innerObject = serviceManager.serviceClient() .getIpPrefixes() - .update(resourceGroupName, ipPrefixName, updateBody, context); + .update(resourceGroupName, ipPrefixName, updateProperties, context); return this; } IpPrefixImpl(IpPrefixInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -182,37 +157,27 @@ public IpPrefixImpl withRegion(String location) { return this; } - public IpPrefixImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } + public IpPrefixImpl withProperties(IpPrefixProperties properties) { + this.innerModel().withProperties(properties); + return this; } - public IpPrefixImpl withIpPrefixRules(List ipPrefixRules) { + public IpPrefixImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withIpPrefixRules(ipPrefixRules); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withIpPrefixRules(ipPrefixRules); + this.updateProperties.withTags(tags); return this; } } - public IpPrefixImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public IpPrefixImpl withProperties(IpPrefixPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 bb4cfd0a9681..75548eee31c5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.IpPrefixesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixListResult; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,481 +53,413 @@ public final class IpPrefixesClientImpl implements IpPrefixesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of IpPrefixesClientImpl. * * @param client the instance of the service client containing this operation class. */ - IpPrefixesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + IpPrefixesClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(IpPrefixesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiIpPrefixes to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientIpPrefixes to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientIpPrefixes") public interface IpPrefixesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("ipPrefixName") String ipPrefixName, @BodyParam("application/json") IpPrefixInner body, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") @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("ipPrefixName") String ipPrefixName, @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixInner resource, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") @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("ipPrefixName") String ipPrefixName, @BodyParam("application/json") IpPrefixPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IpPrefixPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") @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("ipPrefixName") String ipPrefixName, @HeaderParam("Accept") String accept, Context context); + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ipPrefixName") String ipPrefixName, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixInner 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String ipPrefixName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipPrefixName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixInner 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(), ipPrefixName, body, accept, context); - } - - /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpPrefixInner> beginCreateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, ipPrefixName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String ipPrefixName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, ipPrefixName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpPrefixInner> beginCreateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, ipPrefixName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, accept, context); } /** - * Create an IP Prefix. - * - * Implements IP Prefix PUT method. + * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition. + * @return the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, - String ipPrefixName, IpPrefixInner body) { - return this.beginCreateAsync(resourceGroupName, ipPrefixName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName) { + return getByResourceGroupWithResponse(resourceGroupName, ipPrefixName, Context.NONE).getValue(); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, - String ipPrefixName, IpPrefixInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, ipPrefixName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String ipPrefixName, + IpPrefixInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. + * @param resource 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 IP Prefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { - return beginCreateAsync(resourceGroupName, ipPrefixName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipPrefixName, + IpPrefixInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, resource, + Context.NONE); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. + * @param resource 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 IP Prefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner body, - Context context) { - return beginCreateAsync(resourceGroupName, ipPrefixName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String ipPrefixName, + IpPrefixInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, resource, context); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body Request payload. + * @param resource 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 IP Prefix resource definition. + * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { - return createAsync(resourceGroupName, ipPrefixName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IpPrefixInner> beginCreateAsync(String resourceGroupName, + String ipPrefixName, IpPrefixInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, ipPrefixName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); } /** - * Create an IP Prefix. - * * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @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 IP Prefix resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context) { - return createAsync(resourceGroupName, ipPrefixName, body, context).block(); - } - - /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. + * @param resource 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 IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipPrefixName) { - 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(), ipPrefixName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, + String ipPrefixName, IpPrefixInner resource) { + Response response = createWithResponse(resourceGroupName, ipPrefixName, resource); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, Context.NONE); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param resource 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 IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ipPrefixName, 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(), ipPrefixName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IpPrefixInner> beginCreate(String resourceGroupName, + String ipPrefixName, IpPrefixInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, ipPrefixName, resource, context); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, context); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param resource 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 IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String ipPrefixName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipPrefixName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner resource) { + return beginCreateAsync(resourceGroupName, ipPrefixName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. + * @param resource 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 IP Prefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ipPrefixName, context).block(); + public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner resource) { + return beginCreate(resourceGroupName, ipPrefixName, resource).getFinalResult(); } /** - * Gets an IP Prefix. - * - * Implements IP Prefix GET method. + * Implements IP Prefix PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param resource 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 IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName) { - return getByResourceGroupWithResponse(resourceGroupName, ipPrefixName, Context.NONE).getValue(); + public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner resource, + Context context) { + return beginCreate(resourceGroupName, ipPrefixName, resource, context).getFinalResult(); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -534,107 +467,62 @@ public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefi */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixPatch 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(); - } + IpPrefixPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), ipPrefixName, body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. - * @param context The context to associate with this operation. + * @param properties IP Prefix 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 IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String ipPrefixName, - IpPrefixPatch 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(); - } + private Response updateWithResponse(String resourceGroupName, String ipPrefixName, + IpPrefixPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), ipPrefixName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, properties, + Context.NONE); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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 IP Prefix resource definition. + * @return the IP Prefix resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, IpPrefixInner> beginUpdateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, ipPrefixName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String ipPrefixName, + IpPrefixPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, contentType, accept, properties, context); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. - * @param context The context to associate with this operation. + * @param properties IP Prefix 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. @@ -642,21 +530,18 @@ private PollerFlux, IpPrefixInner> beginUpdateAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpPrefixInner> beginUpdateAsync(String resourceGroupName, - String ipPrefixName, IpPrefixPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, ipPrefixName, body, context); + String ipPrefixName, IpPrefixPatch properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, ipPrefixName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - IpPrefixInner.class, IpPrefixInner.class, context); + IpPrefixInner.class, IpPrefixInner.class, this.client.getContext()); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -664,18 +549,18 @@ private PollerFlux, IpPrefixInner> beginUpdateAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginUpdate(String resourceGroupName, - String ipPrefixName, IpPrefixPatch body) { - return this.beginUpdateAsync(resourceGroupName, ipPrefixName, body).getSyncPoller(); + String ipPrefixName, IpPrefixPatch properties) { + Response response = updateWithResponse(resourceGroupName, ipPrefixName, properties); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, Context.NONE); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -684,76 +569,51 @@ public SyncPoller, IpPrefixInner> beginUpdate(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginUpdate(String resourceGroupName, - String ipPrefixName, IpPrefixPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, ipPrefixName, body, context).getSyncPoller(); + String ipPrefixName, IpPrefixPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, ipPrefixName, properties, context); + return this.client.getLroResult(response, IpPrefixInner.class, + IpPrefixInner.class, context); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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 IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { - return beginUpdateAsync(resourceGroupName, ipPrefixName, body).last() + private Mono updateAsync(String resourceGroupName, String ipPrefixName, IpPrefixPatch properties) { + return beginUpdateAsync(resourceGroupName, ipPrefixName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix 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 IP Prefix resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, ipPrefixName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the IP Prefix. - * - * API to update certain properties of the IP Prefix resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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 IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { - return updateAsync(resourceGroupName, ipPrefixName, body).block(); + public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch properties) { + return beginUpdate(resourceGroupName, ipPrefixName, properties).getFinalResult(); } /** - * Updates the IP Prefix. - * * API to update certain properties of the IP Prefix resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param body IP Prefix properties to update. + * @param properties IP Prefix 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. @@ -761,13 +621,12 @@ public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPre * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context) { - return updateAsync(resourceGroupName, ipPrefixName, body, context).block(); + public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch properties, + Context context) { + return beginUpdate(resourceGroupName, ipPrefixName, properties, context).getFinalResult(); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -779,109 +638,63 @@ public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPre */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipPrefixName) { - 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(), ipPrefixName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String ipPrefixName, - 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 (ipPrefixName == null) { - return Mono.error(new IllegalArgumentException("Parameter ipPrefixName 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(), ipPrefixName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String ipPrefixName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, Context.NONE); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipPrefixName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipPrefixName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String ipPrefixName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ipPrefixName, context); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 ipPrefixName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipPrefixName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String ipPrefixName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, ipPrefixName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -893,12 +706,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName) { - return this.beginDeleteAsync(resourceGroupName, ipPrefixName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipPrefixName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -912,12 +724,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String ipPrefixName, Context context) { - return this.beginDeleteAsync(resourceGroupName, ipPrefixName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, ipPrefixName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -933,27 +744,6 @@ private Mono deleteAsync(String resourceGroupName, String ipPrefixName) { } /** - * Deletes the IP Prefix. - * - * Implements IP Prefix DELETE method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipPrefixName Name of the IP Prefix. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ipPrefixName, Context context) { - return beginDeleteAsync(resourceGroupName, ipPrefixName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,12 +754,10 @@ private Mono deleteAsync(String resourceGroupName, String ipPrefixName, Co */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipPrefixName) { - deleteAsync(resourceGroupName, ipPrefixName).block(); + beginDelete(resourceGroupName, ipPrefixName).getFinalResult(); } /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -981,99 +769,64 @@ public void delete(String resourceGroupName, String ipPrefixName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String ipPrefixName, Context context) { - deleteAsync(resourceGroupName, ipPrefixName, context).block(); + beginDelete(resourceGroupName, ipPrefixName, context).getFinalResult(); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 IpPrefixes by resource group. - * * Implements IpPrefixes 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedFlux}. + * @return the response of a IpPrefix list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1081,33 +834,33 @@ 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 IP Prefixes as paginated response with {@link PagedFlux}. + * @return the response of a IpPrefix list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1115,131 +868,105 @@ 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedFlux}. + * @return the response of a IpPrefix list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedFlux}. + * @return the response of a IpPrefix list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1249,17 +976,11 @@ 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation 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( @@ -1269,6 +990,24 @@ private Mono> listByResourceGroupNextSinglePageAsyn .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a IpPrefix list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1277,23 +1016,15 @@ 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1303,17 +1034,11 @@ 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation 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( @@ -1323,6 +1048,24 @@ private Mono> listBySubscriptionNextSinglePageAsync .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a IpPrefix list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1331,21 +1074,14 @@ 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 IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a IpPrefix list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/IpPrefixesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java index 55bce95489e4..91cfd55412b8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class IpPrefixesImpl implements IpPrefixes { private final IpPrefixesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public IpPrefixesImpl(IpPrefixesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -136,7 +136,7 @@ private IpPrefixesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 ed46f264bc3b..556f5c4ea14f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,13 +8,12 @@ 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.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.L2IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; @@ -24,7 +23,7 @@ public final class L2IsolationDomainImpl implements L2IsolationDomain, L2IsolationDomain.Definition, L2IsolationDomain.Update { private L2IsolationDomainInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -51,36 +50,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String networkFabricId() { - return this.innerModel().networkFabricId(); - } - - public int vlanId() { - return this.innerModel().vlanId(); - } - - public Integer mtu() { - return this.innerModel().mtu(); + public L2IsolationDomainProperties properties() { + return this.innerModel().properties(); } - 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 SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -99,7 +74,7 @@ public L2IsolationDomainInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -107,7 +82,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String l2IsolationDomainName; - private L2IsolationDomainPatch updateBody; + private L2IsolationDomainPatch updateProperties; public L2IsolationDomainImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -129,33 +104,33 @@ public L2IsolationDomain create(Context context) { } L2IsolationDomainImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new L2IsolationDomainInner(); this.serviceManager = serviceManager; this.l2IsolationDomainName = name; } public L2IsolationDomainImpl update() { - this.updateBody = new L2IsolationDomainPatch(); + this.updateProperties = new L2IsolationDomainPatch(); return this; } public L2IsolationDomain apply() { this.innerObject = serviceManager.serviceClient() .getL2IsolationDomains() - .update(resourceGroupName, l2IsolationDomainName, updateBody, Context.NONE); + .update(resourceGroupName, l2IsolationDomainName, updateProperties, Context.NONE); return this; } public L2IsolationDomain apply(Context context) { this.innerObject = serviceManager.serviceClient() .getL2IsolationDomains() - .update(resourceGroupName, l2IsolationDomainName, updateBody, context); + .update(resourceGroupName, l2IsolationDomainName, updateProperties, context); return this; } L2IsolationDomainImpl(L2IsolationDomainInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -217,13 +192,8 @@ public L2IsolationDomainImpl withRegion(String location) { return this; } - public L2IsolationDomainImpl withNetworkFabricId(String networkFabricId) { - this.innerModel().withNetworkFabricId(networkFabricId); - return this; - } - - public L2IsolationDomainImpl withVlanId(int vlanId) { - this.innerModel().withVlanId(vlanId); + public L2IsolationDomainImpl withProperties(L2IsolationDomainProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -232,32 +202,17 @@ public L2IsolationDomainImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); - return this; - } - } - - public L2IsolationDomainImpl withMtu(Integer mtu) { - if (isInCreateMode()) { - this.innerModel().withMtu(mtu); - return this; - } else { - this.updateBody.withMtu(mtu); + this.updateProperties.withTags(tags); return this; } } - public L2IsolationDomainImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public L2IsolationDomainImpl withProperties(L2IsolationDomainPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 7e5e49ba7901..82a8e3f4f603 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -38,8 +39,8 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainListResult; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -57,86 +58,175 @@ public final class L2IsolationDomainsClientImpl implements L2IsolationDomainsCli /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of L2IsolationDomainsClientImpl. * * @param client the instance of the service client containing this operation class. */ - L2IsolationDomainsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + L2IsolationDomainsClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(L2IsolationDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiL2IsolationDomains to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientL2IsolationDomains to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientL2IsolationDomains") public interface L2IsolationDomainsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") L2IsolationDomainInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") L2IsolationDomainPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L2IsolationDomainPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") @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("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/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, + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @@ -144,55 +234,60 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/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, + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l2IsolationDomainName") String l2IsolationDomainName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create L2 Isolation Domain. - * - * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is - * applied on the devices only after the isolation domain is enabled. + * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -200,46 +295,73 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String l2IsolationDomainName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L2 Isolation Domain. + * Implements L2 Isolation Domain GET method. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 L2 Isolation Domain resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String l2IsolationDomainName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, l2IsolationDomainName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Implements L2 Isolation Domain GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 L2 Isolation Domain resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String l2IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context); + } + + /** + * Implements L2 Isolation Domain GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 L2 Isolation Domain resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName) { + return getByResourceGroupWithResponse(resourceGroupName, l2IsolationDomainName, Context.NONE).getValue(); + } + + /** * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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. @@ -248,112 +370,90 @@ private Mono>> createWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner 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(); - } + String l2IsolationDomainName, L2IsolationDomainInner resource) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, body, accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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 L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> - beginCreateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, resource, + Context.NONE); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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 L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> beginCreateAsync( - String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, resource, + context); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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 L2 Isolation Domain resource definition. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body) { - return this.beginCreateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + private PollerFlux, L2IsolationDomainInner> + beginCreateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, l2IsolationDomainName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, + this.client.getContext()); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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. @@ -361,41 +461,40 @@ public SyncPoller, L2IsolationDomainInner> be */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l2IsolationDomainName, body, context).getSyncPoller(); + String l2IsolationDomainName, L2IsolationDomainInner resource) { + Response response = createWithResponse(resourceGroupName, l2IsolationDomainName, resource); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, Context.NONE); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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 L2 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainInner body) { - return beginCreateAsync(resourceGroupName, l2IsolationDomainName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L2IsolationDomainInner> beginCreate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, l2IsolationDomainName, resource, context); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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. @@ -403,20 +502,18 @@ private Mono createAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainInner body, Context context) { - return beginCreateAsync(resourceGroupName, l2IsolationDomainName, body, context).last() + L2IsolationDomainInner resource) { + return beginCreateAsync(resourceGroupName, l2IsolationDomainName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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. @@ -424,19 +521,17 @@ private Mono createAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainInner body) { - return createAsync(resourceGroupName, l2IsolationDomainName, body).block(); + L2IsolationDomainInner resource) { + return beginCreate(resourceGroupName, l2IsolationDomainName, resource).getFinalResult(); } /** - * Create L2 Isolation Domain. - * * Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is * applied on the devices only after the isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body Request payload. + * @param resource 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. @@ -445,17 +540,16 @@ public L2IsolationDomainInner create(String resourceGroupName, String l2Isolatio */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainInner body, Context context) { - return createAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + L2IsolationDomainInner resource, Context context) { + return beginCreate(resourceGroupName, l2IsolationDomainName, resource, context).getFinalResult(); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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. @@ -463,609 +557,523 @@ public L2IsolationDomainInner create(String resourceGroupName, String l2Isolatio * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName) { - 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.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Retrieves details of this L2 Isolation Domain. + * API to update certain properties of the L2 Isolation Domain resource. * - * Implements L2 Isolation Domain GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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 L2 Isolation Domain resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, properties, + Context.NONE); + } + + /** + * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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 L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, 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.")); - } + private Response updateWithResponse(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, properties, + context); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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 L2 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String l2IsolationDomainName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l2IsolationDomainName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, L2IsolationDomainInner> + beginUpdateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, l2IsolationDomainName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, + this.client.getContext()); } /** - * Retrieves details of this L2 Isolation Domain. + * API to update certain properties of the L2 Isolation Domain resource. * - * Implements L2 Isolation Domain GET method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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 L2 Isolation Domain resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainPatch properties) { + Response response = updateWithResponse(resourceGroupName, l2IsolationDomainName, properties); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, Context.NONE); + } + + /** + * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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 L2 Isolation Domain resource definition along with {@link Response}. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String l2IsolationDomainName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l2IsolationDomainName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, + String l2IsolationDomainName, L2IsolationDomainPatch properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, l2IsolationDomainName, properties, context); + return this.client.getLroResult(response, + L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); } /** - * Retrieves details of this L2 Isolation Domain. - * - * Implements L2 Isolation Domain GET method. + * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. + * @param properties 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 L2 Isolation Domain resource definition. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName) { - return getByResourceGroupWithResponse(resourceGroupName, l2IsolationDomainName, Context.NONE).getValue(); + private Mono updateAsync(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties) { + return beginUpdateAsync(resourceGroupName, l2IsolationDomainName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param properties 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 L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch 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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties) { + return beginUpdate(resourceGroupName, l2IsolationDomainName, properties).getFinalResult(); } /** - * Updates the L2 Isolation Domain. - * * API to update certain properties of the L2 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param properties 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 L2 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch 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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, body, accept, context); + public L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, + L2IsolationDomainPatch properties, Context context) { + return beginUpdate(resourceGroupName, l2IsolationDomainName, properties, context).getFinalResult(); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> - beginUpdateAsync(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String l2IsolationDomainName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the L2 Isolation Domain. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * - * API to update certain properties of the L2 Isolation Domain resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l2IsolationDomainName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, Context.NONE); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l2IsolationDomainName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, context); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L2IsolationDomainInner> beginUpdateAsync( - String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L2IsolationDomainInner.class, L2IsolationDomainInner.class, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String l2IsolationDomainName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, l2IsolationDomainName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch body) { - return this.beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName) { + Response response = deleteWithResponse(resourceGroupName, l2IsolationDomainName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L2IsolationDomainInner> beginUpdate(String resourceGroupName, - String l2IsolationDomainName, L2IsolationDomainPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, l2IsolationDomainName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainPatch body) { - return beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body).last() + private Mono deleteAsync(String resourceGroupName, String l2IsolationDomainName) { + return beginDeleteAsync(resourceGroupName, l2IsolationDomainName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l2IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String l2IsolationDomainName) { + beginDelete(resourceGroupName, l2IsolationDomainName).getFinalResult(); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainPatch body) { - return updateAsync(resourceGroupName, l2IsolationDomainName, body).block(); + public void delete(String resourceGroupName, String l2IsolationDomainName, Context context) { + beginDelete(resourceGroupName, l2IsolationDomainName, context).getFinalResult(); } /** - * Updates the L2 Isolation Domain. - * - * API to update certain properties of the L2 Isolation Domain resource. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2 Isolation Domain. - * @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 L2 Isolation Domain resource definition. + * @return the response of a L2IsolationDomain list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, - L2IsolationDomainPatch body, Context context) { - return updateAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * Deletes the L2 Isolation Domain. + * Displays L2IsolationDomains list by resource group GET method. * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * @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 the response of a L2IsolationDomain list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a L2IsolationDomain list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName) { - 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.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a L2IsolationDomain list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, 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.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l2IsolationDomainName, accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String l2IsolationDomainName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, l2IsolationDomainName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l2IsolationDomainName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 response of a L2IsolationDomain list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName) { - return this.beginDeleteAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 response of a L2IsolationDomain list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a L2IsolationDomain list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l2IsolationDomainName) { - return beginDeleteAsync(resourceGroupName, l2IsolationDomainName).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a L2IsolationDomain list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { - return beginDeleteAsync(resourceGroupName, l2IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String l2IsolationDomainName) { - deleteAsync(resourceGroupName, l2IsolationDomainName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Deletes the L2 Isolation Domain. - * - * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String l2IsolationDomainName, Context context) { - deleteAsync(resourceGroupName, l2IsolationDomainName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1074,141 +1082,88 @@ public void delete(String resourceGroupName, String l2IsolationDomainName, 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 common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String l2IsolationDomainName, 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 (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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * 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 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 along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, 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 (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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * 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 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 common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l2IsolationDomainName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, contentType, accept, body, + context); } /** - * Implements the operation to the underlying resources. - * * 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 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 common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String l2IsolationDomainName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1217,19 +1172,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l2IsolationDomainName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1239,20 +1197,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l2IsolationDomainName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1261,7 +1221,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1271,29 +1231,6 @@ private Mono updateAdministrativeS } /** - * Implements the operation to the underlying resources. - * - * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1302,17 +1239,15 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, l2IsolationDomainName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1322,12 +1257,12 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context).getFinalResult(); } /** @@ -1338,33 +1273,16 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String l2IsolationDomainName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1373,36 +1291,17 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, 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.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String l2IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, Context.NONE); } /** @@ -1410,19 +1309,18 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the response of the action validate configuration. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, + String l2IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, context); } /** @@ -1430,21 +1328,19 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** @@ -1455,12 +1351,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return this.beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, l2IsolationDomainName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** @@ -1472,12 +1370,15 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, l2IsolationDomainName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** @@ -1488,7 +1389,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1497,24 +1398,6 @@ private Mono validateConfigurationAsync(Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Validates the configuration of the resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Validates the configuration of the resources. * @@ -1523,12 +1406,12 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return validateConfigurationAsync(resourceGroupName, l2IsolationDomainName).block(); + return beginValidateConfiguration(resourceGroupName, l2IsolationDomainName).getFinalResult(); } /** @@ -1540,17 +1423,15 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return validateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).block(); + return beginValidateConfiguration(resourceGroupName, l2IsolationDomainName, context).getFinalResult(); } /** - * 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. @@ -1558,128 +1439,78 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, String l2IsolationDomainName) { - 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, 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 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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String l2IsolationDomainName, 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.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, + String l2IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, accept, context); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, accept, Context.NONE); } /** - * 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 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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { - Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String l2IsolationDomainName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l2IsolationDomainName, 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 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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1687,18 +1518,20 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return this.beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, l2IsolationDomainName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1707,18 +1540,21 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + Response response + = commitConfigurationWithResponse(resourceGroupName, l2IsolationDomainName, context); + return this.client + .getLroResult( + response, 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. @@ -1726,7 +1562,7 @@ private Mono>> commitConfigurationWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitConfigurationAsync(String resourceGroupName, @@ -1736,28 +1572,6 @@ private Mono commitConfigurationAsy } /** - * 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 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 common response for the state updates on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String l2IsolationDomainName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName, 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. @@ -1765,17 +1579,15 @@ private Mono commitConfigurationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName) { - return commitConfigurationAsync(resourceGroupName, l2IsolationDomainName).block(); + return beginCommitConfiguration(resourceGroupName, l2IsolationDomainName).getFinalResult(); } /** - * 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. @@ -1784,270 +1596,70 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { - return commitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).block(); + return beginCommitConfiguration(resourceGroupName, l2IsolationDomainName, context).getFinalResult(); } /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L2IsolationDomain list operation 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.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .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())); } /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains 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 L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains 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 L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L2IsolationDomain list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { 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())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. + * Get the next page of items. * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L2IsolationDomain list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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 L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains 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 L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains 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 L2 Isolation Domains as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2057,53 +1669,20 @@ 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 L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L2IsolationDomain list operation 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.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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, - 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. * @@ -2111,24 +1690,15 @@ 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 L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L2IsolationDomain list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { 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())); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2139,22 +1709,14 @@ 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 L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L2IsolationDomain list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/L2IsolationDomainsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java index 15c56c5144f9..3db0cc79f7c6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -26,10 +26,10 @@ public final class L2IsolationDomainsImpl implements L2IsolationDomains { private final L2IsolationDomainsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public L2IsolationDomainsImpl(L2IsolationDomainsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -64,6 +64,27 @@ public void delete(String resourceGroupName, String l2IsolationDomainName, Conte this.serviceClient().delete(resourceGroupName, l2IsolationDomainName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); + } + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { CommonPostActionResponseForDeviceUpdateInner inner @@ -129,27 +150,6 @@ public CommonPostActionResponseForStateUpdate commitConfiguration(String resourc } } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new L2IsolationDomainImpl(inner1, this.manager())); - } - public L2IsolationDomain getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -210,7 +210,7 @@ private L2IsolationDomainsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 e0616a07b263..89b37036d8ef 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,17 +8,12 @@ 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.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.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; @@ -28,7 +23,7 @@ public final class L3IsolationDomainImpl implements L3IsolationDomain, L3IsolationDomain.Definition, L3IsolationDomain.Update { private L3IsolationDomainInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -55,44 +50,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String networkFabricId() { - return this.innerModel().networkFabricId(); - } - - 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(); - } - - public RedistributeStaticRoutes redistributeStaticRoutes() { - return this.innerModel().redistributeStaticRoutes(); + public L3IsolationDomainProperties properties() { + return this.innerModel().properties(); } - public AggregateRouteConfiguration aggregateRouteConfiguration() { - return this.innerModel().aggregateRouteConfiguration(); - } - - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { - return this.innerModel().connectedSubnetRoutePolicy(); - } - - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -111,7 +74,7 @@ public L3IsolationDomainInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -119,7 +82,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String l3IsolationDomainName; - private L3IsolationDomainPatch updateBody; + private L3IsolationDomainPatch updateProperties; public L3IsolationDomainImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -141,33 +104,33 @@ public L3IsolationDomain create(Context context) { } L3IsolationDomainImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new L3IsolationDomainInner(); this.serviceManager = serviceManager; this.l3IsolationDomainName = name; } public L3IsolationDomainImpl update() { - this.updateBody = new L3IsolationDomainPatch(); + this.updateProperties = new L3IsolationDomainPatch(); return this; } public L3IsolationDomain apply() { this.innerObject = serviceManager.serviceClient() .getL3IsolationDomains() - .update(resourceGroupName, l3IsolationDomainName, updateBody, Context.NONE); + .update(resourceGroupName, l3IsolationDomainName, updateProperties, Context.NONE); return this; } public L3IsolationDomain apply(Context context) { this.innerObject = serviceManager.serviceClient() .getL3IsolationDomains() - .update(resourceGroupName, l3IsolationDomainName, updateBody, context); + .update(resourceGroupName, l3IsolationDomainName, updateProperties, context); return this; } L3IsolationDomainImpl(L3IsolationDomainInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -229,8 +192,8 @@ public L3IsolationDomainImpl withRegion(String location) { return this; } - public L3IsolationDomainImpl withNetworkFabricId(String networkFabricId) { - this.innerModel().withNetworkFabricId(networkFabricId); + public L3IsolationDomainImpl withProperties(L3IsolationDomainProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -239,64 +202,17 @@ public L3IsolationDomainImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); - return this; - } - } - - public L3IsolationDomainImpl - withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets) { - if (isInCreateMode()) { - this.innerModel().withRedistributeConnectedSubnets(redistributeConnectedSubnets); - return this; - } else { - this.updateBody.withRedistributeConnectedSubnets(redistributeConnectedSubnets); + this.updateProperties.withTags(tags); return this; } } - public L3IsolationDomainImpl withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes) { - if (isInCreateMode()) { - this.innerModel().withRedistributeStaticRoutes(redistributeStaticRoutes); - return this; - } else { - this.updateBody.withRedistributeStaticRoutes(redistributeStaticRoutes); - return this; - } - } - - public L3IsolationDomainImpl - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { - if (isInCreateMode()) { - this.innerModel().withAggregateRouteConfiguration(aggregateRouteConfiguration); - return this; - } else { - this.updateBody.withAggregateRouteConfiguration(aggregateRouteConfiguration); - return this; - } - } - - public L3IsolationDomainImpl withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { - if (isInCreateMode()) { - this.innerModel().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); - return this; - } else { - this.updateBody.withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); - return this; - } - } - - public L3IsolationDomainImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public L3IsolationDomainImpl withProperties(L3IsolationDomainPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 e3dbd7ee6456..d64e5b74e71c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -38,8 +39,8 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainListResult; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -57,103 +58,175 @@ public final class L3IsolationDomainsClientImpl implements L3IsolationDomainsCli /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of L3IsolationDomainsClientImpl. * * @param client the instance of the service client containing this operation class. */ - L3IsolationDomainsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + L3IsolationDomainsClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(L3IsolationDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiL3IsolationDomains to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientL3IsolationDomains to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientL3IsolationDomains") public interface L3IsolationDomainsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") L3IsolationDomainInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") L3IsolationDomainPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") L3IsolationDomainPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") @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("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") @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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/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, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/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, + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); @@ -161,39 +234,60 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/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, + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("l3IsolationDomainName") String l3IsolationDomainName, @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("endpoint") String endpoint, + @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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -201,406 +295,270 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 L3 Isolation Domain resource definition along with {@link Response} 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>> createWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, body, accept, context); - } - - /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 the L3 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> - beginCreateAsync(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String l3IsolationDomainName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, l3IsolationDomainName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> beginCreateAsync( - String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String l3IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); } /** - * Create L3 Isolation Domain. - * - * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with - * external services .This configuration is applied on the devices only after the creation of networks is completed - * and isolation domain is enabled. + * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName) { + return getByResourceGroupWithResponse(resourceGroupName, l3IsolationDomainName, Context.NONE).getValue(); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, l3IsolationDomainName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. + * @param resource 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 L3 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainInner body) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, resource, + Context.NONE); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. + * @param resource 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 L3 Isolation Domain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainInner body, Context context) { - return beginCreateAsync(resourceGroupName, l3IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, resource, + context); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body Request payload. + * @param resource 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 L3 Isolation Domain resource definition. + * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainInner body) { - return createAsync(resourceGroupName, l3IsolationDomainName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, L3IsolationDomainInner> + beginCreateAsync(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, l3IsolationDomainName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, + this.client.getContext()); } /** - * Create L3 Isolation Domain. - * * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with * external services .This configuration is applied on the devices only after the creation of networks is completed * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 L3 Isolation Domain resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainInner body, Context context) { - return createAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); - } - - /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param resource 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 L3 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainInner resource) { + Response response = createWithResponse(resourceGroupName, l3IsolationDomainName, resource); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, Context.NONE); } /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with + * external services .This configuration is applied on the devices only after the creation of networks is completed + * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param resource 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 L3 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, L3IsolationDomainInner> beginCreate(String resourceGroupName, + String l3IsolationDomainName, L3IsolationDomainInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, l3IsolationDomainName, resource, context); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); } /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with + * external services .This configuration is applied on the devices only after the creation of networks is completed + * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param resource 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 L3 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String l3IsolationDomainName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l3IsolationDomainName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource) { + return beginCreateAsync(resourceGroupName, l3IsolationDomainName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with + * external services .This configuration is applied on the devices only after the creation of networks is completed + * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param context The context to associate with this operation. + * @param resource 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 L3 Isolation Domain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String l3IsolationDomainName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, l3IsolationDomainName, context).block(); + public L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource) { + return beginCreate(resourceGroupName, l3IsolationDomainName, resource).getFinalResult(); } /** - * Gets a L3 Isolation Domain. - * - * Retrieves details of this L3 Isolation Domain. + * Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with + * external services .This configuration is applied on the devices only after the creation of networks is completed + * and isolation domain is enabled. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param resource 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 L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName) { - return getByResourceGroupWithResponse(resourceGroupName, l3IsolationDomainName, Context.NONE).getValue(); + public L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainInner resource, Context context) { + return beginCreate(resourceGroupName, l3IsolationDomainName, resource, context).getFinalResult(); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -609,134 +567,86 @@ public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch 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(); - } + String l3IsolationDomainName, L3IsolationDomainPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. - * @param context The context to associate with this operation. + * @param properties API to update certain properties of the L3 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 L3 Isolation Domain resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch 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(); - } + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, properties, + Context.NONE); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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 L3 Isolation Domain resource definition. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> - beginUpdateAsync(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String l3IsolationDomainName, + L3IsolationDomainPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, properties, + context); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. - * @param context The context to associate with this operation. + * @param properties API to update certain properties of the L3 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 L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, L3IsolationDomainInner> beginUpdateAsync( - String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, L3IsolationDomainInner> + beginUpdateAsync(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); + = updateWithResponseAsync(resourceGroupName, l3IsolationDomainName, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); + this.client.getHttpPipeline(), L3IsolationDomainInner.class, L3IsolationDomainInner.class, + this.client.getContext()); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -744,18 +654,18 @@ private PollerFlux, L3IsolationDomainInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch body) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + String l3IsolationDomainName, L3IsolationDomainPatch properties) { + Response response = updateWithResponse(resourceGroupName, l3IsolationDomainName, properties); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, Context.NONE); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -764,18 +674,19 @@ public SyncPoller, L3IsolationDomainInner> be */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginUpdate(String resourceGroupName, - String l3IsolationDomainName, L3IsolationDomainPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body, context).getSyncPoller(); + String l3IsolationDomainName, L3IsolationDomainPatch properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, l3IsolationDomainName, properties, context); + return this.client.getLroResult(response, + L3IsolationDomainInner.class, L3IsolationDomainInner.class, context); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -783,40 +694,17 @@ public SyncPoller, L3IsolationDomainInner> be */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainPatch body) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body).last() + L3IsolationDomainPatch properties) { + return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 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 L3 Isolation Domain resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, l3IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a L3 Isolation Domain. - * - * API to update certain properties of the L3 Isolation Domain resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -824,18 +712,16 @@ private Mono updateAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainPatch body) { - return updateAsync(resourceGroupName, l3IsolationDomainName, body).block(); + L3IsolationDomainPatch properties) { + return beginUpdate(resourceGroupName, l3IsolationDomainName, properties).getFinalResult(); } /** - * Updates a L3 Isolation Domain. - * * API to update certain properties of the L3 Isolation Domain resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. - * @param body API to update certain properties of the L3 Isolation Domain resource. + * @param properties API to update certain properties of the L3 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. @@ -844,13 +730,11 @@ public L3IsolationDomainInner update(String resourceGroupName, String l3Isolatio */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, - L3IsolationDomainPatch body, Context context) { - return updateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + L3IsolationDomainPatch properties, Context context) { + return beginUpdate(resourceGroupName, l3IsolationDomainName, properties, context).getFinalResult(); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -863,113 +747,65 @@ public L3IsolationDomainInner update(String resourceGroupName, String l3Isolatio @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String l3IsolationDomainName) { - 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.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), l3IsolationDomainName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, Context.NONE); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String l3IsolationDomainName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String l3IsolationDomainName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, context); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String l3IsolationDomainName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String l3IsolationDomainName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -981,12 +817,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, l3IsolationDomainName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1000,12 +835,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String l3IsolationDomainName, Context context) { - return this.beginDeleteAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, l3IsolationDomainName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1022,27 +856,6 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai } /** - * Deletes a L3 Isolation Domain. - * - * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { - return beginDeleteAsync(resourceGroupName, l3IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1053,12 +866,10 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName) { - deleteAsync(resourceGroupName, l3IsolationDomainName).block(); + beginDelete(resourceGroupName, l3IsolationDomainName).getFinalResult(); } /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1070,99 +881,64 @@ public void delete(String resourceGroupName, String l3IsolationDomainName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String l3IsolationDomainName, Context context) { - deleteAsync(resourceGroupName, l3IsolationDomainName, context).block(); + beginDelete(resourceGroupName, l3IsolationDomainName, context).getFinalResult(); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 L3IsolationDomains by resource group. - * * Displays L3IsolationDomains 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return the response of a L3IsolationDomain list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1170,33 +946,34 @@ 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 L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return the response of a L3IsolationDomain list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1204,136 +981,108 @@ 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return the response of a L3IsolationDomain list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedFlux}. + * @return the response of a L3IsolationDomain list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1342,141 +1091,88 @@ 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 common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String l3IsolationDomainName, 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 (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, 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 (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, body, accept, context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + Context.NONE); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - UpdateAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, contentType, accept, body, + context); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String l3IsolationDomainName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1485,19 +1181,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1507,20 +1206,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, l3IsolationDomainName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, context); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1529,7 +1230,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1539,29 +1240,6 @@ private Mono updateAdministrativeS } /** - * executes enable operation to the underlying resources. - * - * Enables racks for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1570,17 +1248,15 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, body).getFinalResult(); } /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1590,12 +1266,12 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context).getFinalResult(); } /** @@ -1606,33 +1282,16 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, String l3IsolationDomainName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1641,36 +1300,17 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, 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.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String l3IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); } /** @@ -1678,19 +1318,18 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { - Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, + String l3IsolationDomainName, Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, context); } /** @@ -1698,21 +1337,19 @@ private Mono>> validateConfigurationWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** @@ -1723,12 +1360,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return this.beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, l3IsolationDomainName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** @@ -1740,12 +1379,15 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, l3IsolationDomainName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** @@ -1756,7 +1398,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1765,24 +1407,6 @@ private Mono validateConfigurationAsync(Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * Validates the configuration of the resources. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - return beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Validates the configuration of the resources. * @@ -1791,12 +1415,12 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return validateConfigurationAsync(resourceGroupName, l3IsolationDomainName).block(); + return beginValidateConfiguration(resourceGroupName, l3IsolationDomainName).getFinalResult(); } /** @@ -1808,17 +1432,15 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return validateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).block(); + return beginValidateConfiguration(resourceGroupName, l3IsolationDomainName, context).getFinalResult(); } /** - * 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. @@ -1826,128 +1448,78 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, String l3IsolationDomainName) { - 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, 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 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, - String l3IsolationDomainName, 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.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, + String l3IsolationDomainName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.commitConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, accept, context); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, accept, Context.NONE); } /** - * 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 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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { - Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String l3IsolationDomainName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, l3IsolationDomainName, 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 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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1955,18 +1527,20 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return this.beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, l3IsolationDomainName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1975,18 +1549,21 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); + Response response + = commitConfigurationWithResponse(resourceGroupName, l3IsolationDomainName, context); + return this.client + .getLroResult( + response, 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. @@ -1994,7 +1571,7 @@ private Mono>> commitConfigurationWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitConfigurationAsync(String resourceGroupName, @@ -2004,28 +1581,6 @@ private Mono commitConfigurationAsy } /** - * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String l3IsolationDomainName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName, 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. @@ -2033,17 +1588,15 @@ private Mono commitConfigurationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l3IsolationDomainName) { - return commitConfigurationAsync(resourceGroupName, l3IsolationDomainName).block(); + return beginCommitConfiguration(resourceGroupName, l3IsolationDomainName).getFinalResult(); } /** - * 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. @@ -2052,12 +1605,12 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { - return commitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).block(); + return beginCommitConfiguration(resourceGroupName, l3IsolationDomainName, context).getFinalResult(); } /** @@ -2067,17 +1620,11 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation 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( @@ -2087,6 +1634,24 @@ private Mono> listByResourceGroupNextSingl .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a L3IsolationDomain list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2095,23 +1660,15 @@ 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2121,17 +1678,11 @@ 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation 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( @@ -2141,6 +1692,24 @@ private Mono> listBySubscriptionNextSingle .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a L3IsolationDomain list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2149,22 +1718,14 @@ 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 L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a L3IsolationDomain list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/L3IsolationDomainsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java index ca4786525b97..113a81d4f470 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -26,10 +26,10 @@ public final class L3IsolationDomainsImpl implements L3IsolationDomains { private final L3IsolationDomainsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public L3IsolationDomainsImpl(L3IsolationDomainsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -210,7 +210,7 @@ private L3IsolationDomainsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 index 03a115743551..24645eaf913f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,17 +9,16 @@ 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 com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; 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; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -46,38 +45,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); + public NeighborGroupProperties properties() { + return this.innerModel().properties(); } - 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 SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -96,7 +69,7 @@ public NeighborGroupInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -104,7 +77,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String neighborGroupName; - private NeighborGroupPatch updateBody; + private NeighborGroupPatch updateProperties; public NeighborGroupImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -125,34 +98,33 @@ public NeighborGroup create(Context context) { return this; } - NeighborGroupImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NeighborGroupImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NeighborGroupInner(); this.serviceManager = serviceManager; this.neighborGroupName = name; } public NeighborGroupImpl update() { - this.updateBody = new NeighborGroupPatch(); + this.updateProperties = new NeighborGroupPatch(); return this; } public NeighborGroup apply() { this.innerObject = serviceManager.serviceClient() .getNeighborGroups() - .update(resourceGroupName, neighborGroupName, updateBody, Context.NONE); + .update(resourceGroupName, neighborGroupName, updateProperties, Context.NONE); return this; } public NeighborGroup apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNeighborGroups() - .update(resourceGroupName, neighborGroupName, updateBody, context); + .update(resourceGroupName, neighborGroupName, updateProperties, context); return this; } NeighborGroupImpl(NeighborGroupInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -185,37 +157,27 @@ public NeighborGroupImpl withRegion(String 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 withProperties(NeighborGroupProperties properties) { + this.innerModel().withProperties(properties); + return this; } - public NeighborGroupImpl withDestination(NeighborGroupDestination destination) { + public NeighborGroupImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withDestination(destination); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withDestination(destination); + this.updateProperties.withTags(tags); return this; } } - public NeighborGroupImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public NeighborGroupImpl withProperties(NeighborGroupPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 index 29ff270de4e6..782171bf5240 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.implementation.models.NeighborGroupListResult; 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; @@ -52,492 +53,423 @@ public final class NeighborGroupsClientImpl implements NeighborGroupsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NeighborGroupsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NeighborGroupsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NeighborGroupsClientImpl(FilesharesManagementClientImpl 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. + * The interface defining all the services for FilesharesManagementClientNeighborGroups to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNeighborGroups") public interface NeighborGroupsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200 }) @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, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @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, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupInner resource, + Context context); + @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NeighborGroupPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("neighborGroupName") String neighborGroupName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT 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 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}. + * @return 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String neighborGroupName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT 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 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}. + * @return the Neighbor Group 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, String neighborGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT 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 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. + * @return the Neighbor Group along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String neighborGroupName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, accept, context); } /** - * Creates the Neighbor Group. - * - * Implements the Neighbor Group PUT 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 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. + * @return 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(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String neighborGroupName, + NeighborGroupInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, resource, + 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 resource 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}. + * @return defines the Neighbor Group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String neighborGroupName, - NeighborGroupInner body) { - return beginCreateAsync(resourceGroupName, neighborGroupName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String neighborGroupName, + NeighborGroupInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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}. + * @return defines the Neighbor Group along with {@link Response}. */ @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); + private Response createWithResponse(String resourceGroupName, String neighborGroupName, + NeighborGroupInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, resource, + 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. + * @param resource 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. + * @return the {@link PollerFlux} for polling of defines the Neighbor Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { - return createAsync(resourceGroupName, neighborGroupName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupInner> beginCreateAsync(String resourceGroupName, + String neighborGroupName, NeighborGroupInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, neighborGroupName, resource); + 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. + * @param resource 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, - 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}. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, + String neighborGroupName, NeighborGroupInner resource) { + Response response = createWithResponse(resourceGroupName, neighborGroupName, resource); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, Context.NONE); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets 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 resource 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 Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. */ - @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); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginCreate(String resourceGroupName, + String neighborGroupName, NeighborGroupInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, neighborGroupName, resource, context); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, context); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets 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 resource 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 Neighbor Group on successful completion of {@link Mono}. + * @return defines 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())); + private Mono createAsync(String resourceGroupName, String neighborGroupName, + NeighborGroupInner resource) { + return beginCreateAsync(resourceGroupName, neighborGroupName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets 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 context The context to associate with this operation. + * @param resource 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 Neighbor Group along with {@link Response}. + * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String neighborGroupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName, context).block(); + public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner resource) { + return beginCreate(resourceGroupName, neighborGroupName, resource).getFinalResult(); } /** - * Retrieves details of neighbor Group using GET method. - * - * Gets 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 resource 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 Neighbor Group. + * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName) { - return getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE).getValue(); + public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner resource, + Context context) { + return beginCreate(resourceGroupName, neighborGroupName, resource, context).getFinalResult(); } /** - * 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 properties 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. @@ -545,109 +477,65 @@ public NeighborGroupInner getByResourceGroup(String resourceGroupName, String ne */ @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(); - } + NeighborGroupPatch properties) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, properties, + 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. + * @param properties 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}. + * @return defines the Neighbor Group along with {@link Response}. */ @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(); - } + private Response updateWithResponse(String resourceGroupName, String neighborGroupName, + NeighborGroupPatch properties) { + final String contentType = "application/json"; 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); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, properties, + Context.NONE); } /** - * 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 properties 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. + * @return defines the Neighbor Group along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String neighborGroupName, + NeighborGroupPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, contentType, accept, properties, + 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -655,22 +543,19 @@ private PollerFlux, NeighborGroupInner> beginUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NeighborGroupInner> beginUpdateAsync(String resourceGroupName, - String neighborGroupName, NeighborGroupPatch body, Context context) { - context = this.client.mergeContext(context); + String neighborGroupName, NeighborGroupPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, neighborGroupName, body, context); + = updateWithResponseAsync(resourceGroupName, neighborGroupName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NeighborGroupInner.class, NeighborGroupInner.class, context); + 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 properties 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. @@ -678,18 +563,18 @@ private PollerFlux, NeighborGroupInner> beginUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NeighborGroupInner> beginUpdate(String resourceGroupName, - String neighborGroupName, NeighborGroupPatch body) { - return this.beginUpdateAsync(resourceGroupName, neighborGroupName, body).getSyncPoller(); + String neighborGroupName, NeighborGroupPatch properties) { + Response response = updateWithResponse(resourceGroupName, neighborGroupName, properties); + return this.client.getLroResult(response, NeighborGroupInner.class, + NeighborGroupInner.class, Context.NONE); } /** - * 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 properties 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. @@ -698,18 +583,18 @@ public SyncPoller, NeighborGroupInner> beginUpdat */ @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(); + String neighborGroupName, NeighborGroupPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, neighborGroupName, properties, context); + return this.client.getLroResult(response, 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. + * @param properties 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. @@ -717,58 +602,34 @@ public SyncPoller, NeighborGroupInner> beginUpdat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String neighborGroupName, - NeighborGroupPatch body) { - return beginUpdateAsync(resourceGroupName, neighborGroupName, body).last() + NeighborGroupPatch properties) { + return beginUpdateAsync(resourceGroupName, neighborGroupName, properties).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. + * @param properties 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(); + public NeighborGroupInner update(String resourceGroupName, String neighborGroupName, + NeighborGroupPatch properties) { + return beginUpdate(resourceGroupName, neighborGroupName, properties).getFinalResult(); } /** - * 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 properties 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. @@ -776,14 +637,12 @@ public NeighborGroupInner update(String resourceGroupName, String neighborGroupN * @return defines the Neighbor Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, + public NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch properties, Context context) { - return updateAsync(resourceGroupName, neighborGroupName, body, context).block(); + return beginUpdate(resourceGroupName, neighborGroupName, properties, context).getFinalResult(); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -796,111 +655,64 @@ public NeighborGroupInner update(String resourceGroupName, String neighborGroupN @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, 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}. + * @return the response body along with {@link Response}. */ @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); + private Response deleteWithResponse(String resourceGroupName, String neighborGroupName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String neighborGroupName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, neighborGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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); + 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, - context); + 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. @@ -912,12 +724,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName) { - return this.beginDeleteAsync(resourceGroupName, neighborGroupName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, neighborGroupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -931,12 +742,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName, Context context) { - return this.beginDeleteAsync(resourceGroupName, neighborGroupName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, neighborGroupName, context); + return this.client.getLroResult(response, 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. @@ -953,27 +763,6 @@ private Mono deleteAsync(String resourceGroupName, String neighborGroupNam } /** - * 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. @@ -984,12 +773,10 @@ private Mono deleteAsync(String resourceGroupName, String neighborGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String neighborGroupName) { - deleteAsync(resourceGroupName, neighborGroupName).block(); + beginDelete(resourceGroupName, neighborGroupName).getFinalResult(); } /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1001,99 +788,64 @@ public void delete(String resourceGroupName, String neighborGroupName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String neighborGroupName, Context context) { - deleteAsync(resourceGroupName, neighborGroupName, context).block(); + beginDelete(resourceGroupName, neighborGroupName, context).getFinalResult(); } /** - * 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}. + * @return the response of a NeighborGroup list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a NeighborGroup list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NeighborGroup list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return 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. @@ -1101,33 +853,33 @@ 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 Neighbor Group as paginated response with {@link PagedFlux}. + * @return the response of a NeighborGroup list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return 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 PagedIterable}. + * @return the response of a NeighborGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(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. @@ -1135,131 +887,105 @@ 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 Neighbor Group as paginated response with {@link PagedIterable}. + * @return the response of a NeighborGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NeighborGroup list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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}. + * @return the response of a NeighborGroup list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * * @throws ManagementException thrown 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}. + * @return the response of a NeighborGroup list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return 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. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NeighborGroup list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return 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 PagedIterable}. + * @return the response of a NeighborGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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 PagedIterable}. + * @return the response of a NeighborGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1269,17 +995,11 @@ 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 Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NeighborGroup list operation 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( @@ -1289,6 +1009,24 @@ private Mono> listByResourceGroupNextSinglePag .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NeighborGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1297,23 +1035,15 @@ 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 Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NeighborGroup list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1323,17 +1053,11 @@ 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 Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NeighborGroup list operation 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( @@ -1343,6 +1067,24 @@ private Mono> listBySubscriptionNextSinglePage .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NeighborGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1351,22 +1093,14 @@ 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 Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NeighborGroup list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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 index 90356f19181f..b4b4289e2ca0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class NeighborGroupsImpl implements NeighborGroups { private final NeighborGroupsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NeighborGroupsImpl(NeighborGroupsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -136,7 +136,7 @@ private NeighborGroupsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 f4ce5242f942..6e7e1e233d2c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,13 +8,15 @@ 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.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceRWCommands; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParametersProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; @@ -24,7 +26,7 @@ public final class NetworkDeviceImpl implements NetworkDevice, NetworkDevice.Definition, NetworkDevice.Update { private NetworkDeviceInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -51,56 +53,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String version() { - return this.innerModel().version(); - } - - public String networkDeviceSku() { - return this.innerModel().networkDeviceSku(); - } - - 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 AdministrativeState administrativeState() { - return this.innerModel().administrativeState(); - } - - public String hostname() { - return this.innerModel().hostname(); + public NetworkDeviceProperties properties() { + return this.innerModel().properties(); } - public String serialNumber() { - return this.innerModel().serialNumber(); - } - - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -119,7 +77,7 @@ public NetworkDeviceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -127,7 +85,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkDeviceName; - private NetworkDevicePatchParameters updateBody; + private NetworkDevicePatchParameters updateProperties; public NetworkDeviceImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -148,34 +106,33 @@ public NetworkDevice create(Context context) { return this; } - NetworkDeviceImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NetworkDeviceImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkDeviceInner(); this.serviceManager = serviceManager; this.networkDeviceName = name; } public NetworkDeviceImpl update() { - this.updateBody = new NetworkDevicePatchParameters(); + this.updateProperties = new NetworkDevicePatchParameters(); return this; } public NetworkDevice apply() { this.innerObject = serviceManager.serviceClient() .getNetworkDevices() - .update(resourceGroupName, networkDeviceName, updateBody, Context.NONE); + .update(resourceGroupName, networkDeviceName, updateProperties, Context.NONE); return this; } public NetworkDevice apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkDevices() - .update(resourceGroupName, networkDeviceName, updateBody, context); + .update(resourceGroupName, networkDeviceName, updateProperties, context); return this; } NetworkDeviceImpl(NetworkDeviceInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -232,6 +189,23 @@ public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Contex return serviceManager.networkDevices().upgrade(resourceGroupName, networkDeviceName, body, context); } + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body) { + return serviceManager.networkDevices().runRoCommand(resourceGroupName, networkDeviceName, body); + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body, + Context context) { + return serviceManager.networkDevices().runRoCommand(resourceGroupName, networkDeviceName, body, context); + } + + public CommonPostActionResponseForDeviceRWCommands runRwCommand(DeviceRwCommand body) { + return serviceManager.networkDevices().runRwCommand(resourceGroupName, networkDeviceName, body); + } + + public CommonPostActionResponseForDeviceRWCommands runRwCommand(DeviceRwCommand body, Context context) { + return serviceManager.networkDevices().runRwCommand(resourceGroupName, networkDeviceName, body, context); + } + public NetworkDeviceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -242,52 +216,27 @@ public NetworkDeviceImpl withRegion(String location) { return this; } - public NetworkDeviceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public NetworkDeviceImpl withNetworkDeviceSku(String networkDeviceSku) { - this.innerModel().withNetworkDeviceSku(networkDeviceSku); + public NetworkDeviceImpl withProperties(NetworkDeviceProperties properties) { + this.innerModel().withProperties(properties); return this; } - public NetworkDeviceImpl withHostname(String hostname) { - if (isInCreateMode()) { - this.innerModel().withHostname(hostname); - return this; - } else { - this.updateBody.withHostname(hostname); - return this; - } - } - - public NetworkDeviceImpl withSerialNumber(String serialNumber) { + public NetworkDeviceImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withSerialNumber(serialNumber); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withSerialNumber(serialNumber); + this.updateProperties.withTags(tags); return this; } } - public NetworkDeviceImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public NetworkDeviceImpl withProperties(NetworkDevicePatchParametersProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 46ebc57f4b27..548f1962d0f9 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 @@ -1,26 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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.NetworkDeviceRoleName; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSku; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Collections; -import java.util.List; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkuProperties; public final class NetworkDeviceSkuImpl implements NetworkDeviceSku { private NetworkDeviceSkuInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; NetworkDeviceSkuImpl(NetworkDeviceSkuInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -37,54 +32,19 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String model() { - return this.innerModel().model(); - } - - public String manufacturer() { - return this.innerModel().manufacturer(); - } - - public List supportedVersions() { - List inner = this.innerModel().supportedVersions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List supportedRoleTypes() { - List inner = this.innerModel().supportedRoleTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public NetworkDeviceSkuProperties properties() { + return this.innerModel().properties(); } - public List interfaces() { - List inner = this.innerModel().interfaces(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public NetworkDeviceSkuInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } 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 fe892204816f..c0877d663ae8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkusListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkuListResult; import reactor.core.publisher.Mono; /** @@ -42,32 +42,41 @@ public final class NetworkDeviceSkusClientImpl implements NetworkDeviceSkusClien /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkDeviceSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkDeviceSkusClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkDeviceSkusClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkDeviceSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkDeviceSkus to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkDeviceSkus to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkDeviceSkus") public interface NetworkDeviceSkusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("networkDeviceSkuName") String networkDeviceSkuName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("networkDeviceSkuName") String networkDeviceSkuName, @HeaderParam("Accept") String accept, Context context); @@ -75,22 +84,36 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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("endpoint") 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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -101,60 +124,14 @@ Mono> listBySubscriptionNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String networkDeviceSkuName) { - 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 (networkDeviceSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceSkuName 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(), networkDeviceSkuName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), networkDeviceSkuName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Device Sku. - * - * Get a Network Device SKU details. - * - * @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 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) { - 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 (networkDeviceSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceSkuName 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(), - networkDeviceSkuName, accept, context); - } - - /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -169,8 +146,6 @@ private Mono getAsync(String networkDeviceSkuName) { } /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -182,12 +157,12 @@ private Mono getAsync(String networkDeviceSkuName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String networkDeviceSkuName, Context context) { - return getWithResponseAsync(networkDeviceSkuName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + networkDeviceSkuName, accept, context); } /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -202,123 +177,96 @@ public NetworkDeviceSkuInner get(String networkDeviceSkuName) { } /** - * 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 Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDeviceSku list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 Device SKUs by subscription. - * * List Network Device SKUs for 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 Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDeviceSku list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * 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 Network Device SKUs as paginated response with {@link PagedFlux}. + * @return the response of a NetworkDeviceSku list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for 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 Network Device SKUs as paginated response with {@link PagedFlux}. + * @return the response of a NetworkDeviceSku list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 Network Device SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDeviceSku list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for 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 Network Device SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDeviceSku list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -328,17 +276,11 @@ 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 Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDeviceSku list operation 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( @@ -348,6 +290,24 @@ private Mono> listBySubscriptionNextSingleP .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkDeviceSku list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -356,22 +316,14 @@ 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 Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDeviceSku list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkDeviceSkusImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java index 751a6ef6e88e..2759c2d1e720 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class NetworkDeviceSkusImpl implements NetworkDeviceSkus { private final NetworkDeviceSkusClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkDeviceSkusImpl(NetworkDeviceSkusClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -60,7 +60,7 @@ private NetworkDeviceSkusClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } 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 0d8014713c04..169f84929e1c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,15 +29,20 @@ 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.BinaryData; 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.NetworkDevicesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceListResult; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicesListResult; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; @@ -57,307 +62,447 @@ public final class NetworkDevicesClientImpl implements NetworkDevicesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkDevicesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkDevicesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkDevicesClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkDevicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkDevices to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkDevices to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkDevices") public interface NetworkDevicesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") NetworkDeviceInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDeviceInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkDeviceInner resource, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") @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("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") NetworkDevicePatchParameters body, @HeaderParam("Accept") String accept, - Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkDevicePatchParameters properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkDevicePatchParameters properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") @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("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices") @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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reboot(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RebootProperties body, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reboot(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") RebootProperties body, @HeaderParam("Accept") String accept, + Response rebootSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RebootProperties body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/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, + Mono>> refreshConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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}/refreshConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/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("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") UpdateDeviceAdministrativeState body, @HeaderParam("Accept") String accept, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateDeviceAdministrativeState body, Context context); - @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateDeviceAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateVersion body, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/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("networkDeviceName") String networkDeviceName, @BodyParam("application/json") UpdateVersion body, + Response upgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateVersion body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRoCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runRoCommand(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRoCommand body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRoCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response runRoCommandSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRoCommand body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRwCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runRwCommand(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRwCommand body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRwCommand") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response runRwCommandSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeviceRwCommand body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Device. - * - * Create a Network Device resource. + * 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. - * @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 Device resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Device resource details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkDeviceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Device. + * Gets the Network Device resource details. * - * Create a Network Device resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Network Device resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkDeviceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkDeviceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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. - * @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 Device resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkDeviceName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Device resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName) { + return getByResourceGroupWithResponse(resourceGroupName, networkDeviceName, Context.NONE).getValue(); + } + + /** + * Create a Network Device resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param resource 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 Device resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner 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(); - } + NetworkDeviceInner resource) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition. + * @return the Network Device resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginCreateAsync(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDeviceInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, resource, + Context.NONE); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition. + * @return the Network Device resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginCreateAsync(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkDeviceName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDeviceInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, resource, + context); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + private PollerFlux, NetworkDeviceInner> beginCreateAsync(String resourceGroupName, + String networkDeviceName, NetworkDeviceInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkDeviceName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkDeviceInner.class, NetworkDeviceInner.class, this.client.getContext()); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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. @@ -365,39 +510,38 @@ public SyncPoller, NetworkDeviceInner> beginCreat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, - String networkDeviceName, NetworkDeviceInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + String networkDeviceName, NetworkDeviceInner resource) { + Response response = createWithResponse(resourceGroupName, networkDeviceName, resource); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, Context.NONE); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner body) { - return beginCreateAsync(resourceGroupName, networkDeviceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkDeviceInner> beginCreate(String resourceGroupName, + String networkDeviceName, NetworkDeviceInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkDeviceName, resource, context); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, context); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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. @@ -405,37 +549,33 @@ private Mono createAsync(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String networkDeviceName, - NetworkDeviceInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkDeviceName, body, context).last() + NetworkDeviceInner resource) { + return beginCreateAsync(resourceGroupName, networkDeviceName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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 Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body) { - return createAsync(resourceGroupName, networkDeviceName, body).block(); + public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner resource) { + return beginCreate(resourceGroupName, networkDeviceName, resource).getFinalResult(); } /** - * Create Network Device. - * * Create a Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param resource 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. @@ -443,345 +583,143 @@ public NetworkDeviceInner create(String resourceGroupName, String networkDeviceN * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body, + public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner resource, Context context) { - return createAsync(resourceGroupName, networkDeviceName, body, context).block(); + return beginCreate(resourceGroupName, networkDeviceName, resource, context).getFinalResult(); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param properties Network Device 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 Device resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Device resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param properties Network Device 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 Device resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Device resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.")); - } + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, properties, + Context.NONE); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param properties Network Device 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 Device resource details on successful completion of {@link Mono}. + * @return the Network Device resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkDeviceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkDeviceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + NetworkDevicePatchParameters properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, properties, + context); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param context The context to associate with this operation. + * @param properties Network Device 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 Device resource details along with {@link Response}. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkDeviceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkDeviceName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkDeviceInner> beginUpdateAsync(String resourceGroupName, + String networkDeviceName, NetworkDevicePatchParameters properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkDeviceName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkDeviceInner.class, NetworkDeviceInner.class, this.client.getContext()); } /** - * Gets a Network Device. - * - * Gets the Network Device resource details. + * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. + * @param properties Network Device 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 Device resource details. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkDeviceInner getByResourceGroup(String resourceGroupName, String networkDeviceName) { - return getByResourceGroupWithResponse(resourceGroupName, networkDeviceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, + String networkDeviceName, NetworkDevicePatchParameters properties) { + Response response = updateWithResponse(resourceGroupName, networkDeviceName, properties); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, Context.NONE); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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 Device resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters 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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, + String networkDeviceName, NetworkDevicePatchParameters properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkDeviceName, properties, context); + return this.client.getLroResult(response, NetworkDeviceInner.class, + NetworkDeviceInner.class, context); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device 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 Device resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters 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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device 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 Device resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginUpdateAsync(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, this.client.getContext()); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device 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 Device resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkDeviceInner> beginUpdateAsync(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkDeviceName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkDeviceInner.class, NetworkDeviceInner.class, context); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device 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 Device resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device 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 Device resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkDeviceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, NetworkDevicePatchParameters body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device 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 Device resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters body) { - return beginUpdateAsync(resourceGroupName, networkDeviceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Device. - * - * Update certain properties of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. - * @param context The context to associate with this operation. + * @param properties Network Device 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. @@ -789,19 +727,17 @@ private Mono updateAsync(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters body, Context context) { - return beginUpdateAsync(resourceGroupName, networkDeviceName, body, context).last() + NetworkDevicePatchParameters properties) { + return beginUpdateAsync(resourceGroupName, networkDeviceName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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. @@ -809,18 +745,16 @@ private Mono updateAsync(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters body) { - return updateAsync(resourceGroupName, networkDeviceName, body).block(); + NetworkDevicePatchParameters properties) { + return beginUpdate(resourceGroupName, networkDeviceName, properties).getFinalResult(); } /** - * Updates a Network Device. - * * Update certain properties of the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Network Device properties to update. + * @param properties Network Device 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. @@ -829,13 +763,11 @@ public NetworkDeviceInner update(String resourceGroupName, String networkDeviceN */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, - NetworkDevicePatchParameters body, Context context) { - return updateAsync(resourceGroupName, networkDeviceName, body, context).block(); + NetworkDevicePatchParameters properties, Context context) { + return beginUpdate(resourceGroupName, networkDeviceName, properties, context).getFinalResult(); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -848,111 +780,64 @@ public NetworkDeviceInner update(String resourceGroupName, String networkDeviceN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, Context.NONE); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkDeviceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, context); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkDeviceName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkDeviceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,12 +849,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkDeviceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -983,12 +867,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkDeviceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1005,27 +888,6 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam } /** - * Deletes a Network Device. - * - * Delete the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkDeviceName, Context context) { - return beginDeleteAsync(resourceGroupName, networkDeviceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1036,12 +898,10 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName) { - deleteAsync(resourceGroupName, networkDeviceName).block(); + beginDelete(resourceGroupName, networkDeviceName).getFinalResult(); } /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1053,99 +913,64 @@ public void delete(String resourceGroupName, String networkDeviceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName, Context context) { - deleteAsync(resourceGroupName, networkDeviceName, context).block(); + beginDelete(resourceGroupName, networkDeviceName, context).getFinalResult(); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 NetworkDevices by resource group. - * * List all the Network Device resources in a 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedFlux}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1153,33 +978,33 @@ 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 NetworkDevices as paginated response with {@link PagedFlux}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1187,136 +1012,108 @@ 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedFlux}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedFlux}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1325,139 +1122,83 @@ 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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rebootWithResponseAsync(String resourceGroupName, String networkDeviceName, RebootProperties 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 contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reboot(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + return FluxUtil.withContext(context -> service.reboot(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rebootWithResponseAsync(String resourceGroupName, String networkDeviceName, - RebootProperties 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(); - } + private Response rebootWithResponse(String resourceGroupName, String networkDeviceName, + RebootProperties body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reboot(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.rebootSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body) { - Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rebootWithResponse(String resourceGroupName, String networkDeviceName, + RebootProperties body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.rebootSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = rebootWithResponseAsync(resourceGroupName, networkDeviceName, body, context); + beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body) { + Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkDeviceName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1466,18 +1207,20 @@ private Mono>> rebootWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body) { - return this.beginRebootAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + Response response = rebootWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1487,18 +1230,20 @@ private Mono>> rebootWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { - return this.beginRebootAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + Response response = rebootWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1507,7 +1252,7 @@ private Mono>> rebootWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rebootAsync(String resourceGroupName, @@ -1517,29 +1262,6 @@ private Mono rebootAsync(String res } /** - * Implements the operation to the underlying resources. - * - * Reboot the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rebootAsync(String resourceGroupName, - String networkDeviceName, RebootProperties body, Context context) { - return beginRebootAsync(resourceGroupName, networkDeviceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1548,17 +1270,15 @@ private Mono rebootAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body) { - return rebootAsync(resourceGroupName, networkDeviceName, body).block(); + return beginReboot(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1568,17 +1288,15 @@ public CommonPostActionResponseForStateUpdateInner reboot(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { - return rebootAsync(resourceGroupName, networkDeviceName, body, context).block(); + return beginReboot(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1586,78 +1304,55 @@ public CommonPostActionResponseForStateUpdateInner reboot(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> refreshConfigurationWithResponseAsync(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.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshConfigurationWithResponseAsync(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.")); - } + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkDeviceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context); + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. + * Refreshes the configuration the Network Device. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkDeviceName, + Context context) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); + } + + /** * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1665,7 +1360,7 @@ private Mono>> refreshConfigurationWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private @@ -1680,8 +1375,27 @@ private Mono>> refreshConfigurationWithResponseAsync(S } /** - * Implements the operation to the underlying resources. + * Refreshes the configuration the Network Device. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkDeviceName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); + } + + /** * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1690,665 +1404,835 @@ private Mono>> refreshConfigurationWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkDeviceName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshConfigurationAsync(String resourceGroupName, + String networkDeviceName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + String networkDeviceName) { + return beginRefreshConfiguration(resourceGroupName, networkDeviceName).getFinalResult(); + } + + /** + * Refreshes the configuration the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + String networkDeviceName, Context context) { + return beginRefreshConfiguration(resourceGroupName, networkDeviceName, context).getFinalResult(); + } + + /** + * 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 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * 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 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); + } + + /** + * 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 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. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfigurationAsync(String resourceGroupName, String networkDeviceName, Context context) { - context = this.client.mergeContext(context); + beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, + UpdateDeviceAdministrativeState body) { Mono>> mono - = refreshConfigurationWithResponseAsync(resourceGroupName, networkDeviceName, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Updates the Administrative state of the 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 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, + UpdateDeviceAdministrativeState body) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); + } + + /** + * 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 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 common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkDeviceName) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, + UpdateDeviceAdministrativeState body, Context context) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); + } + + /** + * 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 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, body).getFinalResult(); + } + + /** + * 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 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, body, context).getFinalResult(); + } + + /** + * 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 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, + String networkDeviceName, UpdateVersion body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkDeviceName, + UpdateVersion body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); + } + + /** + * 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 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkDeviceName, + UpdateVersion body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); + } + + /** + * 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 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, CommonPostActionResponseForStateUpdateInner> + beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body); + 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 the 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 Network Device. - * @param context The context to associate with this operation. + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); + beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body) { + Response response = upgradeWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the 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 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 on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshConfigurationAsync(String resourceGroupName, - String networkDeviceName) { - return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { + Response response = upgradeWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the 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 Network Device. - * @param context The context to associate with this operation. + * @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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshConfigurationAsync(String resourceGroupName, - String networkDeviceName, Context context) { - return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName, context).last() + private Mono upgradeAsync(String resourceGroupName, + String networkDeviceName, UpdateVersion body) { + return beginUpgradeAsync(resourceGroupName, networkDeviceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, - String networkDeviceName) { - return refreshConfigurationAsync(resourceGroupName, networkDeviceName).block(); + public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, + UpdateVersion body) { + return beginUpgrade(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration the 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, - String networkDeviceName, Context context) { - return refreshConfigurationAsync(resourceGroupName, networkDeviceName, context).block(); + public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, + UpdateVersion body, Context context) { + return beginUpgrade(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState 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(); - } + private Mono>> runRoCommandWithResponseAsync(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + .withContext(context -> service.runRoCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState 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(); - } + private Response runRoCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRoCommand body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.runRoCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body) { - Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response runRoCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRoCommand body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.runRoCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + PollerFlux, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommandAsync(String resourceGroupName, String networkDeviceName, DeviceRoCommand body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body, context); + = runRoCommandWithResponseAsync(resourceGroupName, networkDeviceName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + SyncPoller, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body) { + Response response = runRoCommandWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, - UpdateDeviceAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + SyncPoller, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner> + beginRunRoCommand(String resourceGroupName, String networkDeviceName, DeviceRoCommand body, Context context) { + Response response = runRoCommandWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context).last() + private Mono + runRoCommandAsync(String resourceGroupName, String networkDeviceName, DeviceRoCommand body) { + return beginRunRoCommandAsync(resourceGroupName, networkDeviceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).block(); + public CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body) { + return beginRunRoCommand(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Administrative state of the Network Device. + * Run the RO Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context).block(); + public CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context) { + return beginRunRoCommand(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkDeviceName, 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 (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(); - } + private Mono>> runRwCommandWithResponseAsync(String resourceGroupName, + String networkDeviceName, DeviceRwCommand body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, body, accept, context)) + .withContext(context -> service.runRwCommand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkDeviceName, 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 (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(); - } + private Response runRwCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, body, accept, context); + return service.runRwCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body) { - Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response runRwCommandWithResponse(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.runRwCommandSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { - context = this.client.mergeContext(context); + PollerFlux, CommonPostActionResponseForDeviceRWCommandsInner> + beginRunRwCommandAsync(String resourceGroupName, String networkDeviceName, DeviceRwCommand body) { Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body, context); + = runRwCommandWithResponseAsync(resourceGroupName, networkDeviceName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceRWCommandsInner.class, + CommonPostActionResponseForDeviceRWCommandsInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body) { - return this.beginUpgradeAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + SyncPoller, CommonPostActionResponseForDeviceRWCommandsInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body) { + Response response = runRwCommandWithResponse(resourceGroupName, networkDeviceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceRWCommandsInner.class, + CommonPostActionResponseForDeviceRWCommandsInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { - return this.beginUpgradeAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + SyncPoller, CommonPostActionResponseForDeviceRWCommandsInner> + beginRunRwCommand(String resourceGroupName, String networkDeviceName, DeviceRwCommand body, Context context) { + Response response = runRwCommandWithResponse(resourceGroupName, networkDeviceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceRWCommandsInner.class, + CommonPostActionResponseForDeviceRWCommandsInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkDeviceName, UpdateVersion body) { - return beginUpgradeAsync(resourceGroupName, networkDeviceName, body).last() + private Mono runRwCommandAsync(String resourceGroupName, + String networkDeviceName, DeviceRwCommand body) { + return beginRunRwCommandAsync(resourceGroupName, networkDeviceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param body Request the command. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkDeviceName, UpdateVersion body, Context context) { - return beginUpgradeAsync(resourceGroupName, networkDeviceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public CommonPostActionResponseForDeviceRWCommandsInner runRwCommand(String resourceGroupName, + String networkDeviceName, DeviceRwCommand body) { + return beginRunRwCommand(resourceGroupName, networkDeviceName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Run the RW Command on the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. - * @param body Request payload. + * @param body Request the command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body) { - return upgradeAsync(resourceGroupName, networkDeviceName, body).block(); + public CommonPostActionResponseForDeviceRWCommandsInner runRwCommand(String resourceGroupName, + String networkDeviceName, DeviceRwCommand body, Context context) { + return beginRunRwCommand(resourceGroupName, networkDeviceName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the Network Device. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the Network Device. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkDeviceName, - UpdateVersion body, Context context) { - return upgradeAsync(resourceGroupName, networkDeviceName, body, context).block(); + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + 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())); } /** @@ -2358,24 +2242,15 @@ public CommonPostActionResponseForStateUpdateInner upgrade(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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { 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())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2386,23 +2261,15 @@ 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2412,17 +2279,11 @@ 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation 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( @@ -2432,6 +2293,24 @@ private Mono> listBySubscriptionNextSinglePage .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkDevice list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2440,22 +2319,14 @@ 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 NetworkDevices along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkDevice list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkDevicesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java index 00f7fcdbf4ed..d0de599a3d63 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,9 +10,15 @@ 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.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceRWCommands; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevices; import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; @@ -24,10 +30,10 @@ public final class NetworkDevicesImpl implements NetworkDevices { private final NetworkDevicesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkDevicesImpl(NetworkDevicesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -169,6 +175,50 @@ public CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, } } + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body) { + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner inner + = this.serviceClient().runRoCommand(resourceGroupName, networkDeviceName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context) { + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner inner + = this.serviceClient().runRoCommand(resourceGroupName, networkDeviceName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceRWCommands runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body) { + CommonPostActionResponseForDeviceRWCommandsInner inner + = this.serviceClient().runRwCommand(resourceGroupName, networkDeviceName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceRWCommandsImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceRWCommands runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context) { + CommonPostActionResponseForDeviceRWCommandsInner inner + = this.serviceClient().runRwCommand(resourceGroupName, networkDeviceName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceRWCommandsImpl(inner, this.manager()); + } else { + return null; + } + } + public NetworkDevice getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -229,7 +279,7 @@ private NetworkDevicesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 29bf540f6060..b4a5e6269c97 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,23 +8,18 @@ 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.IsWorkloadManagementNetworkEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; 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.NetworkFabricControllerPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerProperties; import java.util.Collections; -import java.util.List; import java.util.Map; public final class NetworkFabricControllerImpl implements NetworkFabricController, NetworkFabricController.Definition, NetworkFabricController.Update { private NetworkFabricControllerInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -51,84 +46,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ControllerServices infrastructureServices() { - return this.innerModel().infrastructureServices(); - } - - public ControllerServices workloadServices() { - return this.innerModel().workloadServices(); - } - - public ManagedResourceGroupConfiguration managedResourceGroupConfiguration() { - return this.innerModel().managedResourceGroupConfiguration(); - } - - public List networkFabricIds() { - List inner = this.innerModel().networkFabricIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - 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(); - } - - public String ipv6AddressSpace() { - return this.innerModel().ipv6AddressSpace(); - } - - public NfcSku nfcSku() { - return this.innerModel().nfcSku(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List infrastructureExpressRouteConnections() { - List inner = this.innerModel().infrastructureExpressRouteConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List workloadExpressRouteConnections() { - List inner = this.innerModel().workloadExpressRouteConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public NetworkFabricControllerProperties properties() { + return this.innerModel().properties(); } - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -147,7 +70,7 @@ public NetworkFabricControllerInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -155,7 +78,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkFabricControllerName; - private NetworkFabricControllerPatch updateBody; + private NetworkFabricControllerPatch updateProperties; public NetworkFabricControllerImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -177,33 +100,33 @@ public NetworkFabricController create(Context context) { } NetworkFabricControllerImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkFabricControllerInner(); this.serviceManager = serviceManager; this.networkFabricControllerName = name; } public NetworkFabricControllerImpl update() { - this.updateBody = new NetworkFabricControllerPatch(); + this.updateProperties = new NetworkFabricControllerPatch(); return this; } public NetworkFabricController apply() { this.innerObject = serviceManager.serviceClient() .getNetworkFabricControllers() - .update(resourceGroupName, networkFabricControllerName, updateBody, Context.NONE); + .update(resourceGroupName, networkFabricControllerName, updateProperties, Context.NONE); return this; } public NetworkFabricController apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkFabricControllers() - .update(resourceGroupName, networkFabricControllerName, updateBody, context); + .update(resourceGroupName, networkFabricControllerName, updateProperties, context); return this; } NetworkFabricControllerImpl(NetworkFabricControllerInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -237,71 +160,27 @@ public NetworkFabricControllerImpl withRegion(String location) { return this; } - public NetworkFabricControllerImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public NetworkFabricControllerImpl - withManagedResourceGroupConfiguration(ManagedResourceGroupConfiguration managedResourceGroupConfiguration) { - this.innerModel().withManagedResourceGroupConfiguration(managedResourceGroupConfiguration); - return this; - } - - public NetworkFabricControllerImpl - withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled) { - this.innerModel().withIsWorkloadManagementNetworkEnabled(isWorkloadManagementNetworkEnabled); + public NetworkFabricControllerImpl withProperties(NetworkFabricControllerProperties properties) { + this.innerModel().withProperties(properties); return this; } - public NetworkFabricControllerImpl withIpv4AddressSpace(String ipv4AddressSpace) { - this.innerModel().withIpv4AddressSpace(ipv4AddressSpace); - return this; - } - - public NetworkFabricControllerImpl withIpv6AddressSpace(String ipv6AddressSpace) { - this.innerModel().withIpv6AddressSpace(ipv6AddressSpace); - return this; - } - - public NetworkFabricControllerImpl withNfcSku(NfcSku nfcSku) { - this.innerModel().withNfcSku(nfcSku); - return this; - } - - public NetworkFabricControllerImpl withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections) { - if (isInCreateMode()) { - this.innerModel().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); - return this; - } else { - this.updateBody.withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); - return this; - } - } - - public NetworkFabricControllerImpl - withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { + public NetworkFabricControllerImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withWorkloadExpressRouteConnections(workloadExpressRouteConnections); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withWorkloadExpressRouteConnections(workloadExpressRouteConnections); + this.updateProperties.withTags(tags); return this; } } - public NetworkFabricControllerImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public NetworkFabricControllerImpl withProperties(NetworkFabricControllerPatchProperties properties) { + this.updateProperties.withProperties(properties); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 2e3260f6079f..8bee594c97fe 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.NetworkFabricControllersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricControllerListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllersListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,110 +53,176 @@ public final class NetworkFabricControllersClientImpl implements NetworkFabricCo /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkFabricControllersClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkFabricControllersClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkFabricControllersClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkFabricControllersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkFabricControllers to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkFabricControllers to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkFabricControllers") public interface NetworkFabricControllersService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricControllerName") String networkFabricControllerName, - @BodyParam("application/json") NetworkFabricControllerInner body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricControllerName") String networkFabricControllerName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricControllerName") String networkFabricControllerName, - @BodyParam("application/json") NetworkFabricControllerPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkFabricControllerPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") @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("networkFabricControllerName") String networkFabricControllerName, - @HeaderParam("Accept") String accept, Context context); + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricControllerName") String networkFabricControllerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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. @@ -163,393 +230,255 @@ Mono> listBySubscriptionNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerInner 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 (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkFabricControllerName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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 Fabric Controller resource definition along with {@link Response} 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>> createWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerInner 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 (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName 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(), networkFabricControllerName, body, accept, context); - } - - /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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 Fabric Controller resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricControllerName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String networkFabricControllerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricControllerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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 Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricControllerName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkFabricControllerName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, accept, context); } /** - * Create Network fabric controller. - * - * Creates a Network Fabric Controller. + * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @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 Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricControllerInner> - beginCreate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body) { - return this.beginCreateAsync(resourceGroupName, networkFabricControllerName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, + String networkFabricControllerName) { + return getByResourceGroupWithResponse(resourceGroupName, networkFabricControllerName, Context.NONE).getValue(); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricControllerInner> beginCreate( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner body, - Context context) { - return this.beginCreateAsync(resourceGroupName, networkFabricControllerName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkFabricControllerName, NetworkFabricControllerInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. + * @param resource 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 Fabric Controller resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body) { - return beginCreateAsync(resourceGroupName, networkFabricControllerName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + resource, Context.NONE); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. + * @param resource 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 Fabric Controller resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkFabricControllerName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + resource, context); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. + * @param resource 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 Fabric Controller resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body) { - return createAsync(resourceGroupName, networkFabricControllerName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkFabricControllerName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, + this.client.getContext()); } /** - * Create Network fabric controller. - * * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 Fabric Controller resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerInner body, Context context) { - return createAsync(resourceGroupName, networkFabricControllerName, body, context).block(); - } - - /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricControllerInner> beginCreate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner resource) { + Response response = createWithResponse(resourceGroupName, networkFabricControllerName, resource); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, Context.NONE); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param resource 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 Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricControllerInner> beginCreate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerInner resource, + Context context) { + Response response + = createWithResponse(resourceGroupName, networkFabricControllerName, resource, context); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, context); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param resource 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 Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String networkFabricControllerName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricControllerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource) { + return beginCreateAsync(resourceGroupName, networkFabricControllerName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. + * @param resource 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 Fabric Controller resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkFabricControllerName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricControllerName, context).block(); + public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource) { + return beginCreate(resourceGroupName, networkFabricControllerName, resource).getFinalResult(); } /** - * Gets a Network Fabric Controller. - * - * Shows the provisioning status of Network Fabric Controller. + * Creates a Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param resource 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 Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, - String networkFabricControllerName) { - return getByResourceGroupWithResponse(resourceGroupName, networkFabricControllerName, Context.NONE).getValue(); + public NetworkFabricControllerInner create(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerInner resource, Context context) { + return beginCreate(resourceGroupName, networkFabricControllerName, resource, context).getFinalResult(); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -558,112 +487,65 @@ public NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerPatch 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 (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName 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(); - } + String networkFabricControllerName, NetworkFabricControllerPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. - * @param context The context to associate with this operation. + * @param properties Network Fabric Controller 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 Fabric Controller resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String networkFabricControllerName, NetworkFabricControllerPatch 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 (networkFabricControllerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter networkFabricControllerName 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(); - } + private Response updateWithResponse(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + properties, Context.NONE); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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 Fabric Controller resource definition. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricControllerInner> beginUpdateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricControllerName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricControllerName, + NetworkFabricControllerPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, contentType, accept, + properties, context); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. - * @param context The context to associate with this operation. + * @param properties Network Fabric Controller 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. @@ -671,43 +553,39 @@ private PollerFlux, NetworkFabricContro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricControllerInner> beginUpdateAsync( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricControllerName, body, context); + = updateWithResponseAsync(resourceGroupName, networkFabricControllerName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, - context); + this.client.getContext()); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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 Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricControllerInner> - beginUpdate(String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkFabricControllerName, body).getSyncPoller(); + public SyncPoller, NetworkFabricControllerInner> beginUpdate( + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch properties) { + Response response = updateWithResponse(resourceGroupName, networkFabricControllerName, properties); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, Context.NONE); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -716,19 +594,20 @@ private PollerFlux, NetworkFabricContro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricControllerInner> beginUpdate( - String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch body, + String resourceGroupName, String networkFabricControllerName, NetworkFabricControllerPatch properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkFabricControllerName, body, context).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, networkFabricControllerName, properties, context); + return this.client.getLroResult(response, + NetworkFabricControllerInner.class, NetworkFabricControllerInner.class, context); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -736,40 +615,17 @@ public SyncPoller, NetworkFabricControl */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body) { - return beginUpdateAsync(resourceGroupName, networkFabricControllerName, body).last() + NetworkFabricControllerPatch properties) { + return beginUpdateAsync(resourceGroupName, networkFabricControllerName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller 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 Fabric Controller resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkFabricControllerName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Fabric Controller. - * - * Updates are currently not supported for the Network Fabric Controller resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -777,18 +633,16 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner update(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body) { - return updateAsync(resourceGroupName, networkFabricControllerName, body).block(); + NetworkFabricControllerPatch properties) { + return beginUpdate(resourceGroupName, networkFabricControllerName, properties).getFinalResult(); } /** - * Updates a Network Fabric Controller. - * * Updates are currently not supported for the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param body Network Fabric Controller properties to update. + * @param properties Network Fabric Controller 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. @@ -797,13 +651,11 @@ public NetworkFabricControllerInner update(String resourceGroupName, String netw */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner update(String resourceGroupName, String networkFabricControllerName, - NetworkFabricControllerPatch body, Context context) { - return updateAsync(resourceGroupName, networkFabricControllerName, body, context).block(); + NetworkFabricControllerPatch properties, Context context) { + return beginUpdate(resourceGroupName, networkFabricControllerName, properties, context).getFinalResult(); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -816,95 +668,51 @@ public NetworkFabricControllerInner update(String resourceGroupName, String netw @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricControllerName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricControllerName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkFabricControllerName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, Context.NONE); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String networkFabricControllerName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricControllerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricControllerName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricControllerName, context); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -912,17 +720,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String networkFabricControllerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkFabricControllerName, context); + String networkFabricControllerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricControllerName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -935,12 +739,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricControllerName) { - return this.beginDeleteAsync(resourceGroupName, networkFabricControllerName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkFabricControllerName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -954,12 +757,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricControllerName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkFabricControllerName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkFabricControllerName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -976,27 +778,6 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricCon } /** - * Deletes a Network Fabric Controller. - * - * Deletes the Network Fabric Controller resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the Network Fabric Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 networkFabricControllerName, Context context) { - return beginDeleteAsync(resourceGroupName, networkFabricControllerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1007,12 +788,10 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricCon */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricControllerName) { - deleteAsync(resourceGroupName, networkFabricControllerName).block(); + beginDelete(resourceGroupName, networkFabricControllerName).getFinalResult(); } /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1024,102 +803,65 @@ public void delete(String resourceGroupName, String networkFabricControllerName) */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricControllerName, Context context) { - deleteAsync(resourceGroupName, networkFabricControllerName, context).block(); + beginDelete(resourceGroupName, networkFabricControllerName, context).getFinalResult(); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the 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 Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return the response of a NetworkFabricController list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1127,34 +869,35 @@ 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 Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return the response of a NetworkFabricController list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1162,133 +905,108 @@ 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return the response of a NetworkFabricController list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedFlux}. + * @return the response of a NetworkFabricController list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1298,18 +1016,11 @@ 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation 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( @@ -1319,6 +1030,24 @@ private Mono> listByResourceGroupNex .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkFabricController list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1327,24 +1056,16 @@ 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1354,18 +1075,11 @@ 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation 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( @@ -1375,6 +1089,24 @@ private Mono> listBySubscriptionNext .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkFabricController list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1383,23 +1115,15 @@ 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 Network Fabric Controllers along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkFabricController list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private PagedResponse listBySubscriptionNextSinglePage(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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkFabricControllersImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java index 4112f9a66283..f539dec46541 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class NetworkFabricControllersImpl implements NetworkFabricControll private final NetworkFabricControllersClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkFabricControllersImpl(NetworkFabricControllersClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -139,7 +139,7 @@ private NetworkFabricControllersClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 5c20efd96917..b0ef9835dcf7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,29 +8,32 @@ 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.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponse; 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.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; 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.NetworkFabricPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponse; import java.util.Collections; -import java.util.List; import java.util.Map; public final class NetworkFabricImpl implements NetworkFabric, NetworkFabric.Definition, NetworkFabric.Update { private NetworkFabricInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -57,100 +60,16 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String networkFabricSku() { - return this.innerModel().networkFabricSku(); - } - - 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(); - } - - public int serverCountPerRack() { - return this.innerModel().serverCountPerRack(); - } - - public String ipv4Prefix() { - return this.innerModel().ipv4Prefix(); - } - - public String ipv6Prefix() { - return this.innerModel().ipv6Prefix(); + public NetworkFabricProperties properties() { + return this.innerModel().properties(); } - public long fabricAsn() { - return this.innerModel().fabricAsn(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } - public TerminalServerConfiguration terminalServerConfiguration() { - return this.innerModel().terminalServerConfiguration(); - } - - public ManagementNetworkConfigurationProperties managementNetworkConfiguration() { - return this.innerModel().managementNetworkConfiguration(); - } - - public List racks() { - List inner = this.innerModel().racks(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List l2IsolationDomains() { - List inner = this.innerModel().l2IsolationDomains(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List l3IsolationDomains() { - List inner = this.innerModel().l3IsolationDomains(); - 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 String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -169,7 +88,7 @@ public NetworkFabricInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -177,7 +96,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkFabricName; - private NetworkFabricPatch updateBody; + private NetworkFabricPatch updateProperties; public NetworkFabricImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -198,34 +117,33 @@ public NetworkFabric create(Context context) { return this; } - NetworkFabricImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NetworkFabricImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkFabricInner(); this.serviceManager = serviceManager; this.networkFabricName = name; } public NetworkFabricImpl update() { - this.updateBody = new NetworkFabricPatch(); + this.updateProperties = new NetworkFabricPatch(); return this; } public NetworkFabric apply() { this.innerObject = serviceManager.serviceClient() .getNetworkFabrics() - .update(resourceGroupName, networkFabricName, updateBody, Context.NONE); + .update(resourceGroupName, networkFabricName, updateProperties, Context.NONE); return this; } public NetworkFabric apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkFabrics() - .update(resourceGroupName, networkFabricName, updateBody, context); + .update(resourceGroupName, networkFabricName, updateProperties, context); return this; } NetworkFabricImpl(NetworkFabricInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -329,125 +247,87 @@ public CommonPostActionResponseForStateUpdate commitConfiguration(Context contex return serviceManager.networkFabrics().commitConfiguration(resourceGroupName, networkFabricName, context); } - public NetworkFabricImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; + public CommitBatchStatusResponse commitBatchStatus(CommitBatchStatusRequest body) { + return serviceManager.networkFabrics().commitBatchStatus(resourceGroupName, networkFabricName, body); } - public NetworkFabricImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; + public CommitBatchStatusResponse commitBatchStatus(CommitBatchStatusRequest body, Context context) { + return serviceManager.networkFabrics().commitBatchStatus(resourceGroupName, networkFabricName, body, context); } - public NetworkFabricImpl withNetworkFabricSku(String networkFabricSku) { - this.innerModel().withNetworkFabricSku(networkFabricSku); - return this; + public DiscardCommitBatchResponse discardCommitBatch(DiscardCommitBatchRequest body) { + return serviceManager.networkFabrics().discardCommitBatch(resourceGroupName, networkFabricName, body); } - public NetworkFabricImpl withNetworkFabricControllerId(String networkFabricControllerId) { - this.innerModel().withNetworkFabricControllerId(networkFabricControllerId); - return this; + public DiscardCommitBatchResponse discardCommitBatch(DiscardCommitBatchRequest body, Context context) { + return serviceManager.networkFabrics().discardCommitBatch(resourceGroupName, networkFabricName, body, context); } - public NetworkFabricImpl withServerCountPerRack(int serverCountPerRack) { - this.innerModel().withServerCountPerRack(serverCountPerRack); - return this; + public CommonPostActionResponseForStateUpdate lockFabric(NetworkFabricLockRequest body) { + return serviceManager.networkFabrics().lockFabric(resourceGroupName, networkFabricName, body); } - public NetworkFabricImpl withIpv4Prefix(String ipv4Prefix) { - if (isInCreateMode()) { - this.innerModel().withIpv4Prefix(ipv4Prefix); - return this; - } else { - this.updateBody.withIpv4Prefix(ipv4Prefix); - return this; - } + public CommonPostActionResponseForStateUpdate lockFabric(NetworkFabricLockRequest body, Context context) { + return serviceManager.networkFabrics().lockFabric(resourceGroupName, networkFabricName, body, context); } - public NetworkFabricImpl withFabricAsn(long fabricAsn) { - this.innerModel().withFabricAsn(fabricAsn); - return this; + public ViewDeviceConfigurationResponse viewDeviceConfiguration() { + return serviceManager.networkFabrics().viewDeviceConfiguration(resourceGroupName, networkFabricName); } - public NetworkFabricImpl withTerminalServerConfiguration(TerminalServerConfiguration terminalServerConfiguration) { - this.innerModel().withTerminalServerConfiguration(terminalServerConfiguration); - return this; + public ViewDeviceConfigurationResponse viewDeviceConfiguration(Context context) { + return serviceManager.networkFabrics().viewDeviceConfiguration(resourceGroupName, networkFabricName, context); } - public NetworkFabricImpl - withManagementNetworkConfiguration(ManagementNetworkConfigurationProperties managementNetworkConfiguration) { - this.innerModel().withManagementNetworkConfiguration(managementNetworkConfiguration); - return this; + public ArmConfigurationDiffResponse armConfigurationDiff() { + return serviceManager.networkFabrics().armConfigurationDiff(resourceGroupName, networkFabricName); } - public NetworkFabricImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } + public ArmConfigurationDiffResponse armConfigurationDiff(Context context) { + return serviceManager.networkFabrics().armConfigurationDiff(resourceGroupName, networkFabricName, context); } - public NetworkFabricImpl withFabricVersion(String fabricVersion) { - this.innerModel().withFabricVersion(fabricVersion); + public NetworkFabricImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); return this; } - public NetworkFabricImpl withRackCount(Integer rackCount) { - if (isInCreateMode()) { - this.innerModel().withRackCount(rackCount); - return this; - } else { - this.updateBody.withRackCount(rackCount); - return this; - } + public NetworkFabricImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; } - public NetworkFabricImpl withIpv6Prefix(String ipv6Prefix) { - if (isInCreateMode()) { - this.innerModel().withIpv6Prefix(ipv6Prefix); - return this; - } else { - this.updateBody.withIpv6Prefix(ipv6Prefix); - return this; - } + public NetworkFabricImpl withProperties(NetworkFabricProperties properties) { + this.innerModel().withProperties(properties); + return this; } - public NetworkFabricImpl withAnnotation(String annotation) { + public NetworkFabricImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withAnnotation(annotation); + this.updateProperties.withTags(tags); return this; } } - public NetworkFabricImpl withServerCountPerRack(Integer serverCountPerRack) { - this.updateBody.withServerCountPerRack(serverCountPerRack); - return this; - } - - public NetworkFabricImpl withFabricAsn(Long fabricAsn) { - this.updateBody.withFabricAsn(fabricAsn); + public NetworkFabricImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public NetworkFabricImpl withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { - this.updateBody.withTerminalServerConfiguration(terminalServerConfiguration); + public NetworkFabricImpl withProperties(NetworkFabricPatchProperties properties) { + this.updateProperties.withProperties(properties); return this; } - public NetworkFabricImpl withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { - this.updateBody.withManagementNetworkConfiguration(managementNetworkConfiguration); + public NetworkFabricImpl withIdentity(ManagedServiceIdentityPatch identity) { + this.updateProperties.withIdentity(identity); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 a96b43e134e5..2cefdee80b8a 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 @@ -1,24 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkuProperties; public final class NetworkFabricSkuImpl implements NetworkFabricSku { private NetworkFabricSkuInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; NetworkFabricSkuImpl(NetworkFabricSkuInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -35,44 +32,19 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public FabricSkuType typePropertiesType() { - return this.innerModel().typePropertiesType(); - } - - public Integer maxComputeRacks() { - return this.innerModel().maxComputeRacks(); - } - - public Integer maximumServerCount() { - return this.innerModel().maximumServerCount(); - } - - public List supportedVersions() { - List inner = this.innerModel().supportedVersions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public NetworkFabricSkuProperties properties() { + return this.innerModel().properties(); } - public String details() { - return this.innerModel().details(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public SystemData systemData() { + return this.innerModel().systemData(); } public NetworkFabricSkuInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } 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 38087a21f521..402926a7f7d1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkusListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkuListResult; import reactor.core.publisher.Mono; /** @@ -42,55 +42,78 @@ public final class NetworkFabricSkusClientImpl implements NetworkFabricSkusClien /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkFabricSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkFabricSkusClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkFabricSkusClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkFabricSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkFabricSkus to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkFabricSkus to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkFabricSkus") public interface NetworkFabricSkusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("networkFabricSkuName") String networkFabricSkuName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("networkFabricSkuName") String networkFabricSkuName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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("endpoint") 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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -102,61 +125,14 @@ Mono> listBySubscriptionNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String networkFabricSkuName) { - 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 (networkFabricSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricSkuName 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(), networkFabricSkuName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), networkFabricSkuName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Fabric Sku. - * - * Implements Network Fabric SKU GET method. - * - * @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 Network Fabric SKU resource definition along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String networkFabricSkuName, 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 (networkFabricSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkFabricSkuName 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(), - networkFabricSkuName, accept, context); - } - - /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -171,8 +147,6 @@ private Mono getAsync(String networkFabricSkuName) { } /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -184,12 +158,12 @@ private Mono getAsync(String networkFabricSkuName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String networkFabricSkuName, Context context) { - return getWithResponseAsync(networkFabricSkuName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + networkFabricSkuName, accept, context); } /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -204,123 +178,96 @@ public NetworkFabricSkuInner get(String networkFabricSkuName) { } /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabricSku list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 Fabric SKUs by subscription. - * * 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 Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabricSku list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedFlux}. + * @return the response of a NetworkFabricSku list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedFlux}. + * @return the response of a NetworkFabricSku list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricSku list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricSku list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -330,17 +277,11 @@ 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 Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabricSku list operation 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( @@ -350,6 +291,24 @@ private Mono> listBySubscriptionNextSingleP .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkFabricSku list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -358,22 +317,14 @@ 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 Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabricSku list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkFabricSkusImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java index 0eeacb38d226..3e93e02946d6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class NetworkFabricSkusImpl implements NetworkFabricSkus { private final NetworkFabricSkusClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkFabricSkusImpl(NetworkFabricSkusClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -60,7 +60,7 @@ private NetworkFabricSkusClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } 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 ad4a4b4333cf..4137ad1146fd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,17 +29,25 @@ 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.BinaryData; 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.NetworkFabricsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricListResult; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; 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.UpgradeNetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; @@ -59,92 +67,155 @@ public final class NetworkFabricsClientImpl implements NetworkFabricsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkFabricsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkFabricsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkFabricsClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkFabricsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkFabrics to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkFabrics to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkFabrics") public interface NetworkFabricsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") NetworkFabricInner body, @HeaderParam("Accept") String accept, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricInner resource, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") @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, - @BodyParam("application/json") NetworkFabricPatch body, @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") @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("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> provision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> provision(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/provision") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response provisionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @@ -152,73 +223,140 @@ Mono>> provision(@HostParam("$host") String endpoint, @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deprovision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono>> deprovision(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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}/deprovision") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deprovisionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + @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") UpgradeNetworkFabricProperties body, @HeaderParam("Accept") String accept, + Mono>> upgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpgradeNetworkFabricProperties body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response upgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpgradeNetworkFabricProperties body, 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, + Mono>> refreshConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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}/refreshConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateWorkloadManagementBfdConfiguration(@HostParam("$host") String endpoint, + Mono>> updateWorkloadManagementBfdConfiguration( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @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, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateWorkloadManagementBfdConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, 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, + Mono>> updateInfraManagementBfdConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateInfraManagementBfdConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, 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, + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateConfigurationProperties body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateConfigurationProperties body, 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, + Mono>> getTopology(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/getTopology") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getTopologySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @@ -226,9 +364,119 @@ Mono>> getTopology(@HostParam("$host") String endpoint @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, + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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) + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitBatchStatus") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commitBatchStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CommitBatchStatusRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitBatchStatus") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response commitBatchStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CommitBatchStatusRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/discardCommitBatch") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> discardCommitBatch(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DiscardCommitBatchRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/discardCommitBatch") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response discardCommitBatchSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DiscardCommitBatchRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/lockFabric") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> lockFabric(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricLockRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/lockFabric") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response lockFabricSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkFabricLockRequest body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/viewDeviceConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> viewDeviceConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/viewDeviceConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response viewDeviceConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/armConfigurationDiff") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> armConfigurationDiff(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/armConfigurationDiff") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response armConfigurationDiffSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, Context context); @@ -236,315 +484,1015 @@ Mono>> commitConfiguration(@HostParam("$host") String @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get Network Fabric resource details. + * + * @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 network Fabric resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Network Fabric resource details. + * + * @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 network Fabric resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkFabricName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Network Fabric resource details. + * + * @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 network Fabric resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkFabricName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + } + + /** + * Get Network Fabric resource details. + * + * @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 network Fabric resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName) { + return getByResourceGroupWithResponse(resourceGroupName, networkFabricName, Context.NONE).getValue(); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, + NetworkFabricInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, resource, + Context.NONE); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, resource, + context); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkFabricInner> beginCreateAsync(String resourceGroupName, + String networkFabricName, NetworkFabricInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkFabricName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, + String networkFabricName, NetworkFabricInner resource) { + Response response = createWithResponse(resourceGroupName, networkFabricName, resource); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, Context.NONE); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, + String networkFabricName, NetworkFabricInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkFabricName, resource, context); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, context); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String networkFabricName, + NetworkFabricInner resource) { + return beginCreateAsync(resourceGroupName, networkFabricName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner resource) { + return beginCreate(resourceGroupName, networkFabricName, resource).getFinalResult(); + } + + /** + * Create Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param resource 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 Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner resource, + Context context) { + return beginCreate(resourceGroupName, networkFabricName, resource, context).getFinalResult(); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 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, + NetworkFabricPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 Network Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, properties, + Context.NONE); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 Network Fabric resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, properties, + context); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkFabricInner> beginUpdateAsync(String resourceGroupName, + String networkFabricName, NetworkFabricPatch properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkFabricName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, + String networkFabricName, NetworkFabricPatch properties) { + Response response = updateWithResponse(resourceGroupName, networkFabricName, properties); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, Context.NONE); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 the Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, + String networkFabricName, NetworkFabricPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkFabricName, properties, context); + return this.client.getLroResult(response, NetworkFabricInner.class, + NetworkFabricInner.class, context); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 Network Fabric resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String networkFabricName, + NetworkFabricPatch properties) { + return beginUpdateAsync(resourceGroupName, networkFabricName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner update(String resourceGroupName, String networkFabricName, + NetworkFabricPatch properties) { + return beginUpdate(resourceGroupName, networkFabricName, properties).getFinalResult(); + } + + /** + * Update certain properties of the Network Fabric resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param properties 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 Network Fabric resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch properties, + Context context) { + return beginUpdate(resourceGroupName, networkFabricName, properties, context).getFinalResult(); + } + + /** + * Delete Network Fabric resource. + * + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkFabricName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Network Fabric resource. + * + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, Context.NONE); + } + + /** + * Delete Network Fabric resource. + * + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, context); + } + + /** + * Delete Network Fabric resource. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Network Fabric resource. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName) { + Response response = deleteWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete Network Fabric resource. + * + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete Network Fabric resource. + * + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkFabricName) { + return beginDeleteAsync(resourceGroupName, networkFabricName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Network Fabric resource. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkFabricName) { + beginDelete(resourceGroupName, networkFabricName).getFinalResult(); + } + + /** + * Delete Network Fabric resource. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkFabricName, Context context) { + beginDelete(resourceGroupName, networkFabricName, context).getFinalResult(); + } + + /** + * List all the Network Fabric 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 the response of a NetworkFabric list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 the Network Fabric 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 the response of a NetworkFabric list operation 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 the Network Fabric 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 the response of a NetworkFabric list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric 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 the response of a NetworkFabric list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric 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 the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List all the Network Fabric 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 the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * 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 the response of a NetworkFabric list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 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 the response of a NetworkFabric list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * 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 the response of a NetworkFabric list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the Network Fabric 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 the response of a NetworkFabric list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * 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 the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all the Network Fabric 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 the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner 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(); - } + private Mono>> provisionWithResponseAsync(String resourceGroupName, + String networkFabricName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context)) + .withContext(context -> service.provision(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner 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(); - } + private Response provisionWithResponse(String resourceGroupName, String networkFabricName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, body, accept, context); + return service.provisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 the Network Fabric resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginCreateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response provisionWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.provisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 the Network Fabric resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginCreateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, context); + private + PollerFlux, CommonPostActionResponseForDeviceUpdateInner> + beginProvisionAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = provisionWithResponseAsync(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 the Network Fabric resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, - String networkFabricName, NetworkFabricInner body) { - return this.beginCreateAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + public + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginProvision(String resourceGroupName, String networkFabricName) { + Response response = provisionWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 the Network Fabric resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginCreate(String resourceGroupName, - String networkFabricName, NetworkFabricInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); + public + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginProvision(String resourceGroupName, String networkFabricName, Context context) { + Response response = provisionWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, context); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 Network Fabric resource definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner body) { - return beginCreateAsync(resourceGroupName, networkFabricName, body).last() + private Mono provisionAsync(String resourceGroupName, + String networkFabricName) { + return beginProvisionAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 Network Fabric resource definition on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, - NetworkFabricInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkFabricName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName) { + return beginProvision(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 Network Fabric resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body) { - return createAsync(resourceGroupName, networkFabricName, body).block(); + public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName, + Context context) { + return beginProvision(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Create Network Fabric. - * - * Create Network Fabric resource. + * 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 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 Network Fabric resource definition. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body, - Context context) { - return createAsync(resourceGroupName, networkFabricName, body, context).block(); + private Mono>> deprovisionWithResponseAsync(String resourceGroupName, + String networkFabricName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deprovision(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * 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 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 network Fabric resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.")); - } + private Response deprovisionWithResponse(String resourceGroupName, String networkFabricName) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.deprovisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * 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 Network Fabric. @@ -552,55 +1500,60 @@ private Mono> getByResourceGroupWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Fabric resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.")); - } + private Response deprovisionWithResponse(String resourceGroupName, String networkFabricName, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); + return service.deprovisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * 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 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 network Fabric resource details on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkFabricName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovisionAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = deprovisionWithResponseAsync(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); } /** - * Gets a Network Fabric. + * Deprovisions the underlying resources in the given Network Fabric instance. * - * Get Network Fabric resource details. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovision(String resourceGroupName, String networkFabricName) { + Response response = deprovisionWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); + } + + /** + * 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 Network Fabric. @@ -608,125 +1561,92 @@ private Mono getByResourceGroupAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Fabric resource details along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkFabricName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkFabricName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovision(String resourceGroupName, String networkFabricName, Context context) { + Response response = deprovisionWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, context); } /** - * Gets a Network Fabric. - * - * Get Network Fabric resource details. + * 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 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 network Fabric resource details. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner getByResourceGroup(String resourceGroupName, String networkFabricName) { - return getByResourceGroupWithResponse(resourceGroupName, networkFabricName, Context.NONE).getValue(); + private Mono deprovisionAsync(String resourceGroupName, + String networkFabricName) { + return beginDeprovisionAsync(resourceGroupName, networkFabricName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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 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 Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch 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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, + String networkFabricName) { + return beginDeprovision(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Updates a Network Fabric. + * Deprovisions the underlying resources in the given Network Fabric instance. * - * Update certain properties of the Network Fabric resource. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName, + Context context) { + return beginDeprovision(resourceGroupName, networkFabricName, context).getFinalResult(); + } + + /** + * 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 Network Fabric resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch 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(); - } + private Mono>> upgradeWithResponseAsync(String resourceGroupName, + String networkFabricName, UpgradeNetworkFabricProperties body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, body, accept, context); + return FluxUtil.withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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. @@ -734,20 +1654,20 @@ private Mono>> updateWithResponseAsync(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 the {@link PollerFlux} for polling of the Network Fabric resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginUpdateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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. @@ -756,22 +1676,19 @@ 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 Network Fabric resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkFabricInner> beginUpdateAsync(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkFabricInner.class, NetworkFabricInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response upgradeWithResponse(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.upgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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. @@ -779,79 +1696,85 @@ 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 Network Fabric resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + private + PollerFlux, CommonPostActionResponseForStateUpdateInner> + beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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 the Network Fabric resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkFabricInner> beginUpdate(String resourceGroupName, - String networkFabricName, NetworkFabricPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { + Response response = upgradeWithResponse(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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 Network Fabric resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch body) { - return beginUpdateAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body, + Context context) { + Response response = upgradeWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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 Network Fabric resource definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricName, - NetworkFabricPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkFabricName, body, context).last() + private Mono upgradeAsync(String resourceGroupName, + String networkFabricName, UpgradeNetworkFabricProperties body) { + return beginUpgradeAsync(resourceGroupName, networkFabricName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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. @@ -859,17 +1782,16 @@ private Mono updateAsync(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 Network Fabric resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { - return updateAsync(resourceGroupName, networkFabricName, body).block(); + public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body) { + return beginUpgrade(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Updates a Network Fabric. - * - * Update certain properties of the Network Fabric resource. + * 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. @@ -878,135 +1800,94 @@ public NetworkFabricInner update(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 Network Fabric resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body, - Context context) { - return updateAsync(resourceGroupName, networkFabricName, body, context).block(); + public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, + UpgradeNetworkFabricProperties body, Context context) { + return beginUpgrade(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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 Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, + 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.refreshConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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 Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.")); - } + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkFabricName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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 long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshConfigurationWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.refreshConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFabricName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + private + PollerFlux, 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()); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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. @@ -1016,14 +1897,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName).getSyncPoller(); + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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. @@ -1034,68 +1919,51 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); - } - - /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. - * - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkFabricName) { - return beginDeleteAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName, Context context) { + Response response = refreshConfigurationWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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 A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String networkFabricName, Context context) { - return beginDeleteAsync(resourceGroupName, networkFabricName, context).last() + private Mono refreshConfigurationAsync(String resourceGroupName, + String networkFabricName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkFabricName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String networkFabricName) { - deleteAsync(resourceGroupName, networkFabricName).block(); + public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + String networkFabricName) { + return beginRefreshConfiguration(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Deletes a Network Fabric. - * - * Delete Network Fabric resource. + * 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. @@ -1103,1165 +1971,858 @@ public void delete(String resourceGroupName, String networkFabricName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String networkFabricName, Context context) { - deleteAsync(resourceGroupName, networkFabricName, context).block(); + public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + String networkFabricName, Context context) { + return beginRefreshConfiguration(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * 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 list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} 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.")); - } + private Mono>> updateWorkloadManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.updateWorkloadManagementBfdConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * 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 context The context to associate with this operation. + * @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 list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response updateWorkloadManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; 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 Fabrics by resource group. - * - * List all the Network Fabric 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 Network Fabrics as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + return service.updateWorkloadManagementBfdConfigurationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, Context.NONE); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * 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 list of Network Fabrics 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 Fabrics by resource group. - * - * List all the Network Fabric 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWorkloadManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateWorkloadManagementBfdConfigurationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context); } /** - * List Network Fabrics by resource group. - * - * List all the Network Fabric resources in the given resource group. + * 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 context The context to associate with this operation. + * @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 list of Network Fabrics 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 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 Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, 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()); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * - * @param context The context to associate with this operation. + * @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 list of Network Fabrics 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> 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)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { + Response response + = updateWorkloadManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * 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 list of Network Fabrics as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body, Context context) { + Response response + = updateWorkloadManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. * - * @param context The context to associate with this operation. + * @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 list of Network Fabrics as paginated response with {@link PagedFlux}. + * @return the response body on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateWorkloadManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * 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 list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body) + .getFinalResult(); } /** - * List Network Fabrics by subscription. - * - * List all the Network Fabric resources in the given subscription. + * 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 list of Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return beginUpdateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context) + .getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionWithResponseAsync(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.")); - } + private Mono>> updateInfraManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.provision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.updateInfraManagementBfdConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 context The context to associate with this operation. + * @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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionWithResponseAsync(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.")); - } + private Response updateInfraManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.provision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); + return service.updateInfraManagementBfdConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginProvisionAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = provisionWithResponseAsync(resourceGroupName, networkFabricName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateInfraManagementBfdConfigurationWithResponse(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateInfraManagementBfdConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 context The context to associate with this operation. + * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginProvisionAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + PollerFlux, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfigurationAsync(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { Mono>> mono - = provisionWithResponseAsync(resourceGroupName, networkFabricName, context); + = updateInfraManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginProvision(String resourceGroupName, String networkFabricName) { - return this.beginProvisionAsync(resourceGroupName, networkFabricName).getSyncPoller(); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body) { + Response response + = updateInfraManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginProvision(String resourceGroupName, String networkFabricName, Context context) { - return this.beginProvisionAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionAsync(String resourceGroupName, - String networkFabricName) { - return beginProvisionAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, + UpdateAdministrativeState body, Context context) { + Response response + = updateInfraManagementBfdConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 context The context to associate with this operation. + * @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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginProvisionAsync(resourceGroupName, networkFabricName, context).last() + 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. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName) { - return provisionAsync(resourceGroupName, networkFabricName).block(); + public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Provisions the underlying resources in the given Network Fabric instance. + * 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 device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName, - Context context) { - return provisionAsync(resourceGroupName, networkFabricName, context).block(); + public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, + String networkFabricName, UpdateAdministrativeState body, Context context) { + return beginUpdateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context) + .getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deprovisionWithResponseAsync(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.")); - } + private Mono>> validateConfigurationWithResponseAsync(String resourceGroupName, + String networkFabricName, ValidateConfigurationProperties body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.deprovision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.validateConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 context The context to associate with this operation. + * @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 common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deprovisionWithResponseAsync(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.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deprovision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, accept, context); - } - - /** - * Implements the operation to the underlying resources. - * - * 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 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 device updates. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovisionAsync(String resourceGroupName, String networkFabricName) { - Mono>> mono = deprovisionWithResponseAsync(resourceGroupName, networkFabricName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 common response for device updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 common response for device updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovision(String resourceGroupName, String networkFabricName) { - return this.beginDeprovisionAsync(resourceGroupName, networkFabricName).getSyncPoller(); + 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. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 context The context to associate with this operation. + * @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 common response for device updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForDeviceUpdateInner> - beginDeprovision(String resourceGroupName, String networkFabricName, Context context) { - return this.beginDeprovisionAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + Response response = validateConfigurationWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 common response for device updates on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deprovisionAsync(String resourceGroupName, - String networkFabricName) { - return beginDeprovisionAsync(resourceGroupName, networkFabricName).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body, Context context) { + Response response + = validateConfigurationWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 context The context to associate with this operation. + * @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 common response for device updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deprovisionAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginDeprovisionAsync(resourceGroupName, networkFabricName, context).last() + 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. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, - String networkFabricName) { - return deprovisionAsync(resourceGroupName, networkFabricName).block(); + public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body) { + return beginValidateConfiguration(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Deprovisions the underlying resources in the given Network Fabric instance. + * 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 common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName, - Context context) { - return deprovisionAsync(resourceGroupName, networkFabricName, context).block(); + public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, + ValidateConfigurationProperties body, Context context) { + return beginValidateConfiguration(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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}. + * @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>> upgradeWithResponseAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties 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(); - } + private Mono>> getTopologyWithResponseAsync(String resourceGroupName, + String networkFabricName) { 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)) + .withContext(context -> service.getTopology(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, 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. + * 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 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}. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties 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(); - } + private Response getTopologyWithResponse(String resourceGroupName, String networkFabricName) { 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); + return service.getTopologySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { - Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkFabricName, body); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response getTopologyWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.getTopologySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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. + * @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, CommonPostActionResponseForStateUpdateInner> - beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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); + 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. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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. + * @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, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties body) { - return this.beginUpgradeAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginGetTopology(String resourceGroupName, String networkFabricName) { + Response response = getTopologyWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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. + * @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, CommonPostActionResponseForStateUpdateInner> - beginUpgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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, UpgradeNetworkFabricProperties body) { - return beginUpgradeAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, ValidateConfigurationResponseInner> + beginGetTopology(String resourceGroupName, String networkFabricName, Context context) { + Response response = getTopologyWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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}. + * @return topology of the underlying resources in the given Network Fabric instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, - String networkFabricName, UpgradeNetworkFabricProperties body, Context context) { - return beginUpgradeAsync(resourceGroupName, networkFabricName, body, context).last() + private Mono getTopologyAsync(String resourceGroupName, + String networkFabricName) { + return beginGetTopologyAsync(resourceGroupName, networkFabricName).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. + * 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 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. + * @return topology of the underlying resources in the given Network Fabric instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, - UpgradeNetworkFabricProperties body) { - return upgradeAsync(resourceGroupName, networkFabricName, body).block(); + public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName) { + return beginGetTopology(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Upgrades the version of the underlying resources in the given Network Fabric instance. + * 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 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. + * @return topology of the underlying resources in the given Network Fabric instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner upgrade(String resourceGroupName, String networkFabricName, - UpgradeNetworkFabricProperties body, Context context) { - return upgradeAsync(resourceGroupName, networkFabricName, body, context).block(); + public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName, + Context context) { + return beginGetTopology(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshConfigurationWithResponseAsync(String resourceGroupName, + 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.refreshConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, accept, context)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. + * 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, String networkFabricName) { 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); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfigurationAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName) { Mono>> mono - = refreshConfigurationWithResponseAsync(resourceGroupName, networkFabricName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. + * 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginRefreshConfiguration(String resourceGroupName, String networkFabricName) { - return this.beginRefreshConfigurationAsync(resourceGroupName, networkFabricName).getSyncPoller(); + beginCommitConfiguration(String resourceGroupName, String networkFabricName) { + Response response = commitConfigurationWithResponse(resourceGroupName, networkFabricName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * 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. @@ -2269,76 +2830,54 @@ private Mono>> refreshConfigurationWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, 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); + beginCommitConfiguration(String resourceGroupName, String networkFabricName, Context context) { + Response response = commitConfigurationWithResponse(resourceGroupName, networkFabricName, context); + return this.client + .getLroResult( + response, 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. + * 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}. + * @return the response body 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() + private Mono commitConfigurationAsync(String resourceGroupName, + String networkFabricName) { + return beginCommitConfigurationAsync(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. + * 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String networkFabricName) { - return refreshConfigurationAsync(resourceGroupName, networkFabricName).block(); + return beginCommitConfiguration(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * 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. @@ -2346,19 +2885,16 @@ public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String resourceGroupName, + public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String networkFabricName, Context context) { - return refreshConfigurationAsync(resourceGroupName, networkFabricName, context).block(); + return beginCommitConfiguration(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2366,149 +2902,85 @@ public CommonPostActionResponseForStateUpdateInner refreshConfiguration(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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(); - } + private Mono>> commitBatchStatusWithResponseAsync(String resourceGroupName, + String networkFabricName, CommitBatchStatusRequest body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.commitBatchStatus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + 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. + * Post action: Returns a status of commit batch operation. * * @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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response commitBatchStatusWithResponse(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body) { + final String contentType = "application/json"; 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); + return service.commitBatchStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Returns a status of commit batch operation. * * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitBatchStatusWithResponse(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.commitBatchStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Returns a status of commit batch operation. * * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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); + private PollerFlux, CommitBatchStatusResponseInner> + beginCommitBatchStatusAsync(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body) { + Mono>> mono + = commitBatchStatusWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CommitBatchStatusResponseInner.class, CommitBatchStatusResponseInner.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. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2516,22 +2988,18 @@ private Mono>> updateWorkloadManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateWorkloadManagementBfdConfiguration(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body) { - return this.beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) - .getSyncPoller(); + public SyncPoller, CommitBatchStatusResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body) { + Response response = commitBatchStatusWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, + CommitBatchStatusResponseInner.class, CommitBatchStatusResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2540,67 +3008,38 @@ private Mono>> updateWorkloadManagementBfdConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, 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); + public SyncPoller, CommitBatchStatusResponseInner> + beginCommitBatchStatus(String resourceGroupName, String networkFabricName, CommitBatchStatusRequest body, + Context context) { + Response response + = commitBatchStatusWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, + CommitBatchStatusResponseInner.class, CommitBatchStatusResponseInner.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. + * Post action: Returns a status of commit batch operation. * * @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}. + * @return the response body 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() + private Mono commitBatchStatusAsync(String resourceGroupName, + String networkFabricName, CommitBatchStatusRequest body) { + return beginCommitBatchStatusAsync(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. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2608,19 +3047,16 @@ private Mono updateWorkloadManageme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { - return updateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + public CommitBatchStatusResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body) { + return beginCommitBatchStatus(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric - * instance. + * Post action: Returns a status of commit batch operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2629,19 +3065,16 @@ public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( - String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { - return updateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) - .block(); + public CommitBatchStatusResponseInner commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context) { + return beginCommitBatchStatus(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2649,144 +3082,86 @@ public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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(); - } + private Mono>> discardCommitBatchWithResponseAsync(String resourceGroupName, + String networkFabricName, DiscardCommitBatchRequest body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.discardCommitBatch(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + 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. + * Post action: Discards a Batch operation in progress. * * @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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response discardCommitBatchWithResponse(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { + final String contentType = "application/json"; 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); + return service.discardCommitBatchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response discardCommitBatchWithResponse(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.discardCommitBatchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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); + private PollerFlux, DiscardCommitBatchResponseInner> + beginDiscardCommitBatchAsync(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { + Mono>> mono + = discardCommitBatchWithResponseAsync(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DiscardCommitBatchResponseInner.class, DiscardCommitBatchResponseInner.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. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2794,21 +3169,18 @@ private Mono>> updateInfraManagementBfdConfigurationWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateInfraManagementBfdConfiguration(String resourceGroupName, String networkFabricName, - UpdateAdministrativeState body) { - return this.beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) - .getSyncPoller(); + public SyncPoller, DiscardCommitBatchResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body) { + Response response = discardCommitBatchWithResponse(resourceGroupName, networkFabricName, body); + return this.client.getLroResult(response, + DiscardCommitBatchResponseInner.class, DiscardCommitBatchResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2817,63 +3189,38 @@ private Mono>> updateInfraManagementBfdConfigurationWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, 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); + public SyncPoller, DiscardCommitBatchResponseInner> + beginDiscardCommitBatch(String resourceGroupName, String networkFabricName, DiscardCommitBatchRequest body, + Context context) { + Response response + = discardCommitBatchWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client.getLroResult(response, + DiscardCommitBatchResponseInner.class, DiscardCommitBatchResponseInner.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. + * Post action: Discards a Batch operation in progress. * * @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}. + * @return the response body 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() + private Mono discardCommitBatchAsync(String resourceGroupName, + String networkFabricName, DiscardCommitBatchRequest body) { + return beginDiscardCommitBatchAsync(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. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2881,18 +3228,16 @@ private Mono updateInfraManagementB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, - String networkFabricName, UpdateAdministrativeState body) { - return updateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + public DiscardCommitBatchResponseInner discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { + return beginDiscardCommitBatch(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + * Post action: Discards a Batch operation in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -2901,425 +3246,299 @@ public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration(String resourceGroupName, - String networkFabricName, UpdateAdministrativeState body, Context context) { - return updateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context).block(); + public DiscardCommitBatchResponseInner discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context) { + return beginDiscardCommitBatch(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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 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 response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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(); - } + private Mono>> lockFabricWithResponseAsync(String resourceGroupName, + String networkFabricName, NetworkFabricLockRequest body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.lockFabric(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + 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. + * Post action: Triggers network fabric lock operation. * * @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. + * @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 response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response lockFabricWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + final String contentType = "application/json"; 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()); + return service.lockFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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 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 response of the action validate configuration. + * @return the response body along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response lockFabricWithResponse(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.lockFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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 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 response of the action validate configuration. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginValidateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + private + PollerFlux, CommonPostActionResponseForStateUpdateInner> + beginLockFabricAsync(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body) { + Mono>> mono = lockFabricWithResponseAsync(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. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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. + * @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 response of the action validate configuration. + * @return the {@link SyncPoller} for polling of long-running operation. */ @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(); + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginLockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body) { + Response response = lockFabricWithResponse(resourceGroupName, networkFabricName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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 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 response of the action validate configuration on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateConfigurationAsync(String resourceGroupName, - String networkFabricName, ValidateConfigurationProperties body) { - return beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginLockFabric(String resourceGroupName, String networkFabricName, NetworkFabricLockRequest body, + Context context) { + Response response = lockFabricWithResponse(resourceGroupName, networkFabricName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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. + * @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 response of the action validate configuration on successful completion of {@link Mono}. + * @return the response body 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() + private Mono lockFabricAsync(String resourceGroupName, + String networkFabricName, NetworkFabricLockRequest body) { + return beginLockFabricAsync(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. + * Post action: Triggers network fabric lock operation. * * @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 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 response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body) { - return validateConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + public CommonPostActionResponseForStateUpdateInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + return beginLockFabric(resourceGroupName, networkFabricName, body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Validates the configuration of the underlying resources in the given Network Fabric instance. + * Post action: Triggers network fabric lock operation. * * @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 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 response of the action validate configuration. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkFabricName, - ValidateConfigurationProperties body, Context context) { - return validateConfigurationAsync(resourceGroupName, networkFabricName, body, context).block(); + public CommonPostActionResponseForStateUpdateInner lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context) { + return beginLockFabric(resourceGroupName, networkFabricName, body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getTopologyWithResponseAsync(String resourceGroupName, + private Mono>> viewDeviceConfigurationWithResponseAsync(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)) + .withContext( + context -> service.viewDeviceConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. + * Post action: Triggers view of network fabric configuration. * * @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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response viewDeviceConfigurationWithResponse(String resourceGroupName, + String networkFabricName) { 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); + return service.viewDeviceConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response viewDeviceConfigurationWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.viewDeviceConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateConfigurationResponseInner> - beginGetTopologyAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ViewDeviceConfigurationResponseInner> + beginViewDeviceConfigurationAsync(String resourceGroupName, String networkFabricName) { Mono>> mono - = getTopologyWithResponseAsync(resourceGroupName, networkFabricName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + = viewDeviceConfigurationWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ViewDeviceConfigurationResponseInner.class, + ViewDeviceConfigurationResponseInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginGetTopology(String resourceGroupName, String networkFabricName) { - return this.beginGetTopologyAsync(resourceGroupName, networkFabricName).getSyncPoller(); + public SyncPoller, ViewDeviceConfigurationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName) { + Response response = viewDeviceConfigurationWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult( + response, ViewDeviceConfigurationResponseInner.class, ViewDeviceConfigurationResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3327,77 +3546,52 @@ private Mono>> getTopologyWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateConfigurationResponseInner> - beginGetTopology(String resourceGroupName, String networkFabricName, Context context) { - return this.beginGetTopologyAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + public SyncPoller, ViewDeviceConfigurationResponseInner> + beginViewDeviceConfiguration(String resourceGroupName, String networkFabricName, Context context) { + Response response + = viewDeviceConfigurationWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult( + response, ViewDeviceConfigurationResponseInner.class, ViewDeviceConfigurationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getTopologyAsync(String resourceGroupName, + private Mono viewDeviceConfigurationAsync(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() + return beginViewDeviceConfigurationAsync(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. + * Post action: Triggers view of network fabric configuration. * * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName) { - return getTopologyAsync(resourceGroupName, networkFabricName).block(); + public ViewDeviceConfigurationResponseInner viewDeviceConfiguration(String resourceGroupName, + String networkFabricName) { + return beginViewDeviceConfiguration(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Gets Topology of the underlying resources in the given Network Fabric instance. + * Post action: Triggers view of network fabric configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3405,166 +3599,110 @@ public ValidateConfigurationResponseInner getTopology(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 topology of the underlying resources in the given Network Fabric instance. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName, - Context context) { - return getTopologyAsync(resourceGroupName, networkFabricName, context).block(); + public ViewDeviceConfigurationResponseInner viewDeviceConfiguration(String resourceGroupName, + String networkFabricName, Context context) { + return beginViewDeviceConfiguration(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> commitConfigurationWithResponseAsync(String resourceGroupName, + private Mono>> armConfigurationDiffWithResponseAsync(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)) + .withContext(context -> service.armConfigurationDiff(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response armConfigurationDiffWithResponse(String resourceGroupName, String networkFabricName) { 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); + return service.armConfigurationDiffSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response armConfigurationDiffWithResponse(String resourceGroupName, String networkFabricName, + Context context) { + final String accept = "application/json"; + return service.armConfigurationDiffSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ArmConfigurationDiffResponseInner> + beginArmConfigurationDiffAsync(String resourceGroupName, String networkFabricName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + = armConfigurationDiffWithResponseAsync(resourceGroupName, networkFabricName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ArmConfigurationDiffResponseInner.class, + ArmConfigurationDiffResponseInner.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. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginCommitConfiguration(String resourceGroupName, String networkFabricName) { - return this.beginCommitConfigurationAsync(resourceGroupName, networkFabricName).getSyncPoller(); + public SyncPoller, ArmConfigurationDiffResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName) { + Response response = armConfigurationDiffWithResponse(resourceGroupName, networkFabricName); + return this.client.getLroResult(response, + ArmConfigurationDiffResponseInner.class, ArmConfigurationDiffResponseInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -3572,89 +3710,84 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginCommitConfiguration(String resourceGroupName, String networkFabricName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + public SyncPoller, ArmConfigurationDiffResponseInner> + beginArmConfigurationDiff(String resourceGroupName, String networkFabricName, Context context) { + Response response = armConfigurationDiffWithResponse(resourceGroupName, networkFabricName, context); + return this.client.getLroResult(response, + ArmConfigurationDiffResponseInner.class, ArmConfigurationDiffResponseInner.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. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, + private Mono armConfigurationDiffAsync(String resourceGroupName, String networkFabricName) { - return beginCommitConfigurationAsync(resourceGroupName, networkFabricName).last() + return beginArmConfigurationDiffAsync(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. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono commitConfigurationAsync(String resourceGroupName, - String networkFabricName, Context context) { - return beginCommitConfigurationAsync(resourceGroupName, networkFabricName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ArmConfigurationDiffResponseInner armConfigurationDiff(String resourceGroupName, String networkFabricName) { + return beginArmConfigurationDiff(resourceGroupName, networkFabricName).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Post action: Triggers diff of NetworkFabric ARM Configuration. * * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, - String networkFabricName) { - return commitConfigurationAsync(resourceGroupName, networkFabricName).block(); + public ArmConfigurationDiffResponseInner armConfigurationDiff(String resourceGroupName, String networkFabricName, + Context context) { + return beginArmConfigurationDiff(resourceGroupName, networkFabricName, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * Get the next page of items. * - * @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. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response of a NetworkFabric list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, - String networkFabricName, Context context) { - return commitConfigurationAsync(resourceGroupName, networkFabricName, context).block(); + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + 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())); } /** @@ -3664,24 +3797,15 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(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 Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabric list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { 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())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -3692,23 +3816,15 @@ 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 Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabric list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -3718,17 +3834,11 @@ 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 Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabric list operation 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( @@ -3738,6 +3848,24 @@ private Mono> listBySubscriptionNextSinglePage .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkFabric list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -3746,22 +3874,14 @@ 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 Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkFabric list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkFabricsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java index 6e29df22b4cf..7d351bb78be2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,28 +10,39 @@ 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.ArmConfigurationDiffResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.ArmConfigurationDiffResponse; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusResponse; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchResponse; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabrics; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponse; public final class NetworkFabricsImpl implements NetworkFabrics { private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricsImpl.class); private final NetworkFabricsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkFabricsImpl(NetworkFabricsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -280,6 +291,114 @@ public CommonPostActionResponseForStateUpdate commitConfiguration(String resourc } } + public CommitBatchStatusResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body) { + CommitBatchStatusResponseInner inner + = this.serviceClient().commitBatchStatus(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new CommitBatchStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommitBatchStatusResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context) { + CommitBatchStatusResponseInner inner + = this.serviceClient().commitBatchStatus(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommitBatchStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiscardCommitBatchResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body) { + DiscardCommitBatchResponseInner inner + = this.serviceClient().discardCommitBatch(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new DiscardCommitBatchResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiscardCommitBatchResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context) { + DiscardCommitBatchResponseInner inner + = this.serviceClient().discardCommitBatch(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new DiscardCommitBatchResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body) { + CommonPostActionResponseForStateUpdateInner inner + = this.serviceClient().lockFabric(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context) { + CommonPostActionResponseForStateUpdateInner inner + = this.serviceClient().lockFabric(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public ViewDeviceConfigurationResponse viewDeviceConfiguration(String resourceGroupName, String networkFabricName) { + ViewDeviceConfigurationResponseInner inner + = this.serviceClient().viewDeviceConfiguration(resourceGroupName, networkFabricName); + if (inner != null) { + return new ViewDeviceConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ViewDeviceConfigurationResponse viewDeviceConfiguration(String resourceGroupName, String networkFabricName, + Context context) { + ViewDeviceConfigurationResponseInner inner + = this.serviceClient().viewDeviceConfiguration(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new ViewDeviceConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArmConfigurationDiffResponse armConfigurationDiff(String resourceGroupName, String networkFabricName) { + ArmConfigurationDiffResponseInner inner + = this.serviceClient().armConfigurationDiff(resourceGroupName, networkFabricName); + if (inner != null) { + return new ArmConfigurationDiffResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArmConfigurationDiffResponse armConfigurationDiff(String resourceGroupName, String networkFabricName, + Context context) { + ArmConfigurationDiffResponseInner inner + = this.serviceClient().armConfigurationDiff(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new ArmConfigurationDiffResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public NetworkFabric getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -340,7 +459,7 @@ private NetworkFabricsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 cba6aa445442..85c72a88476f 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 @@ -1,25 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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.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; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; public final class NetworkInterfaceImpl implements NetworkInterface, NetworkInterface.Definition, NetworkInterface.Update { private NetworkInterfaceInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -33,40 +32,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String physicalIdentifier() { - return this.innerModel().physicalIdentifier(); - } - - public String connectedTo() { - return this.innerModel().connectedTo(); - } - - public InterfaceType interfaceType() { - return this.innerModel().interfaceType(); - } - - public String ipv4Address() { - return this.innerModel().ipv4Address(); + public NetworkInterfaceProperties properties() { + return this.innerModel().properties(); } - 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(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -77,7 +48,7 @@ public NetworkInterfaceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -87,7 +58,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkInterfaceName; - private NetworkInterfacePatch updateBody; + private NetworkInterfacePatch updateProperties; public NetworkInterfaceImpl withExistingNetworkDevice(String resourceGroupName, String networkDeviceName) { this.resourceGroupName = resourceGroupName; @@ -109,34 +80,33 @@ public NetworkInterface create(Context context) { return this; } - NetworkInterfaceImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NetworkInterfaceImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkInterfaceInner(); this.serviceManager = serviceManager; this.networkInterfaceName = name; } public NetworkInterfaceImpl update() { - this.updateBody = new NetworkInterfacePatch(); + this.updateProperties = new NetworkInterfacePatch(); return this; } public NetworkInterface apply() { this.innerObject = serviceManager.serviceClient() .getNetworkInterfaces() - .update(resourceGroupName, networkDeviceName, networkInterfaceName, updateBody, Context.NONE); + .update(resourceGroupName, networkDeviceName, networkInterfaceName, updateProperties, Context.NONE); return this; } public NetworkInterface apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkInterfaces() - .update(resourceGroupName, networkDeviceName, networkInterfaceName, updateBody, context); + .update(resourceGroupName, networkDeviceName, networkInterfaceName, updateProperties, context); return this; } NetworkInterfaceImpl(NetworkInterfaceInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -171,17 +141,13 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAd .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); } - public NetworkInterfaceImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public NetworkInterfaceImpl withProperties(NetworkInterfaceProperties properties) { + this.innerModel().withProperties(properties); + return this; } - private boolean isInCreateMode() { - return this.innerModel().id() == null; + public NetworkInterfaceImpl withProperties(NetworkInterfacePatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } } 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 8869118f3efe..035954b49ee5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,8 +37,8 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfaceListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacesList; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,536 +56,448 @@ public final class NetworkInterfacesClientImpl implements NetworkInterfacesClien /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkInterfacesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkInterfacesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkInterfacesClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkInterfacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkInterfaces to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkInterfaces to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkInterfaces") public interface NetworkInterfacesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, - @PathParam("networkInterfaceName") String networkInterfaceName, - @BodyParam("application/json") NetworkInterfaceInner body, @HeaderParam("Accept") String accept, + @PathParam("networkInterfaceName") String networkInterfaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @PathParam("networkInterfaceName") String networkInterfaceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfaceInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfaceInner resource, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @PathParam("networkInterfaceName") String networkInterfaceName, - @BodyParam("application/json") NetworkInterfacePatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfacePatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkInterfacePatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") @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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, - @PathParam("networkInterfaceName") String networkInterfaceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("networkInterfaceName") String networkInterfaceName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetworkDevice(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByNetworkDevice(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkDeviceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkDeviceName") String networkDeviceName, @PathParam("networkInterfaceName") String networkInterfaceName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkDeviceName") String networkDeviceName, + @PathParam("networkInterfaceName") String networkInterfaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetworkDeviceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByNetworkDeviceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkDeviceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 defines the NetworkInterface resource along with {@link Response} on successful completion of + * @return the Network Interface resource details along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfaceInner 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 (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName 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(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String networkDeviceName, String networkInterfaceName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 defines the NetworkInterface resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Interface resource details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfaceInner 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 (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName 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(), networkDeviceName, networkInterfaceName, body, accept, context); - } - - /** - * Create NetworkInterface. - * - * Create a Network Interface resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 defines the NetworkInterface resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkInterfaceInner> beginCreateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, - this.client.getContext()); + private Mono getAsync(String resourceGroupName, String networkDeviceName, + String networkInterfaceName) { + return getWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 defines the NetworkInterface resource. + * @return the Network Interface resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkInterfaceInner> beginCreateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, networkDeviceName, networkInterfaceName, accept, context); } /** - * Create NetworkInterface. - * - * Create a Network Interface resource. + * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 defines the NetworkInterface resource. + * @return the Network Interface resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { + return getWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, Context.NONE).getValue(); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param resource 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 NetworkInterface resource. + * @return defines the NetworkInterface resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfaceInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. + * @param resource 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 NetworkInterface resource on successful completion of {@link Mono}. + * @return defines the NetworkInterface resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfaceInner body) { - return beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfaceInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, resource, Context.NONE); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. + * @param resource 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 NetworkInterface resource on successful completion of {@link Mono}. + * @return defines the NetworkInterface resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfaceInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfaceInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, resource, context); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body Request payload. + * @param resource 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 NetworkInterface resource. + * @return the {@link PollerFlux} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body) { - return createAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkInterfaceInner> beginCreateAsync( + String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, + this.client.getContext()); } /** - * Create NetworkInterface. - * * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. + * @param resource 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 NetworkInterface resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfaceInner body, Context context) { - return createAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).block(); - } - - /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. - * @return the Network Interface resource details along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner resource) { + Response response + = createWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, resource); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, Context.NONE); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param resource 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 Interface resource details along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of defines the NetworkInterface resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkInterfaceInner> beginCreate(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, NetworkInterfaceInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, resource, context); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param resource 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 Interface resource details on successful completion of {@link Mono}. + * @return defines the NetworkInterface resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName) { - return getWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfaceInner resource) { + return beginCreateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param context The context to associate with this operation. + * @param resource 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 Interface resource details along with {@link Response}. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context) { - return getWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).block(); + public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner resource) { + return beginCreate(resourceGroupName, networkDeviceName, networkInterfaceName, resource).getFinalResult(); } /** - * Gets a NetworkInterface. - * - * Get the Network Interface resource details. + * Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. * @param networkInterfaceName Name of the Network Interface. + * @param resource 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 Interface resource details. + * @return defines the NetworkInterface resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return getWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, Context.NONE).getValue(); + public NetworkInterfaceInner create(String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfaceInner resource, Context context) { + return beginCreate(resourceGroupName, networkDeviceName, networkInterfaceName, resource, context) + .getFinalResult(); } /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -593,124 +506,68 @@ public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfacePatch 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 (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName 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(); - } + String networkInterfaceName, NetworkInterfacePatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, + contentType, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a NetworkInterface. - * * 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 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. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return defines the NetworkInterface resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfacePatch 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 (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName 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(); - } + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfacePatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, properties, Context.NONE); } /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws ManagementException thrown 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 NetworkInterface resource. + * @return defines the NetworkInterface resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkInterfaceInner> beginUpdateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, NetworkInterfacePatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, properties, context); } /** - * Updates a NetworkInterface. - * * 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 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. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -718,24 +575,22 @@ private PollerFlux, NetworkInterfaceInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkInterfaceInner> beginUpdateAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String networkDeviceName, String networkInterfaceName, + NetworkInterfacePatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); + = updateWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); + this.client.getHttpPipeline(), NetworkInterfaceInner.class, NetworkInterfaceInner.class, + this.client.getContext()); } /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -743,19 +598,20 @@ private PollerFlux, NetworkInterfaceInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkInterfaceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).getSyncPoller(); + String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch properties) { + Response response + = updateWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, properties); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, Context.NONE); } /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws ManagementException thrown if the request is rejected by server. @@ -764,42 +620,20 @@ public SyncPoller, NetworkInterfaceInner> begi */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkInterfaceInner> beginUpdate(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) - .getSyncPoller(); - } - - /** - * Updates a NetworkInterface. - * - * 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the NetworkInterface resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfacePatch body) { - return beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + String networkDeviceName, String networkInterfaceName, NetworkInterfacePatch properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, properties, context); + return this.client.getLroResult(response, + NetworkInterfaceInner.class, NetworkInterfaceInner.class, context); } /** - * Updates a NetworkInterface. - * * 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 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. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -807,20 +641,18 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, NetworkInterfacePatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).last() + String networkInterfaceName, NetworkInterfacePatch properties) { + return beginUpdateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -828,19 +660,17 @@ private Mono updateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfacePatch body) { - return updateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + NetworkInterfacePatch properties) { + return beginUpdate(resourceGroupName, networkDeviceName, networkInterfaceName, properties).getFinalResult(); } /** - * Updates a NetworkInterface. - * * 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 Network Device. * @param networkInterfaceName Name of the Network Interface. - * @param body NetworkInterface properties to update. Only tags are supported. + * @param properties 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. * @throws ManagementException thrown if the request is rejected by server. @@ -849,13 +679,12 @@ public NetworkInterfaceInner update(String resourceGroupName, String networkDevi */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkInterfaceInner update(String resourceGroupName, String networkDeviceName, String networkInterfaceName, - NetworkInterfacePatch body, Context context) { - return updateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context).block(); + NetworkInterfacePatch properties, Context context) { + return beginUpdate(resourceGroupName, networkDeviceName, networkInterfaceName, properties, context) + .getFinalResult(); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -869,108 +698,55 @@ public NetworkInterfaceInner update(String resourceGroupName, String networkDevi @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, networkInterfaceName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, Context.NONE); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkDeviceName, + String networkInterfaceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, context); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -978,17 +754,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, Context context) { - context = this.client.mergeContext(context); + String networkInterfaceName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context); + = deleteWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1002,12 +775,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1022,13 +794,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1046,29 +817,6 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam } /** - * Deletes a NetworkInterface. - * - * Delete the Network Interface resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. - * @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 networkDeviceName, String networkInterfaceName, - Context context) { - return beginDeleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1080,12 +828,10 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - deleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName).block(); + beginDelete(resourceGroupName, networkDeviceName, networkInterfaceName).getFinalResult(); } /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1099,12 +845,10 @@ public void delete(String resourceGroupName, String networkDeviceName, String ne @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - deleteAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).block(); + beginDelete(resourceGroupName, networkDeviceName, networkInterfaceName, context).getFinalResult(); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1112,81 +856,39 @@ public void delete(String resourceGroupName, String networkDeviceName, 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 list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkInterface list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkDeviceSinglePageAsync(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.listByNetworkDevice(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, accept, context)) + .withContext(context -> service.listByNetworkDevice(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, 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 Interfaces that are available using an Network Device. - * * 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 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 list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetworkDeviceSinglePageAsync(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 - .listByNetworkDevice(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkDeviceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetworkDeviceAsync(String resourceGroupName, + String networkDeviceName) { + return new PagedFlux<>(() -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName), + nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink)); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1194,18 +896,20 @@ private Mono> listByNetworkDeviceSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkDeviceAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkDeviceSinglePage(String resourceGroupName, String networkDeviceName) { - return new PagedFlux<>(() -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName), - nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByNetworkDeviceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1214,18 +918,20 @@ private PagedFlux listByNetworkDeviceAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkDeviceAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkDeviceSinglePage(String resourceGroupName, String networkDeviceName, Context context) { - return new PagedFlux<>(() -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName, context), - nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByNetworkDeviceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1233,17 +939,16 @@ private PagedFlux listByNetworkDeviceAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName) { - return new PagedIterable<>(listByNetworkDeviceAsync(resourceGroupName, networkDeviceName)); + return new PagedIterable<>(() -> listByNetworkDeviceSinglePage(resourceGroupName, networkDeviceName), + nextLink -> listByNetworkDeviceNextSinglePage(nextLink)); } /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1252,17 +957,16 @@ public PagedIterable listByNetworkDevice(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName, Context context) { - return new PagedIterable<>(listByNetworkDeviceAsync(resourceGroupName, networkDeviceName, context)); + return new PagedIterable<>(() -> listByNetworkDeviceSinglePage(resourceGroupName, networkDeviceName, context), + nextLink -> listByNetworkDeviceNextSinglePage(nextLink, context)); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1272,155 +976,91 @@ public PagedIterable listByNetworkDevice(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, String networkDeviceName, String networkInterfaceName, 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 (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.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkDeviceName, - networkInterfaceName, body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, + networkInterfaceName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the admin state of the network interface. - * * 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 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, 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 (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.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateAdministrativeState(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkDeviceName, networkInterfaceName, body, accept, - context); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, Context.NONE); } /** - * Updates the admin state of the network interface. - * * 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 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 common response for the state updates. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkDeviceName, networkInterfaceName, contentType, + accept, body, context); } /** - * Updates the admin state of the network interface. - * * 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 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 common response for the state updates. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkDeviceName, - String networkInterfaceName, UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + String networkInterfaceName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, - networkDeviceName, networkInterfaceName, body, context); + networkDeviceName, networkInterfaceName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1430,21 +1070,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, networkInterfaceName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1455,22 +1096,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, - context) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkDeviceName, + networkInterfaceName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1480,7 +1121,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1491,50 +1132,25 @@ private Mono updateAdministrativeSt } /** - * Updates the admin state of the network interface. - * * 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 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync(String resourceGroupName, - String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the admin state of the network interface. - * - * 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 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body) + .getFinalResult(); } /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1545,13 +1161,13 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) - .block(); + return beginUpdateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) + .getFinalResult(); } /** @@ -1561,17 +1177,11 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkInterface list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkDeviceNextSinglePageAsync(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( @@ -1581,6 +1191,24 @@ private Mono> listByNetworkDeviceNextSingle .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkInterface list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkDeviceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByNetworkDeviceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1589,22 +1217,14 @@ private Mono> listByNetworkDeviceNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetworkDeviceNextSinglePageAsync(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.")); - } + private PagedResponse listByNetworkDeviceNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNetworkDeviceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByNetworkDeviceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkInterfacesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java index a88ce1e5753b..13a99cb9b7b8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -22,10 +22,10 @@ public final class NetworkInterfacesImpl implements NetworkInterfaces { private final NetworkInterfacesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkInterfacesImpl(NetworkInterfacesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -177,7 +177,7 @@ private NetworkInterfacesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java new file mode 100644 index 000000000000..3ba6d0ee2ce5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Collections; +import java.util.Map; + +public final class NetworkMonitorImpl implements NetworkMonitor, NetworkMonitor.Definition, NetworkMonitor.Update { + private NetworkMonitorInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 NetworkMonitorProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkMonitorInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkMonitorName; + + private NetworkMonitorPatch updateProperties; + + public NetworkMonitorImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NetworkMonitor create() { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .create(resourceGroupName, networkMonitorName, this.innerModel(), Context.NONE); + return this; + } + + public NetworkMonitor create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .create(resourceGroupName, networkMonitorName, this.innerModel(), context); + return this; + } + + NetworkMonitorImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = new NetworkMonitorInner(); + this.serviceManager = serviceManager; + this.networkMonitorName = name; + } + + public NetworkMonitorImpl update() { + this.updateProperties = new NetworkMonitorPatch(); + return this; + } + + public NetworkMonitor apply() { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .update(resourceGroupName, networkMonitorName, updateProperties, Context.NONE); + return this; + } + + public NetworkMonitor apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .update(resourceGroupName, networkMonitorName, updateProperties, context); + return this; + } + + NetworkMonitorImpl(NetworkMonitorInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkMonitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkMonitors"); + } + + public NetworkMonitor refresh() { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, Context.NONE) + .getValue(); + return this; + } + + public NetworkMonitor refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getNetworkMonitors() + .getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, context) + .getValue(); + return this; + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager.networkMonitors().updateAdministrativeState(resourceGroupName, networkMonitorName, body); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, + Context context) { + return serviceManager.networkMonitors() + .updateAdministrativeState(resourceGroupName, networkMonitorName, body, context); + } + + public NetworkMonitorImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NetworkMonitorImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NetworkMonitorImpl withProperties(NetworkMonitorProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public NetworkMonitorImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public NetworkMonitorImpl withProperties(NetworkMonitorPatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java new file mode 100644 index 000000000000..f4d68d611507 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java @@ -0,0 +1,1326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +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.NetworkMonitorsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +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 NetworkMonitorsClient. + */ +public final class NetworkMonitorsClientImpl implements NetworkMonitorsClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetworkMonitorsService service; + + /** + * The service client containing this operation class. + */ + private final FilesharesManagementClientImpl client; + + /** + * Initializes an instance of NetworkMonitorsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkMonitorsClientImpl(FilesharesManagementClientImpl client) { + this.service + = RestProxy.create(NetworkMonitorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for FilesharesManagementClientNetworkMonitors to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkMonitors") + public interface NetworkMonitorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorPatch properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkMonitorPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkMonitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkMonitorName") String networkMonitorName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkMonitorName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkMonitorName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkMonitorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkMonitorName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, accept, context); + } + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner getByResourceGroup(String resourceGroupName, String networkMonitorName) { + return getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, Context.NONE).getValue(); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, resource, + Context.NONE); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, resource, + context); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkMonitorInner> beginCreateAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkMonitorName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkMonitorInner.class, NetworkMonitorInner.class, this.client.getContext()); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner resource) { + Response response = createWithResponse(resourceGroupName, networkMonitorName, resource); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, Context.NONE); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginCreate(String resourceGroupName, + String networkMonitorName, NetworkMonitorInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkMonitorName, resource, context); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, context); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner resource) { + return beginCreateAsync(resourceGroupName, networkMonitorName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, + NetworkMonitorInner resource) { + return beginCreate(resourceGroupName, networkMonitorName, resource).getFinalResult(); + } + + /** + * Creates NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner create(String resourceGroupName, String networkMonitorName, NetworkMonitorInner resource, + Context context) { + return beginCreate(resourceGroupName, networkMonitorName, resource, context).getFinalResult(); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, properties, + Context.NONE); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, properties, + context); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkMonitorInner> beginUpdateAsync(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkMonitorName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkMonitorInner.class, NetworkMonitorInner.class, this.client.getContext()); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch properties) { + Response response = updateWithResponse(resourceGroupName, networkMonitorName, properties); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, Context.NONE); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkMonitorInner> beginUpdate(String resourceGroupName, + String networkMonitorName, NetworkMonitorPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkMonitorName, properties, context); + return this.client.getLroResult(response, NetworkMonitorInner.class, + NetworkMonitorInner.class, context); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch properties) { + return beginUpdateAsync(resourceGroupName, networkMonitorName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch properties) { + return beginUpdate(resourceGroupName, networkMonitorName, properties).getFinalResult(); + } + + /** + * API to update certain properties of the NetworkMonitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkMonitorInner update(String resourceGroupName, String networkMonitorName, + NetworkMonitorPatch properties, Context context) { + return beginUpdate(resourceGroupName, networkMonitorName, properties, context).getFinalResult(); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 networkMonitorName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkMonitorName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, Context.NONE); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkMonitorName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, context); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 networkMonitorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkMonitorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 networkMonitorName) { + Response response = deleteWithResponse(resourceGroupName, networkMonitorName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 networkMonitorName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, networkMonitorName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 networkMonitorName) { + return beginDeleteAsync(resourceGroupName, networkMonitorName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 networkMonitorName) { + beginDelete(resourceGroupName, networkMonitorName).getFinalResult(); + } + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 networkMonitorName, Context context) { + beginDelete(resourceGroupName, networkMonitorName, context).getFinalResult(); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, + Context.NONE); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkMonitorName, contentType, accept, body, context); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body) { + Mono>> mono + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkMonitorName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, this.client.getContext()); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkMonitorName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkMonitorName, + UpdateAdministrativeState body, Context context) { + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkMonitorName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, context); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkMonitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkMonitorName, body).getFinalResult(); + } + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkMonitorName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkMonitor list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkMonitor list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkMonitorsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java new file mode 100644 index 000000000000..84135dc2a4a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.NetworkMonitorsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitors; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +public final class NetworkMonitorsImpl implements NetworkMonitors { + private static final ClientLogger LOGGER = new ClientLogger(NetworkMonitorsImpl.class); + + private final NetworkMonitorsClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + public NetworkMonitorsImpl(NetworkMonitorsClient innerClient, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String networkMonitorName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkMonitorImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkMonitor getByResourceGroup(String resourceGroupName, String networkMonitorName) { + NetworkMonitorInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, networkMonitorName); + if (inner != null) { + return new NetworkMonitorImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String networkMonitorName) { + this.serviceClient().delete(resourceGroupName, networkMonitorName); + } + + public void delete(String resourceGroupName, String networkMonitorName, Context context) { + this.serviceClient().delete(resourceGroupName, networkMonitorName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkMonitorImpl(inner1, this.manager())); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body) { + CommonPostActionResponseForDeviceUpdateInner inner + = this.serviceClient().updateAdministrativeState(resourceGroupName, networkMonitorName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForDeviceUpdateInner inner + = this.serviceClient().updateAdministrativeState(resourceGroupName, networkMonitorName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkMonitor getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkMonitorName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + this.delete(resourceGroupName, networkMonitorName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 networkMonitorName = ResourceManagerUtils.getValueFromIdByName(id, "networkMonitors"); + if (networkMonitorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkMonitors'.", id))); + } + this.delete(resourceGroupName, networkMonitorName, context); + } + + private NetworkMonitorsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } + + public NetworkMonitorImpl define(String name) { + return new NetworkMonitorImpl(name, this.manager()); + } +} 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 index 4828b7a2853b..830c727381b6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -10,16 +10,15 @@ 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 com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; 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; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -46,52 +45,12 @@ public Map tags() { } } - 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 NetworkPacketBrokerProperties properties() { + return this.innerModel().properties(); } - 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 SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -110,7 +69,7 @@ public NetworkPacketBrokerInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -118,7 +77,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkPacketBrokerName; - private NetworkPacketBrokerPatch updateBody; + private NetworkPacketBrokerPatch updateProperties; public NetworkPacketBrokerImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -140,33 +99,33 @@ public NetworkPacketBroker create(Context context) { } NetworkPacketBrokerImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkPacketBrokerInner(); this.serviceManager = serviceManager; this.networkPacketBrokerName = name; } public NetworkPacketBrokerImpl update() { - this.updateBody = new NetworkPacketBrokerPatch(); + this.updateProperties = new NetworkPacketBrokerPatch(); return this; } public NetworkPacketBroker apply() { this.innerObject = serviceManager.serviceClient() .getNetworkPacketBrokers() - .update(resourceGroupName, networkPacketBrokerName, updateBody, Context.NONE); + .update(resourceGroupName, networkPacketBrokerName, updateProperties, Context.NONE); return this; } public NetworkPacketBroker apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkPacketBrokers() - .update(resourceGroupName, networkPacketBrokerName, updateBody, context); + .update(resourceGroupName, networkPacketBrokerName, updateProperties, context); return this; } NetworkPacketBrokerImpl(NetworkPacketBrokerInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -200,8 +159,8 @@ public NetworkPacketBrokerImpl withRegion(String location) { return this; } - public NetworkPacketBrokerImpl withNetworkFabricId(String networkFabricId) { - this.innerModel().withNetworkFabricId(networkFabricId); + public NetworkPacketBrokerImpl withProperties(NetworkPacketBrokerProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -210,12 +169,12 @@ public NetworkPacketBrokerImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); + this.updateProperties.withTags(tags); return this; } } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 index bafe53a9dc9e..7c2dc6e668ea 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.implementation.models.NetworkPacketBrokerListResult; 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; @@ -52,110 +53,176 @@ public final class NetworkPacketBrokersClientImpl implements NetworkPacketBroker /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkPacketBrokersClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkPacketBrokersClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkPacketBrokersClientImpl(FilesharesManagementClientImpl 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. + * The interface defining all the services for FilesharesManagementClientNetworkPacketBrokers to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkPacketBrokers") public interface NetworkPacketBrokersService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200 }) @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, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, @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, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkPacketBrokerName") String networkPacketBrokerName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerInner resource, Context context); + @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkPacketBrokerName") String networkPacketBrokerName, - @BodyParam("application/json") NetworkPacketBrokerPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerPatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkPacketBrokerPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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("endpoint") String endpoint, @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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Packet Broker. - * - * Creates 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 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. @@ -163,389 +230,253 @@ Mono> listBySubscriptionNext( * {@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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkPacketBrokerName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Packet Broker. - * - * Creates 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 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}. + * @return the NetworkPacketBroker resource definition 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, + String networkPacketBrokerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Packet Broker. - * - * Creates 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 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. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkPacketBrokerName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, accept, context); } /** - * Create Network Packet Broker. - * - * Creates 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 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. + * @return 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(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { + return getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkPacketBrokerName, NetworkPacketBrokerInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, + resource, 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 resource 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}. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerInner body) { - return beginCreateAsync(resourceGroupName, networkPacketBrokerName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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}. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ @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); + private Response createWithResponse(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, resource, + 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. + * @param resource 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. + * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerInner body) { - return createAsync(resourceGroupName, networkPacketBrokerName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkPacketBrokerInner> + beginCreateAsync(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkPacketBrokerName, resource); + 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 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. + * @param resource 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}. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> + beginCreate(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner resource) { + Response response = createWithResponse(resourceGroupName, networkPacketBrokerName, resource); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, Context.NONE); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this 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 resource 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}. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. */ - @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); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> beginCreate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, networkPacketBrokerName, resource, context); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, context); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this 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 resource 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 getByResourceGroupAsync(String resourceGroupName, - String networkPacketBrokerName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource) { + return beginCreateAsync(resourceGroupName, networkPacketBrokerName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this 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 context The context to associate with this operation. + * @param resource 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}. + * @return the NetworkPacketBroker resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkPacketBrokerName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName, context).block(); + public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource) { + return beginCreate(resourceGroupName, networkPacketBrokerName, resource).getFinalResult(); } /** - * Gets a Network Packet Broker. - * - * Retrieves details of this 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 resource 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 getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { - return getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE).getValue(); + public NetworkPacketBrokerInner create(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerInner resource, Context context) { + return beginCreate(resourceGroupName, networkPacketBrokerName, resource, context).getFinalResult(); } /** - * 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 properties 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. @@ -554,112 +485,65 @@ public NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, Str */ @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(); - } + String networkPacketBrokerName, NetworkPacketBrokerPatch properties) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, + properties, 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. + * @param properties 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}. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ @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(); - } + private Response updateWithResponse(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerPatch properties) { + final String contentType = "application/json"; 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); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, + properties, Context.NONE); } /** - * 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 properties 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. + * @return the NetworkPacketBroker resource definition along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkPacketBrokerName, + NetworkPacketBrokerPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, contentType, accept, + properties, 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -667,22 +551,20 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkPacketBrokerInner> beginUpdateAsync( - String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, body, context); + = updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, context); + 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 properties 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. @@ -690,18 +572,18 @@ private PollerFlux, NetworkPacketBrokerInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkPacketBrokerInner> - beginUpdate(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body).getSyncPoller(); + beginUpdate(String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch properties) { + Response response = updateWithResponse(resourceGroupName, networkPacketBrokerName, properties); + return this.client.getLroResult(response, + NetworkPacketBrokerInner.class, NetworkPacketBrokerInner.class, Context.NONE); } /** - * 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 properties 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. @@ -710,39 +592,20 @@ private PollerFlux, NetworkPacketBrokerInne */ @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); + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch properties, + Context context) { + Response response + = updateWithResponse(resourceGroupName, networkPacketBrokerName, properties, context); + return this.client.getLroResult(response, + 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -750,19 +613,17 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body, context).last() + NetworkPacketBrokerPatch properties) { + return beginUpdateAsync(resourceGroupName, networkPacketBrokerName, properties).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 properties 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. @@ -770,18 +631,16 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerPatch body) { - return updateAsync(resourceGroupName, networkPacketBrokerName, body).block(); + NetworkPacketBrokerPatch properties) { + return beginUpdate(resourceGroupName, networkPacketBrokerName, properties).getFinalResult(); } /** - * 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 properties 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. @@ -790,13 +649,11 @@ public NetworkPacketBrokerInner update(String resourceGroupName, String networkP */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkPacketBrokerInner update(String resourceGroupName, String networkPacketBrokerName, - NetworkPacketBrokerPatch body, Context context) { - return updateAsync(resourceGroupName, networkPacketBrokerName, body, context).block(); + NetworkPacketBrokerPatch properties, Context context) { + return beginUpdate(resourceGroupName, networkPacketBrokerName, properties, context).getFinalResult(); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -809,95 +666,51 @@ public NetworkPacketBrokerInner update(String resourceGroupName, String networkP @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, 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}. + * @return the response body along with {@link Response}. */ @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); + private Response deleteWithResponse(String resourceGroupName, String networkPacketBrokerName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkPacketBrokerName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkPacketBrokerName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -905,17 +718,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @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); + String networkPacketBrokerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkPacketBrokerName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + 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. @@ -927,12 +736,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName) { - return this.beginDeleteAsync(resourceGroupName, networkPacketBrokerName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkPacketBrokerName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -946,12 +754,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkPacketBrokerName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkPacketBrokerName, context); + return this.client.getLroResult(response, 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. @@ -968,27 +775,6 @@ private Mono deleteAsync(String resourceGroupName, String networkPacketBro } /** - * 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. @@ -999,12 +785,10 @@ private Mono deleteAsync(String resourceGroupName, String networkPacketBro */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkPacketBrokerName) { - deleteAsync(resourceGroupName, networkPacketBrokerName).block(); + beginDelete(resourceGroupName, networkPacketBrokerName).getFinalResult(); } /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1016,99 +800,64 @@ public void delete(String resourceGroupName, String networkPacketBrokerName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkPacketBrokerName, Context context) { - deleteAsync(resourceGroupName, networkPacketBrokerName, context).block(); + beginDelete(resourceGroupName, networkPacketBrokerName, context).getFinalResult(); } /** - * 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}. + * @return the response of a NetworkPacketBroker list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a NetworkPacketBroker list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkPacketBroker list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return 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. @@ -1116,33 +865,34 @@ 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 NetworkPacketBrokers as paginated response with {@link PagedFlux}. + * @return the response of a NetworkPacketBroker list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return 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 PagedIterable}. + * @return the response of a NetworkPacketBroker list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(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. @@ -1150,131 +900,105 @@ 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 NetworkPacketBrokers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkPacketBroker list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkPacketBroker list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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}. + * @return the response of a NetworkPacketBroker list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * * @throws ManagementException thrown 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}. + * @return the response of a NetworkPacketBroker list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return 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. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkPacketBroker list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return 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 PagedIterable}. + * @return the response of a NetworkPacketBroker list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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 PagedIterable}. + * @return the response of a NetworkPacketBroker list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1284,17 +1008,11 @@ 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 NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkPacketBroker list operation 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( @@ -1304,6 +1022,24 @@ private Mono> listByResourceGroupNextSin .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkPacketBroker list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1312,23 +1048,16 @@ 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 NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkPacketBroker list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1338,17 +1067,11 @@ 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 NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkPacketBroker list operation 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( @@ -1358,6 +1081,24 @@ private Mono> listBySubscriptionNextSing .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkPacketBroker list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1366,22 +1107,14 @@ 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 NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkPacketBroker list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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 index b1231ce6c0bf..bfb7aff231c7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class NetworkPacketBrokersImpl implements NetworkPacketBrokers { private final NetworkPacketBrokersClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkPacketBrokersImpl(NetworkPacketBrokersClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -138,7 +138,7 @@ private NetworkPacketBrokersClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 00dd126842d0..0a62ba9fa73d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -9,17 +9,15 @@ 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.NetworkRackType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties; import java.util.Collections; -import java.util.List; import java.util.Map; public final class NetworkRackImpl implements NetworkRack, NetworkRack.Definition, NetworkRack.Update { private NetworkRackInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -46,33 +44,12 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public NetworkRackType networkRackType() { - return this.innerModel().networkRackType(); - } - - public String networkFabricId() { - return this.innerModel().networkFabricId(); - } - - public List networkDevices() { - List inner = this.innerModel().networkDevices(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public NetworkRackProperties properties() { + return this.innerModel().properties(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -91,7 +68,7 @@ public NetworkRackInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -99,7 +76,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkRackName; - private TagsUpdate updateBody; + private NetworkRackPatch updateProperties; public NetworkRackImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -120,34 +97,33 @@ public NetworkRack create(Context context) { return this; } - NetworkRackImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NetworkRackImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkRackInner(); this.serviceManager = serviceManager; this.networkRackName = name; } public NetworkRackImpl update() { - this.updateBody = new TagsUpdate(); + this.updateProperties = new NetworkRackPatch(); return this; } public NetworkRack apply() { this.innerObject = serviceManager.serviceClient() .getNetworkRacks() - .update(resourceGroupName, networkRackName, updateBody, Context.NONE); + .update(resourceGroupName, networkRackName, updateProperties, Context.NONE); return this; } public NetworkRack apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkRacks() - .update(resourceGroupName, networkRackName, updateBody, context); + .update(resourceGroupName, networkRackName, updateProperties, context); return this; } NetworkRackImpl(NetworkRackInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -180,8 +156,8 @@ public NetworkRackImpl withRegion(String location) { return this; } - public NetworkRackImpl withNetworkFabricId(String networkFabricId) { - this.innerModel().withNetworkFabricId(networkFabricId); + public NetworkRackImpl withProperties(NetworkRackProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -190,22 +166,12 @@ public NetworkRackImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); + this.updateProperties.withTags(tags); return this; } } - public NetworkRackImpl withNetworkRackType(NetworkRackType networkRackType) { - this.innerModel().withNetworkRackType(networkRackType); - return this; - } - - public NetworkRackImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); - return this; - } - private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 1c39deca1322..62f38ec3cf0a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.NetworkRacksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacksListResult; -import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRackListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -52,492 +53,424 @@ public final class NetworkRacksClientImpl implements NetworkRacksClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkRacksClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkRacksClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkRacksClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkRacksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkRacks to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkRacks to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkRacks") public interface NetworkRacksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("networkRackName") String networkRackName, @BodyParam("application/json") NetworkRackInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkRackName") String networkRackName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackInner resource, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") @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("networkRackName") String networkRackName, @BodyParam("application/json") TagsUpdate body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackPatch properties, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkRackPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") @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("networkRackName") String networkRackName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkRackName") String networkRackName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return network Rack resource details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkRackName, - NetworkRackInner 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkRackName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkRackName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return network Rack resource details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkRackName, - NetworkRackInner 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(), networkRackName, body, accept, context); - } - - /** - * Create Network Rack. - * - * Create Network Rack resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkRackInner> beginCreateAsync(String resourceGroupName, - String networkRackName, NetworkRackInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, networkRackName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String networkRackName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkRackName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition. + * @return network Rack resource details along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkRackInner> beginCreateAsync(String resourceGroupName, - String networkRackName, NetworkRackInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkRackName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, accept, context); } /** - * Create Network Rack. - * - * Create Network Rack resource. + * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @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 Rack resource definition. + * @return network Rack resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body) { - return this.beginCreateAsync(resourceGroupName, networkRackName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName) { + return getByResourceGroupWithResponse(resourceGroupName, networkRackName, Context.NONE).getValue(); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 Rack resource definition. + * @return the Network Rack resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, - String networkRackName, NetworkRackInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, networkRackName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkRackName, + NetworkRackInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. + * @param resource 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 Rack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkRackName, - NetworkRackInner body) { - return beginCreateAsync(resourceGroupName, networkRackName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkRackName, + NetworkRackInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, resource, + Context.NONE); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. + * @param resource 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 Rack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkRackName, NetworkRackInner body, - Context context) { - return beginCreateAsync(resourceGroupName, networkRackName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkRackName, + NetworkRackInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, resource, + context); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. + * @param resource 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 Rack resource definition. + * @return the {@link PollerFlux} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body) { - return createAsync(resourceGroupName, networkRackName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkRackInner> beginCreateAsync(String resourceGroupName, + String networkRackName, NetworkRackInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkRackName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); } /** - * Create Network Rack. - * * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 Rack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, - Context context) { - return createAsync(resourceGroupName, networkRackName, body, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner resource) { + Response response = createWithResponse(resourceGroupName, networkRackName, resource); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, Context.NONE); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param resource 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 network Rack resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkRackName) { - 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(), networkRackName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkRackInner> beginCreate(String resourceGroupName, + String networkRackName, NetworkRackInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkRackName, resource, context); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, context); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. + * @param resource 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 network Rack resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String networkRackName, 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(), networkRackName, accept, context); + private Mono createAsync(String resourceGroupName, String networkRackName, + NetworkRackInner resource) { + return beginCreateAsync(resourceGroupName, networkRackName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param resource 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 network Rack resource details on successful completion of {@link Mono}. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String networkRackName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkRackName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner resource) { + return beginCreate(resourceGroupName, networkRackName, resource).getFinalResult(); } /** - * Gets a Network Rack. - * - * Get Network Rack resource details. + * Create Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param resource 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 network Rack resource details along with {@link Response}. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String networkRackName, + public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner resource, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkRackName, context).block(); - } - - /** - * Gets a Network Rack. - * - * Get Network Rack resource details. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner getByResourceGroup(String resourceGroupName, String networkRackName) { - return getByResourceGroupWithResponse(resourceGroupName, networkRackName, Context.NONE).getValue(); + return beginCreate(resourceGroupName, networkRackName, resource, context).getFinalResult(); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -546,110 +479,65 @@ public NetworkRackInner getByResourceGroup(String resourceGroupName, String netw */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkRackName, - TagsUpdate 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(); - } + NetworkRackPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkRackName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. - * @param context The context to associate with this operation. + * @param properties Network Rack 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 Rack resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the Network Rack resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkRackName, - TagsUpdate 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(); - } + private Response updateWithResponse(String resourceGroupName, String networkRackName, + NetworkRackPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkRackName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, properties, + Context.NONE); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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 Rack resource definition. + * @return the Network Rack resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkRackInner> beginUpdateAsync(String resourceGroupName, - String networkRackName, TagsUpdate body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, networkRackName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkRackName, + NetworkRackPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, contentType, accept, properties, + context); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. - * @param context The context to associate with this operation. + * @param properties Network Rack 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. @@ -657,22 +545,18 @@ private PollerFlux, NetworkRackInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkRackInner> beginUpdateAsync(String resourceGroupName, - String networkRackName, TagsUpdate body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkRackName, body, context); + String networkRackName, NetworkRackPatch properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkRackName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkRackInner.class, NetworkRackInner.class, context); + NetworkRackInner.class, NetworkRackInner.class, this.client.getContext()); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -680,18 +564,18 @@ private PollerFlux, NetworkRackInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body) { - return this.beginUpdateAsync(resourceGroupName, networkRackName, body).getSyncPoller(); + String networkRackName, NetworkRackPatch properties) { + Response response = updateWithResponse(resourceGroupName, networkRackName, properties); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, Context.NONE); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -700,76 +584,52 @@ public SyncPoller, NetworkRackInner> beginUpdate(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginUpdate(String resourceGroupName, - String networkRackName, TagsUpdate body, Context context) { - return this.beginUpdateAsync(resourceGroupName, networkRackName, body, context).getSyncPoller(); + String networkRackName, NetworkRackPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkRackName, properties, context); + return this.client.getLroResult(response, NetworkRackInner.class, + NetworkRackInner.class, context); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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 Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkRackName, TagsUpdate body) { - return beginUpdateAsync(resourceGroupName, networkRackName, body).last() + private Mono updateAsync(String resourceGroupName, String networkRackName, + NetworkRackPatch properties) { + return beginUpdateAsync(resourceGroupName, networkRackName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack 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 Rack resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkRackName, TagsUpdate body, - Context context) { - return beginUpdateAsync(resourceGroupName, networkRackName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Network Rack. - * - * Update certain properties of the Network Rack resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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 Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body) { - return updateAsync(resourceGroupName, networkRackName, body).block(); + public NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch properties) { + return beginUpdate(resourceGroupName, networkRackName, properties).getFinalResult(); } /** - * Updates a Network Rack. - * * Update certain properties of the Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param body Network Rack properties to update. + * @param properties Network Rack 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. @@ -777,13 +637,12 @@ public NetworkRackInner update(String resourceGroupName, String networkRackName, * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { - return updateAsync(resourceGroupName, networkRackName, body, context).block(); + public NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch properties, + Context context) { + return beginUpdate(resourceGroupName, networkRackName, properties, context).getFinalResult(); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -795,111 +654,63 @@ public NetworkRackInner update(String resourceGroupName, String networkRackName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkRackName) { - 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(), networkRackName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkRackName, - 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 (networkRackName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackName 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(), networkRackName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkRackName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, Context.NONE); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkRackName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkRackName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkRackName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkRackName, context); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 networkRackName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkRackName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkRackName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkRackName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -911,12 +722,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName) { - return this.beginDeleteAsync(resourceGroupName, networkRackName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkRackName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -930,12 +740,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkRackName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkRackName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkRackName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -952,27 +761,6 @@ private Mono deleteAsync(String resourceGroupName, String networkRackName) } /** - * Deletes a Network Rack. - * - * Delete Network Rack resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkRackName Name of the Network Rack. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 networkRackName, Context context) { - return beginDeleteAsync(resourceGroupName, networkRackName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -983,12 +771,10 @@ private Mono deleteAsync(String resourceGroupName, String networkRackName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkRackName) { - deleteAsync(resourceGroupName, networkRackName).block(); + beginDelete(resourceGroupName, networkRackName).getFinalResult(); } /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1000,99 +786,64 @@ public void delete(String resourceGroupName, String networkRackName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkRackName, Context context) { - deleteAsync(resourceGroupName, networkRackName, context).block(); + beginDelete(resourceGroupName, networkRackName, context).getFinalResult(); } /** - * List Network Racks by resource group. - * * List all Network Rack 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 Racks by resource group. - * * List all Network Rack 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List Network Racks by resource group. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedFlux}. + * @return the response of a NetworkRack list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1100,33 +851,33 @@ 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 Network Racks as paginated response with {@link PagedFlux}. + * @return the response of a NetworkRack list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by resource group. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1134,131 +885,105 @@ 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 Racks by subscription. - * * List all Network Rack 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * 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 Network Racks as paginated response with {@link PagedFlux}. + * @return the response of a NetworkRack list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List Network Racks by subscription. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedFlux}. + * @return the response of a NetworkRack list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List Network Racks by subscription. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1268,17 +993,11 @@ 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation 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( @@ -1288,6 +1007,24 @@ private Mono> listByResourceGroupNextSinglePageA .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkRack list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1296,23 +1033,15 @@ 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1322,17 +1051,11 @@ 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation 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( @@ -1342,6 +1065,24 @@ private Mono> listBySubscriptionNextSinglePageAs .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkRack list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1350,22 +1091,14 @@ 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 Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkRack list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkRacksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java index 166063eeaee3..c728cb0c4ac2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -19,10 +19,10 @@ public final class NetworkRacksImpl implements NetworkRacks { private final NetworkRacksClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkRacksImpl(NetworkRacksClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -136,7 +136,7 @@ private NetworkRacksClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 index d2e44758822a..ad14384e6507 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,25 +8,20 @@ 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.NetworkTapPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapProperties; 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; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -53,45 +48,12 @@ public Map tags() { } } - 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 NetworkTapProperties properties() { + return this.innerModel().properties(); } - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -110,7 +72,7 @@ public NetworkTapInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -118,7 +80,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkTapName; - private NetworkTapPatch updateBody; + private NetworkTapPatch updateProperties; public NetworkTapImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -139,34 +101,33 @@ public NetworkTap create(Context context) { return this; } - NetworkTapImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NetworkTapImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkTapInner(); this.serviceManager = serviceManager; this.networkTapName = name; } public NetworkTapImpl update() { - this.updateBody = new NetworkTapPatch(); + this.updateProperties = new NetworkTapPatch(); return this; } public NetworkTap apply() { this.innerObject = serviceManager.serviceClient() .getNetworkTaps() - .update(resourceGroupName, networkTapName, updateBody, Context.NONE); + .update(resourceGroupName, networkTapName, updateProperties, Context.NONE); return this; } public NetworkTap apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkTaps() - .update(resourceGroupName, networkTapName, updateBody, context); + .update(resourceGroupName, networkTapName, updateProperties, context); return this; } NetworkTapImpl(NetworkTapInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -216,13 +177,8 @@ public NetworkTapImpl withRegion(String location) { return this; } - public NetworkTapImpl withNetworkPacketBrokerId(String networkPacketBrokerId) { - this.innerModel().withNetworkPacketBrokerId(networkPacketBrokerId); - return this; - } - - public NetworkTapImpl withDestinations(List destinations) { - this.innerModel().withDestinations(destinations); + public NetworkTapImpl withProperties(NetworkTapProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -231,37 +187,17 @@ public NetworkTapImpl withTags(Map tags) { 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); + this.updateProperties.withTags(tags); return this; } } - public NetworkTapImpl withDestinationsForUpdate(List destinations) { - this.updateBody.withDestinations(destinations); + public NetworkTapImpl withProperties(NetworkTapPatchProperties properties) { + this.updateProperties.withProperties(properties); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 index 6916297dfd6d..8239b33a435d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,27 +8,20 @@ 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.NetworkTapRulePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleProperties; 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; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -55,62 +48,12 @@ public Map tags() { } } - 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 NetworkTapRuleProperties properties() { + return this.innerModel().properties(); } - 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 SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -129,7 +72,7 @@ public NetworkTapRuleInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -137,7 +80,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkTapRuleName; - private NetworkTapRulePatch updateBody; + private NetworkTapRulePatch updateProperties; public NetworkTapRuleImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -158,34 +101,33 @@ public NetworkTapRule create(Context context) { return this; } - NetworkTapRuleImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + NetworkTapRuleImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkTapRuleInner(); this.serviceManager = serviceManager; this.networkTapRuleName = name; } public NetworkTapRuleImpl update() { - this.updateBody = new NetworkTapRulePatch(); + this.updateProperties = new NetworkTapRulePatch(); return this; } public NetworkTapRule apply() { this.innerObject = serviceManager.serviceClient() .getNetworkTapRules() - .update(resourceGroupName, networkTapRuleName, updateBody, Context.NONE); + .update(resourceGroupName, networkTapRuleName, updateProperties, Context.NONE); return this; } public NetworkTapRule apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkTapRules() - .update(resourceGroupName, networkTapRuleName, updateBody, context); + .update(resourceGroupName, networkTapRuleName, updateProperties, context); return this; } NetworkTapRuleImpl(NetworkTapRuleInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -244,73 +186,27 @@ public NetworkTapRuleImpl withRegion(String 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); + public NetworkTapRuleImpl withProperties(NetworkTapRuleProperties properties) { + this.innerModel().withProperties(properties); 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) { + public NetworkTapRuleImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); + this.updateProperties.withTags(tags); return this; } } - public NetworkTapRuleImpl withAnnotation(String annotation) { - if (isInCreateMode()) { - this.innerModel().withAnnotation(annotation); - return this; - } else { - this.updateBody.withAnnotation(annotation); - return this; - } + public NetworkTapRuleImpl withProperties(NetworkTapRulePatchProperties properties) { + this.updateProperties.withProperties(properties); + return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || 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 index de16c9e99125..a32b16169a18 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -37,8 +38,8 @@ 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.implementation.models.NetworkTapRuleListResult; 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; @@ -56,103 +57,175 @@ public final class NetworkTapRulesClientImpl implements NetworkTapRulesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkTapRulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkTapRulesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkTapRulesClientImpl(FilesharesManagementClientImpl 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. + * The interface defining all the services for FilesharesManagementClientNetworkTapRules to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkTapRules") public interface NetworkTapRulesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200 }) @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, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @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, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRuleInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRuleInner resource, + Context context); + @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRulePatch properties, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapRulePatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, 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, + Mono>> resync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/resync") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); @@ -160,9 +233,19 @@ Mono>> resync(@HostParam("$host") String endpoint, @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, + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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) + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapRuleName") String networkTapRuleName, @HeaderParam("Accept") String accept, Context context); @@ -170,411 +253,290 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * 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 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}. + * @return network Tap Rule resource details 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkTapRuleName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * 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 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}. + * @return network Tap Rule resource details 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapRuleName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * 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 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. + * @return network Tap Rule resource details along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkTapRuleName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, context); } /** - * Create Network Tap Rule. - * - * Create Network Tap Rule resource. + * 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 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. + * @return network Tap Rule resource details. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, - String networkTapRuleName, NetworkTapRuleInner body) { - return this.beginCreateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName) { + return getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, resource, + 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 resource 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}. + * @return the NetworkTapRule resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkTapRuleName, - NetworkTapRuleInner body) { - return beginCreateAsync(resourceGroupName, networkTapRuleName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkTapRuleName, + NetworkTapRuleInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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}. + * @return the NetworkTapRule resource definition along with {@link Response}. */ @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); + private Response createWithResponse(String resourceGroupName, String networkTapRuleName, + NetworkTapRuleInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, resource, + 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. + * @param resource 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. + * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { - return createAsync(resourceGroupName, networkTapRuleName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapRuleInner> beginCreateAsync(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkTapRuleName, resource); + 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 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. + * @param resource 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 network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner resource) { + Response response = createWithResponse(resourceGroupName, networkTapRuleName, resource); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, Context.NONE); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * 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 resource 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 network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. */ - @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); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginCreate(String resourceGroupName, + String networkTapRuleName, NetworkTapRuleInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkTapRuleName, resource, context); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, context); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * 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 resource 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 network Tap Rule resource details on successful completion of {@link Mono}. + * @return the NetworkTapRule resource definition 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())); + private Mono createAsync(String resourceGroupName, String networkTapRuleName, + NetworkTapRuleInner resource) { + return beginCreateAsync(resourceGroupName, networkTapRuleName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * 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 context The context to associate with this operation. + * @param resource 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 network Tap Rule resource details along with {@link Response}. + * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String networkTapRuleName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName, context).block(); + public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, + NetworkTapRuleInner resource) { + return beginCreate(resourceGroupName, networkTapRuleName, resource).getFinalResult(); } /** - * Gets a Network Tap Rule. - * - * Get Network Tap Rule resource details. + * 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 resource 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 network Tap Rule resource details. + * @return the NetworkTapRule resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName) { - return getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE).getValue(); + public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner resource, + Context context) { + return beginCreate(resourceGroupName, networkTapRuleName, resource, context).getFinalResult(); } /** - * 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 properties 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. @@ -583,110 +545,65 @@ public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String n */ @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(); - } + String networkTapRuleName, NetworkTapRulePatch properties) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, properties, + 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. + * @param properties 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}. + * @return the NetworkTapRule resource definition along with {@link Response}. */ @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(); - } + private Response updateWithResponse(String resourceGroupName, String networkTapRuleName, + NetworkTapRulePatch properties) { + final String contentType = "application/json"; 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); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, properties, + Context.NONE); } /** - * 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 properties 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. + * @return the NetworkTapRule resource definition along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkTapRuleName, + NetworkTapRulePatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, properties, + 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -694,22 +611,19 @@ private PollerFlux, NetworkTapRuleInner> beginUp */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkTapRuleInner> beginUpdateAsync(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body, Context context) { - context = this.client.mergeContext(context); + String networkTapRuleName, NetworkTapRulePatch properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + = updateWithResponseAsync(resourceGroupName, networkTapRuleName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapRuleInner.class, NetworkTapRuleInner.class, context); + 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 properties 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. @@ -717,18 +631,18 @@ private PollerFlux, NetworkTapRuleInner> beginUp */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkTapRuleInner> beginUpdate(String resourceGroupName, - String networkTapRuleName, NetworkTapRulePatch body) { - return this.beginUpdateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + String networkTapRuleName, NetworkTapRulePatch properties) { + Response response = updateWithResponse(resourceGroupName, networkTapRuleName, properties); + return this.client.getLroResult(response, NetworkTapRuleInner.class, + NetworkTapRuleInner.class, Context.NONE); } /** - * 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 properties 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. @@ -737,18 +651,18 @@ public SyncPoller, NetworkTapRuleInner> beginUpd */ @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(); + String networkTapRuleName, NetworkTapRulePatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkTapRuleName, properties, context); + return this.client.getLroResult(response, 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. + * @param properties 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. @@ -756,58 +670,34 @@ public SyncPoller, NetworkTapRuleInner> beginUpd */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String networkTapRuleName, - NetworkTapRulePatch body) { - return beginUpdateAsync(resourceGroupName, networkTapRuleName, body).last() + NetworkTapRulePatch properties) { + return beginUpdateAsync(resourceGroupName, networkTapRuleName, properties).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. + * @param properties 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(); + public NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, + NetworkTapRulePatch properties) { + return beginUpdate(resourceGroupName, networkTapRuleName, properties).getFinalResult(); } /** - * 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 properties 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. @@ -815,14 +705,12 @@ public NetworkTapRuleInner update(String resourceGroupName, String networkTapRul * @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(); + public NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, + NetworkTapRulePatch properties, Context context) { + return beginUpdate(resourceGroupName, networkTapRuleName, properties, context).getFinalResult(); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -835,111 +723,64 @@ public NetworkTapRuleInner update(String resourceGroupName, String networkTapRul @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, 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}. + * @return the response body along with {@link Response}. */ @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); + private Response deleteWithResponse(String resourceGroupName, String networkTapRuleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkTapRuleName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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); + 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, - context); + 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. @@ -951,12 +792,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapRuleName) { - return this.beginDeleteAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapRuleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,55 +804,33 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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); + * @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) { + Response response = deleteWithResponse(resourceGroupName, networkTapRuleName, context); + return this.client.getLroResult(response, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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() + 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. @@ -1023,12 +841,10 @@ private Mono deleteAsync(String resourceGroupName, String networkTapRuleNa */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapRuleName) { - deleteAsync(resourceGroupName, networkTapRuleName).block(); + beginDelete(resourceGroupName, networkTapRuleName).getFinalResult(); } /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1040,99 +856,64 @@ public void delete(String resourceGroupName, String networkTapRuleName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapRuleName, Context context) { - deleteAsync(resourceGroupName, networkTapRuleName, context).block(); + beginDelete(resourceGroupName, networkTapRuleName, context).getFinalResult(); } /** - * 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}. + * @return the response of a NetworkTapRule list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a NetworkTapRule list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return 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. @@ -1140,33 +921,34 @@ private PagedFlux listByResourceGroupAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return 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 PagedIterable}. + * @return the response of a NetworkTapRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(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. @@ -1174,136 +956,108 @@ public PagedIterable listByResourceGroup(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkTapRule list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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}. + * @return the response of a NetworkTapRule list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return 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. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return 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 PagedIterable}. + * @return the response of a NetworkTapRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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 PagedIterable}. + * @return the response of a NetworkTapRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, 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. @@ -1312,143 +1066,87 @@ 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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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 contentType = "application/json"; 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)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, + contentType, accept, body, 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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkTapRuleName, UpdateAdministrativeState body) { + final String contentType = "application/json"; 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); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, + Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkTapRuleName, UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, contentType, accept, body, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkTapRuleName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1457,19 +1155,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkTapRuleName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1479,20 +1180,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkTapRuleName, body, context); + return this.client + .getLroResult( + response, 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. @@ -1501,7 +1204,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1511,29 +1214,6 @@ private Mono updateAdministrativeSt } /** - * 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. @@ -1542,17 +1222,15 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapRuleName, body).getFinalResult(); } /** - * 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. @@ -1562,17 +1240,15 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapRuleName, body, context).getFinalResult(); } /** - * 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. @@ -1580,125 +1256,76 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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)) + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response resyncWithResponse(String resourceGroupName, String networkTapRuleName) { 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); + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String networkTapRuleName, + Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String networkTapRuleName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName, context); + beginResyncAsync(String resourceGroupName, String networkTapRuleName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1706,18 +1333,20 @@ private Mono>> resyncWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String networkTapRuleName) { - return this.beginResyncAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapRuleName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1726,18 +1355,20 @@ private Mono>> resyncWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String networkTapRuleName, Context context) { - return this.beginResyncAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapRuleName, context); + return this.client + .getLroResult( + response, 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. @@ -1745,7 +1376,7 @@ private Mono>> resyncWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resyncAsync(String resourceGroupName, @@ -1755,28 +1386,6 @@ private Mono resyncAsync(String res } /** - * 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. @@ -1784,16 +1393,14 @@ private Mono resyncAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName) { - return resyncAsync(resourceGroupName, networkTapRuleName).block(); + return beginResync(resourceGroupName, networkTapRuleName).getFinalResult(); } /** - * 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. @@ -1802,17 +1409,15 @@ public CommonPostActionResponseForStateUpdateInner resync(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName, Context context) { - return resyncAsync(resourceGroupName, networkTapRuleName, context).block(); + return beginResync(resourceGroupName, networkTapRuleName, context).getFinalResult(); } /** - * 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. @@ -1820,124 +1425,77 @@ public CommonPostActionResponseForStateUpdateInner resync(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 the response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, + String networkTapRuleName) { 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); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapRuleName, accept, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String networkTapRuleName, + Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + 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. @@ -1945,17 +1503,17 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String networkTapRuleName) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, networkTapRuleName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** - * 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. @@ -1964,17 +1522,18 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String networkTapRuleName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + Response response + = validateConfigurationWithResponse(resourceGroupName, networkTapRuleName, context); + return this.client.getLroResult( + response, 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. @@ -1982,7 +1541,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1992,28 +1551,6 @@ private Mono validateConfigurationAsync(Stri } /** - * 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. @@ -2021,17 +1558,15 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName) { - return validateConfigurationAsync(resourceGroupName, networkTapRuleName).block(); + return beginValidateConfiguration(resourceGroupName, networkTapRuleName).getFinalResult(); } /** - * 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. @@ -2040,12 +1575,12 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName, Context context) { - return validateConfigurationAsync(resourceGroupName, networkTapRuleName, context).block(); + return beginValidateConfiguration(resourceGroupName, networkTapRuleName, context).getFinalResult(); } /** @@ -2055,17 +1590,11 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation 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( @@ -2075,6 +1604,24 @@ private Mono> listByResourceGroupNextSinglePa .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkTapRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2083,23 +1630,15 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2109,17 +1648,11 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation 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( @@ -2129,6 +1662,24 @@ private Mono> listBySubscriptionNextSinglePag .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkTapRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2137,22 +1688,14 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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 index 5dfeb660ae76..3ebdc440962e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -24,10 +24,10 @@ public final class NetworkTapRulesImpl implements NetworkTapRules { private final NetworkTapRulesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkTapRulesImpl(NetworkTapRulesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -205,7 +205,7 @@ private NetworkTapRulesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 index b64c13d3650b..713c3c7714cc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -37,8 +38,8 @@ 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.implementation.models.NetworkTapListResult; 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; @@ -56,503 +57,456 @@ public final class NetworkTapsClientImpl implements NetworkTapsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkTapsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkTapsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkTapsClientImpl(FilesharesManagementClientImpl 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. + * The interface defining all the services for FilesharesManagementClientNetworkTaps to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkTaps") public interface NetworkTapsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200 }) @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); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @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, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkTapName") String networkTapName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapInner resource, + Context context); + @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); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapPatch properties, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NetworkTapPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "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); + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, 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); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + @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, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, 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, + Mono>> resync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkTapName") String networkTapName, @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) + Response resyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Network Tap. - * - * Creates 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 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkTapName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Network Tap. - * - * Creates 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 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}. + * @return the Network Tap resource definition 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()); + private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Network Tap. - * - * Creates 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 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. + * @return the Network Tap resource definition along with {@link Response}. */ - @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); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, context); } /** - * Create Network Tap. - * - * Creates 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 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. + * @return 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(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName) { + return getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE).getValue(); } /** - * 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. + * @param resource 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. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. */ - @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(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkTapName, + NetworkTapInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, resource, 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 resource 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}. + * @return the Network Tap resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkTapName, NetworkTapInner body) { - return beginCreateAsync(resourceGroupName, networkTapName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkTapName, + NetworkTapInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, resource, + Context.NONE); } /** - * 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 resource 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}. + * @return the Network Tap resource definition along with {@link Response}. */ @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); + private Response createWithResponse(String resourceGroupName, String networkTapName, + NetworkTapInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, resource, 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. + * @param resource 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. + * @return the {@link PollerFlux} for polling of the Network Tap resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body) { - return createAsync(resourceGroupName, networkTapName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapInner> beginCreateAsync(String resourceGroupName, + String networkTapName, NetworkTapInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapName, resource); + 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. + * @param resource 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, - 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}. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @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())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner resource) { + Response response = createWithResponse(resourceGroupName, networkTapName, resource); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, Context.NONE); } /** - * Gets a Network Tap. - * - * Retrieves details of this 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 resource 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}. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. */ - @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); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginCreate(String resourceGroupName, + String networkTapName, NetworkTapInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkTapName, resource, context); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, context); } /** - * Gets a Network Tap. - * - * Retrieves details of this 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 resource 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 getByResourceGroupAsync(String resourceGroupName, String networkTapName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkTapName, + NetworkTapInner resource) { + return beginCreateAsync(resourceGroupName, networkTapName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Network Tap. - * - * Retrieves details of this 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 context The context to associate with this operation. + * @param resource 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}. + * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String networkTapName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName, context).block(); + public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner resource) { + return beginCreate(resourceGroupName, networkTapName, resource).getFinalResult(); } /** - * Gets a Network Tap. - * - * Retrieves details of this 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 resource 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 getByResourceGroup(String resourceGroupName, String networkTapName) { - return getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE).getValue(); + public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner resource, + Context context) { + return beginCreate(resourceGroupName, networkTapName, resource, context).getFinalResult(); } /** - * 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 properties 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. @@ -560,107 +514,65 @@ public NetworkTapInner getByResourceGroup(String resourceGroupName, String netwo */ @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(); - } + NetworkTapPatch properties) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, properties, + 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. + * @param properties 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}. + * @return the Network Tap resource definition along with {@link Response}. */ @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(); - } + private Response updateWithResponse(String resourceGroupName, String networkTapName, + NetworkTapPatch properties) { + final String contentType = "application/json"; 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); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, properties, + Context.NONE); } /** - * 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 properties 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. + * @return the Network Tap resource definition along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkTapName, + NetworkTapPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, properties, + 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -668,22 +580,18 @@ private PollerFlux, NetworkTapInner> beginUpdateAsyn */ @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); + String networkTapName, NetworkTapPatch properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NetworkTapInner.class, NetworkTapInner.class, context); + 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 properties 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. @@ -691,18 +599,18 @@ private PollerFlux, NetworkTapInner> beginUpdateAsyn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkTapInner> beginUpdate(String resourceGroupName, - String networkTapName, NetworkTapPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + String networkTapName, NetworkTapPatch properties) { + Response response = updateWithResponse(resourceGroupName, networkTapName, properties); + return this.client.getLroResult(response, NetworkTapInner.class, + NetworkTapInner.class, Context.NONE); } /** - * 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 properties 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. @@ -711,76 +619,52 @@ public SyncPoller, NetworkTapInner> beginUpdate(Stri */ @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(); + String networkTapName, NetworkTapPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkTapName, properties, context); + return this.client.getLroResult(response, 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. + * @param properties 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() + private Mono updateAsync(String resourceGroupName, String networkTapName, + NetworkTapPatch properties) { + return beginUpdateAsync(resourceGroupName, networkTapName, properties).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. + * @param properties 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(); + public NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch properties) { + return beginUpdate(resourceGroupName, networkTapName, properties).getFinalResult(); } /** - * 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 properties 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. @@ -788,14 +672,12 @@ public NetworkTapInner update(String resourceGroupName, String networkTapName, N * @return the Network Tap resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body, + public NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch properties, Context context) { - return updateAsync(resourceGroupName, networkTapName, body, context).block(); + return beginUpdate(resourceGroupName, networkTapName, properties, context).getFinalResult(); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -807,109 +689,63 @@ public NetworkTapInner update(String resourceGroupName, String networkTapName, N */ @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, 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}. + * @return the response body along with {@link Response}. */ @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); + private Response deleteWithResponse(String resourceGroupName, String networkTapName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkTapName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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); + 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, - context); + this.client.getContext()); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -921,12 +757,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName) { - return this.beginDeleteAsync(resourceGroupName, networkTapName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -940,12 +775,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName, Context context) { - return this.beginDeleteAsync(resourceGroupName, networkTapName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, networkTapName, context); + return this.client.getLroResult(response, 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. @@ -962,27 +796,6 @@ private Mono deleteAsync(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 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. @@ -993,12 +806,10 @@ private Mono deleteAsync(String resourceGroupName, String networkTapName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapName) { - deleteAsync(resourceGroupName, networkTapName).block(); + beginDelete(resourceGroupName, networkTapName).getFinalResult(); } /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1010,99 +821,64 @@ public void delete(String resourceGroupName, String networkTapName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkTapName, Context context) { - deleteAsync(resourceGroupName, networkTapName, context).block(); + beginDelete(resourceGroupName, networkTapName, context).getFinalResult(); } /** - * 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}. + * @return the response of a NetworkTap list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a NetworkTap list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return 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. @@ -1110,33 +886,33 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return 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 PagedIterable}. + * @return the response of a NetworkTap list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(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. @@ -1144,136 +920,108 @@ public PagedIterable listByResourceGroup(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 NetworkTaps as paginated response with {@link PagedIterable}. + * @return the response of a NetworkTap list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkTap list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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}. + * @return the response of a NetworkTap list operation as paginated response with {@link PagedFlux}. */ - @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)); + @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. * * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return 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. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return 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 PagedIterable}. + * @return the response of a NetworkTap list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(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 PagedIterable}. + * @return the response of a NetworkTap list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, 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. @@ -1282,139 +1030,87 @@ 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 common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body 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 contentType = "application/json"; 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)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkTapName, + contentType, accept, body, 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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body) { + final String contentType = "application/json"; 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); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, + Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String networkTapName, + UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, contentType, accept, body, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String networkTapName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + 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. @@ -1423,19 +1119,21 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkTapName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); } /** - * 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. @@ -1445,20 +1143,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, networkTapName, body, context); + return this.client + .getLroResult( + response, 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. @@ -1467,7 +1167,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1477,29 +1177,6 @@ private Mono updateAdministrativeS } /** - * 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. @@ -1508,17 +1185,15 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapName, body).getFinalResult(); } /** - * 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. @@ -1528,17 +1203,15 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, networkTapName, body, context).getFinalResult(); } /** - * 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. @@ -1546,122 +1219,74 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 common response for the state updates along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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)) + .withContext(context -> service.resync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response resyncWithResponse(String resourceGroupName, String networkTapName) { 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); + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkTapName, accept, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resyncWithResponse(String resourceGroupName, String networkTapName, Context context) { + final String accept = "application/json"; + return service.resyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginResyncAsync(String resourceGroupName, String networkTapName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName, context); + beginResyncAsync(String resourceGroupName, String networkTapName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1669,18 +1294,20 @@ private Mono>> resyncWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String networkTapName) { - return this.beginResyncAsync(resourceGroupName, networkTapName).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1689,18 +1316,20 @@ private Mono>> resyncWithResponseAsync(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 the {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginResync(String resourceGroupName, String networkTapName, Context context) { - return this.beginResyncAsync(resourceGroupName, networkTapName, context).getSyncPoller(); + Response response = resyncWithResponse(resourceGroupName, networkTapName, context); + return this.client + .getLroResult( + response, 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. @@ -1708,7 +1337,7 @@ private Mono>> resyncWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resyncAsync(String resourceGroupName, @@ -1718,28 +1347,6 @@ private Mono resyncAsync(String res } /** - * 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. @@ -1747,16 +1354,14 @@ private Mono resyncAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName) { - return resyncAsync(resourceGroupName, networkTapName).block(); + return beginResync(resourceGroupName, networkTapName).getFinalResult(); } /** - * 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. @@ -1765,12 +1370,12 @@ public CommonPostActionResponseForStateUpdateInner resync(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName, Context context) { - return resyncAsync(resourceGroupName, networkTapName, context).block(); + return beginResync(resourceGroupName, networkTapName, context).getFinalResult(); } /** @@ -1780,17 +1385,11 @@ public CommonPostActionResponseForStateUpdateInner resync(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 NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a NetworkTap list operation 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( @@ -1800,6 +1399,24 @@ private Mono> listByResourceGroupNextSinglePageAs .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkTap list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1808,23 +1425,15 @@ private Mono> listByResourceGroupNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1834,17 +1443,11 @@ private Mono> listByResourceGroupNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation 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( @@ -1854,6 +1457,24 @@ private Mono> listBySubscriptionNextSinglePageAsy .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkTap list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1862,22 +1483,14 @@ private Mono> listBySubscriptionNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkTap list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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 index 58e7d635bb73..da57b2c21b65 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -24,10 +24,10 @@ public final class NetworkTapsImpl implements NetworkTaps { private final NetworkTapsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkTapsImpl(NetworkTapsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -184,7 +184,7 @@ private NetworkTapsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 b61941a1bc25..4afa811376bd 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 @@ -1,34 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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.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.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.NetworkToNetworkInterconnectPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; public final class NetworkToNetworkInterconnectImpl implements NetworkToNetworkInterconnect, NetworkToNetworkInterconnect.Definition, NetworkToNetworkInterconnect.Update { private NetworkToNetworkInterconnectInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -42,60 +34,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public NniType nniType() { - return this.innerModel().nniType(); - } - - public IsManagementType isManagementType() { - return this.innerModel().isManagementType(); - } - - public BooleanEnumProperty useOptionB() { - return this.innerModel().useOptionB(); + public NetworkToNetworkInterconnectProperties properties() { + return this.innerModel().properties(); } - public Layer2Configuration layer2Configuration() { - return this.innerModel().layer2Configuration(); - } - - 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 SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -106,7 +50,7 @@ public NetworkToNetworkInterconnectInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -116,7 +60,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkToNetworkInterconnectName; - private NetworkToNetworkInterconnectPatch updateBody; + private NetworkToNetworkInterconnectPatch updateProperties; public NetworkToNetworkInterconnectImpl withExistingNetworkFabric(String resourceGroupName, String networkFabricName) { @@ -141,33 +85,34 @@ public NetworkToNetworkInterconnect create(Context context) { } NetworkToNetworkInterconnectImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new NetworkToNetworkInterconnectInner(); this.serviceManager = serviceManager; this.networkToNetworkInterconnectName = name; } public NetworkToNetworkInterconnectImpl update() { - this.updateBody = new NetworkToNetworkInterconnectPatch(); + this.updateProperties = new NetworkToNetworkInterconnectPatch(); return this; } public NetworkToNetworkInterconnect apply() { this.innerObject = serviceManager.serviceClient() .getNetworkToNetworkInterconnects() - .update(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, updateBody, Context.NONE); + .update(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, updateProperties, + Context.NONE); return this; } public NetworkToNetworkInterconnect apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNetworkToNetworkInterconnects() - .update(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, updateBody, context); + .update(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, updateProperties, context); return this; } NetworkToNetworkInterconnectImpl(NetworkToNetworkInterconnectInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -192,20 +137,6 @@ 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); @@ -218,95 +149,25 @@ public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAd 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(IsManagementType isManagementType) { - this.innerModel().withIsManagementType(isManagementType); - return this; + public NniBfdAdministrativeStateResponse updateBfdAdministrativeState(NniBfdAdministrativeStateRequest body) { + return serviceManager.networkToNetworkInterconnects() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); } - public NetworkToNetworkInterconnectImpl withLayer2Configuration(Layer2Configuration layer2Configuration) { - if (isInCreateMode()) { - this.innerModel().withLayer2Configuration(layer2Configuration); - return this; - } else { - this.updateBody.withLayer2Configuration(layer2Configuration); - return this; - } + public NniBfdAdministrativeStateResponse updateBfdAdministrativeState(NniBfdAdministrativeStateRequest body, + Context context) { + return serviceManager.networkToNetworkInterconnects() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, + context); } - public NetworkToNetworkInterconnectImpl withOptionBLayer3Configuration( - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { - this.innerModel().withOptionBLayer3Configuration(optionBLayer3Configuration); + public NetworkToNetworkInterconnectImpl withProperties(NetworkToNetworkInterconnectProperties properties) { + this.innerModel().withProperties(properties); return this; } - 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); + public NetworkToNetworkInterconnectImpl withProperties(NetworkToNetworkInterconnectPatchProperties properties) { + this.updateProperties.withProperties(properties); 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 2455ae3448e7..5c86038f7b0e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,8 +37,10 @@ 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.fluent.models.NniBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectListResult; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectsList; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,124 +58,200 @@ public final class NetworkToNetworkInterconnectsClientImpl implements NetworkToN /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of NetworkToNetworkInterconnectsClientImpl. * * @param client the instance of the service client containing this operation class. */ - NetworkToNetworkInterconnectsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + NetworkToNetworkInterconnectsClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(NetworkToNetworkInterconnectsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkToNetworkInterconnects - * to be used by the proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientNetworkToNetworkInterconnects to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientNetworkToNetworkInterconnects") public interface NetworkToNetworkInterconnectsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") NetworkToNetworkInterconnectInner body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectInner resource, Context context); + @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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") NetworkToNetworkInterconnectPatch body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectPatch properties, 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) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NetworkToNetworkInterconnectPatch properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") @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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, - @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetworkFabric(@HostParam("$host") String endpoint, + Mono> listByNetworkFabric( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @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") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNetworkFabricSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState") @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, + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, 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, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkFabricName") String networkFabricName, @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, - @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UpdateAdministrativeState body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateBfdAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NniBfdAdministrativeStateRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateBfdAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateBfdAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NniBfdAdministrativeStateRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNetworkFabricNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetworkFabricNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByNetworkFabricNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET 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 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. @@ -180,434 +259,275 @@ Mono> listByNetworkFabricNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner 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(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, - body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET 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 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 To Network Interconnect resource definition along with {@link Response} 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>> createWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, body, accept, context); - } - - /** - * Configuration used to setup CE-PE connectivity. - * - * 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 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 Network To Network Interconnect resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkToNetworkInterconnectInner> - beginCreateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, this.client.getContext()); + private Mono getAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName) { + return getWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET 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 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 To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkToNetworkInterconnectInner> - beginCreateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, accept, context); } /** - * Configuration used to setup CE-PE connectivity. - * - * Configuration used to setup CE-PE connectivity PUT Method. + * Implements NetworkToNetworkInterconnects GET 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 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 To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body) { - return this.beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName) { + return getWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, Context.NONE) + .getValue(); } /** - * Configuration used to setup CE-PE connectivity. - * * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param resource 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 To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectInner body, Context context) { - return this - .beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Configuration used to setup CE-PE connectivity. - * * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. + * @param resource 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 To Network Interconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { - return beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, resource, Context.NONE); } /** - * Configuration used to setup CE-PE connectivity. - * * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. + * @param resource 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 To Network Interconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context) { - return beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, resource, context); } /** - * Configuration used to setup CE-PE connectivity. - * * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param body Request payload. + * @param resource 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 To Network Interconnect resource definition. + * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body) { - return createAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkToNetworkInterconnectInner> + beginCreateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, + NetworkToNetworkInterconnectInner.class, this.client.getContext()); } /** - * Configuration used to setup CE-PE connectivity. - * * 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 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 Network To Network Interconnect resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner body, Context context) { - return createAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .block(); - } - - /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET 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 resource 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 To Network Interconnect resource definition along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner resource) { + Response response + = createWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, resource); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, Context.NONE); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param resource 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 To Network Interconnect resource definition along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, resource, context); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, context); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param resource 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 To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName) { - return getWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource) { + return beginCreateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. - * @param context The context to associate with this operation. + * @param resource 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 To Network Interconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, Context context) { - return getWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) - .block(); + public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource) { + return beginCreate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, resource) + .getFinalResult(); } /** - * Configuration used to setup CE-PE connectivity. - * - * Implements NetworkToNetworkInterconnects GET method. + * 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 Network Fabric. * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param resource 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 To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkToNetworkInterconnectInner get(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName) { - return getWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, Context.NONE) - .getValue(); + public NetworkToNetworkInterconnectInner create(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectInner resource, Context context) { + return beginCreate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, resource, context) + .getFinalResult(); } /** - * 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 properties 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. @@ -616,125 +536,68 @@ public NetworkToNetworkInterconnectInner get(String resourceGroupName, String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch 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(); - } + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, - body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. + * @param properties 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 along with {@link Response} on successful - * completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch 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(); - } + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, properties, Context.NONE); } /** - * 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 properties 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 the Network To Network Interconnect resource definition. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NetworkToNetworkInterconnectInner> - beginUpdateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, properties, 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -743,24 +606,21 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkToNetworkInterconnectInner> beginUpdateAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body, Context context) { - context = this.client.mergeContext(context); + NetworkToNetworkInterconnectPatch properties) { Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context); + networkToNetworkInterconnectName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), NetworkToNetworkInterconnectInner.class, - NetworkToNetworkInterconnectInner.class, context); + NetworkToNetworkInterconnectInner.class, this.client.getContext()); } /** - * 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 properties 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. @@ -769,20 +629,20 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body) { - return this.beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) - .getSyncPoller(); + NetworkToNetworkInterconnectPatch properties) { + Response response + = updateWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, properties); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, Context.NONE); } /** - * 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 properties 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. @@ -792,43 +652,20 @@ public SyncPoller, NetworkToNetwor @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - NetworkToNetworkInterconnectPatch body, Context context) { - return this - .beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .getSyncPoller(); - } - - /** - * 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 ManagementException 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body) { - return beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + NetworkToNetworkInterconnectPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, properties, context); + return this.client.getLroResult(response, + NetworkToNetworkInterconnectInner.class, NetworkToNetworkInterconnectInner.class, 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. - * @param context The context to associate with this operation. + * @param properties 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. @@ -836,21 +673,19 @@ private Mono updateAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties) { + return beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, properties) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * 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 properties 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. @@ -858,19 +693,18 @@ private Mono updateAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner update(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body) { - return updateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).block(); + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties) { + return beginUpdate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, properties) + .getFinalResult(); } /** - * 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 properties 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. @@ -879,14 +713,12 @@ public NetworkToNetworkInterconnectInner update(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner update(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch body, Context context) { - return updateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) - .block(); + String networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch properties, Context context) { + return beginUpdate(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, properties, context) + .getFinalResult(); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -900,108 +732,58 @@ public NetworkToNetworkInterconnectInner update(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - 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.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + Context.NONE); } /** - * 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 PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + 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 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. @@ -1009,17 +791,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, Context context) { - context = this.client.mergeContext(context); + String networkToNetworkInterconnectName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); + = deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1033,13 +812,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - return this.beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1054,13 +832,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @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(); + Response response + = deleteWithResponse(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1079,29 +856,6 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricNam } /** - * 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. @@ -1113,12 +867,10 @@ private Mono deleteAsync(String resourceGroupName, String networkFabricNam */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName).block(); + beginDelete(resourceGroupName, networkFabricName, networkToNetworkInterconnectName).getFinalResult(); } /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1132,12 +884,10 @@ public void delete(String resourceGroupName, String networkFabricName, String ne @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { - deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).block(); + beginDelete(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).getFinalResult(); } /** - * 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. @@ -1145,83 +895,40 @@ public void delete(String resourceGroupName, String networkFabricName, 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 list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkToNetworkInterconnect list operation 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)) + .withContext(context -> service.listByNetworkFabric(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response of a NetworkToNetworkInterconnect list operation as paginated response with + * {@link PagedFlux}. */ - @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)); + @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. @@ -1229,18 +936,20 @@ public void delete(String resourceGroupName, String networkFabricName, 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 list of Network To Network Interconnects as paginated response with {@link PagedFlux}. + * @return the response of a NetworkToNetworkInterconnect list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkFabricAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkFabricSinglePage(String resourceGroupName, String networkFabricName) { - return new PagedFlux<>(() -> listByNetworkFabricSinglePageAsync(resourceGroupName, networkFabricName), - nextLink -> listByNetworkFabricNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res + = service.listByNetworkFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, Context.NONE); + return 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. @@ -1249,18 +958,20 @@ private PagedFlux listByNetworkFabricAsync(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 Network To Network Interconnects as paginated response with {@link PagedFlux}. + * @return the response of a NetworkToNetworkInterconnect list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetworkFabricAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkFabricSinglePage(String resourceGroupName, String networkFabricName, Context context) { - return new PagedFlux<>(() -> listByNetworkFabricSinglePageAsync(resourceGroupName, networkFabricName, context), - nextLink -> listByNetworkFabricNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listByNetworkFabricSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, accept, context); + return 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. @@ -1268,17 +979,17 @@ private PagedFlux listByNetworkFabricAsync(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 Network To Network Interconnects as paginated response with {@link PagedIterable}. + * @return the response of a NetworkToNetworkInterconnect list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName) { - return new PagedIterable<>(listByNetworkFabricAsync(resourceGroupName, networkFabricName)); + return new PagedIterable<>(() -> listByNetworkFabricSinglePage(resourceGroupName, networkFabricName), + nextLink -> listByNetworkFabricNextSinglePage(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. @@ -1287,18 +998,18 @@ public PagedIterable listByNetworkFabric(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response of a NetworkToNetworkInterconnect list operation 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)); + return new PagedIterable<>(() -> listByNetworkFabricSinglePage(resourceGroupName, networkFabricName, context), + nextLink -> listByNetworkFabricNextSinglePage(nextLink, context)); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1307,158 +1018,93 @@ public PagedIterable listByNetworkFabric(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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(); - } + private Mono>> updateAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, 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. + * 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + final String contentType = "application/json"; 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); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, 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); + 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, context); + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1467,23 +1113,23 @@ private Mono>> updateNpbStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, + beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return this - .beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1493,23 +1139,23 @@ private Mono>> updateNpbStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, String networkFabricName, + beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context) - .getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body, context); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1518,43 +1164,17 @@ private Mono>> updateNpbStaticRouteBfdAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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, + 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 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. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1563,20 +1183,17 @@ private Mono updateNpbStaticRouteBf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, - UpdateAdministrativeState body) { - return updateNpbStaticRouteBfdAdministrativeStateAsync(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body).block(); + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -1586,19 +1203,17 @@ public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdmini * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @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(); + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + Context context) { + return beginUpdateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body, context).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1608,156 +1223,90 @@ public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdmini * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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(); - } + private Mono>> updateBfdAdministrativeStateWithResponseAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.updateBfdAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, contentType, accept, body, 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 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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + final String contentType = "application/json"; 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); + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateBfdAdministrativeStateWithResponse(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateBfdAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + contentType, accept, body, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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); + private PollerFlux, NniBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeStateAsync(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + Mono>> mono = updateBfdAdministrativeStateWithResponseAsync(resourceGroupName, + networkFabricName, networkToNetworkInterconnectName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), NniBfdAdministrativeStateResponseInner.class, + NniBfdAdministrativeStateResponseInner.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. @@ -1767,22 +1316,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body) - .getSyncPoller(); + public SyncPoller, NniBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body); + return this.client.getLroResult( + response, NniBfdAdministrativeStateResponseInner.class, NniBfdAdministrativeStateResponseInner.class, + Context.NONE); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1793,22 +1340,20 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, CommonPostActionResponseForStateUpdateInner> - beginUpdateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body, context) - .getSyncPoller(); + public SyncPoller, NniBfdAdministrativeStateResponseInner> + beginUpdateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body, Context context) { + Response response = updateBfdAdministrativeStateWithResponse(resourceGroupName, networkFabricName, + networkToNetworkInterconnectName, body, context); + return this.client.getLroResult( + response, NniBfdAdministrativeStateResponseInner.class, NniBfdAdministrativeStateResponseInner.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. @@ -1818,41 +1363,16 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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, + private Mono updateBfdAdministrativeStateAsync(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeStateAsync(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. @@ -1862,18 +1382,16 @@ private Mono updateAdministrativeSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body).block(); + public NniBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + return beginUpdateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body).getFinalResult(); } /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1884,14 +1402,14 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + public NniBfdAdministrativeStateResponseInner updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, - body, context).block(); + return beginUpdateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, + body, context).getFinalResult(); } /** @@ -1901,19 +1419,12 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkToNetworkInterconnect list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNetworkFabricNextSinglePageAsync(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( @@ -1923,6 +1434,24 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(Str .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a NetworkToNetworkInterconnect list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNetworkFabricNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByNetworkFabricNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1931,23 +1460,15 @@ public CommonPostActionResponseForStateUpdateInner updateAdministrativeState(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 list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a NetworkToNetworkInterconnect list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByNetworkFabricNextSinglePageAsync(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.")); - } + private PagedResponse listByNetworkFabricNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNetworkFabricNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByNetworkFabricNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/NetworkToNetworkInterconnectsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java index b5e0f7c5134d..2c21677e05f3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -12,9 +12,12 @@ 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.fluent.models.NniBfdAdministrativeStateResponseInner; 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.NniBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateResponse; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; public final class NetworkToNetworkInterconnectsImpl implements NetworkToNetworkInterconnects { @@ -22,10 +25,10 @@ public final class NetworkToNetworkInterconnectsImpl implements NetworkToNetwork private final NetworkToNetworkInterconnectsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public NetworkToNetworkInterconnectsImpl(NetworkToNetworkInterconnectsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -78,11 +81,10 @@ public PagedIterable listByNetworkFabric(String re inner1 -> new NetworkToNetworkInterconnectImpl(inner1, this.manager())); } - public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body); + .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); if (inner != null) { return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { @@ -90,12 +92,12 @@ public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrat } } - public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, + public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context) { CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateNpbStaticRouteBfdAdministrativeState(resourceGroupName, networkFabricName, - networkToNetworkInterconnectName, body, context); + .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, + context); if (inner != null) { return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { @@ -103,25 +105,25 @@ public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrat } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + public NniBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body) { + NniBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NniBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } } - public CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, + public NniBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String networkFabricName, String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body, Context context) { - CommonPostActionResponseForStateUpdateInner inner = this.serviceClient() - .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, + NniBfdAdministrativeStateResponseInner inner = this.serviceClient() + .updateBfdAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); if (inner != null) { - return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + return new NniBfdAdministrativeStateResponseImpl(inner, this.manager()); } else { return null; } @@ -213,7 +215,7 @@ private NetworkToNetworkInterconnectsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniBfdAdministrativeStateResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniBfdAdministrativeStateResponseImpl.java new file mode 100644 index 000000000000..c4f2968d5a56 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniBfdAdministrativeStateResponseImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniBfdAdministrativeStateResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateResponse; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; + +public final class NniBfdAdministrativeStateResponseImpl implements NniBfdAdministrativeStateResponse { + private NniBfdAdministrativeStateResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + NniBfdAdministrativeStateResponseImpl(NniBfdAdministrativeStateResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public RouteType routeType() { + return this.innerModel().routeType(); + } + + public BfdAdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public NniBfdAdministrativeStateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java index ffc5461f2b78..7e2be2c22944 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -13,10 +13,10 @@ public final class OperationImpl implements Operation { private OperationInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -45,7 +45,7 @@ public OperationInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java index 0801f14c64aa..5bd391f8b374 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner; -import com.azure.resourcemanager.managednetworkfabric.models.OperationListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -42,31 +42,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + OperationsClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiOperations to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientOperations to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ManagedNetworkFabric/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.ManagedNetworkFabric/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,11 +81,18 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Returns list of all operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -87,10 +101,6 @@ Mono> listNext(@PathParam(value = "nextLink", enco */ @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.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -101,59 +111,54 @@ private Mono> listSinglePageAsync() { } /** - * Returns list of all operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Returns list of all operations. + * List the operations for the provider. * * @throws 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 list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns list of all operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -162,11 +167,11 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +182,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -192,13 +197,6 @@ public PagedIterable list(Context context) { */ @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)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -206,6 +204,24 @@ private Mono> listNextSinglePageAsync(String nextL .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -214,22 +230,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/OperationsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java index 1aeb4170a5ee..3a2443183fdf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -17,10 +17,10 @@ public final class OperationsImpl implements Operations { private final OperationsClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -39,7 +39,7 @@ private OperationsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java index b5006248fb18..d3a16a3e44fe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; 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 ab525542b1f5..76f9920727df 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -38,7 +39,7 @@ 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.implementation.models.RoutePolicyListResult; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; @@ -57,101 +58,175 @@ public final class RoutePoliciesClientImpl implements RoutePoliciesClient { /** * The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; + private final FilesharesManagementClientImpl client; /** * Initializes an instance of RoutePoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - RoutePoliciesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + RoutePoliciesClientImpl(FilesharesManagementClientImpl client) { this.service = RestProxy.create(RoutePoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiRoutePolicies to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for FilesharesManagementClientRoutePolicies to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") + @Host("{endpoint}") + @ServiceInterface(name = "FilesharesManagementClientRoutePolicies") public interface RoutePoliciesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("routePolicyName") String routePolicyName, @BodyParam("application/json") RoutePolicyInner body, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyInner resource, + Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") @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("routePolicyName") String routePolicyName, @BodyParam("application/json") RoutePolicyPatch body, - @HeaderParam("Accept") String accept, Context context); + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyPatch properties, + Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RoutePolicyPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") @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("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies") @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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, + Context context); + @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, + Response updateAdministrativeStateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateAdministrativeState body, 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, + Mono>> validateConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}/validateConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("routePolicyName") String routePolicyName, @HeaderParam("Accept") String accept, Context context); @@ -159,419 +234,307 @@ Mono>> validateConfiguration(@HostParam("$host") Strin @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, + Mono>> commitConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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) + Response commitConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("routePolicyName") String routePolicyName, @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("endpoint") String endpoint, + @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, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @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 RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyInner 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(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String routePolicyName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, body, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @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 RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyInner 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, body, accept, context); - } - - /** - * Create Route Policy. - * - * Implements Route Policy PUT method. - * - * @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 the RoutePolicy resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoutePolicyInner> beginCreateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyInner body) { - Mono>> mono = createWithResponseAsync(resourceGroupName, routePolicyName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); + private Mono getByResourceGroupAsync(String resourceGroupName, String routePolicyName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, routePolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @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 the RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoutePolicyInner> beginCreateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, routePolicyName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context); } /** - * Create Route Policy. - * - * Implements Route Policy PUT method. + * Implements Route Policy GET method. * * @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 the RoutePolicy resource definition. + * @return the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body) { - return this.beginCreateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName) { + return getByResourceGroupWithResponse(resourceGroupName, routePolicyName, Context.NONE).getValue(); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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. + * @param resource 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 RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, - String routePolicyName, RoutePolicyInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, routePolicyName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String routePolicyName, + RoutePolicyInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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 resource 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 RoutePolicy resource definition on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String routePolicyName, - RoutePolicyInner body) { - return beginCreateAsync(resourceGroupName, routePolicyName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, resource, + Context.NONE); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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 resource 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 RoutePolicy resource definition on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String routePolicyName, RoutePolicyInner body, - Context context) { - return beginCreateAsync(resourceGroupName, routePolicyName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, resource, + context); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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 resource 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 RoutePolicy resource definition. + * @return the {@link PollerFlux} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body) { - return createAsync(resourceGroupName, routePolicyName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RoutePolicyInner> beginCreateAsync(String resourceGroupName, + String routePolicyName, RoutePolicyInner resource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, routePolicyName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); } /** - * Create Route Policy. - * * Implements Route Policy PUT method. * * @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. + * @param resource 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 RoutePolicy resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner body, - Context context) { - return createAsync(resourceGroupName, routePolicyName, body, context).block(); - } - - /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. - * - * @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 RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner resource) { + Response response = createWithResponse(resourceGroupName, routePolicyName, resource); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, Context.NONE); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param resource 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 RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of the RoutePolicy resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RoutePolicyInner> beginCreate(String resourceGroupName, + String routePolicyName, RoutePolicyInner resource, Context context) { + Response response = createWithResponse(resourceGroupName, routePolicyName, resource, context); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, context); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param resource 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 RoutePolicy resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String routePolicyName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, routePolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createAsync(String resourceGroupName, String routePolicyName, + RoutePolicyInner resource) { + return beginCreateAsync(resourceGroupName, routePolicyName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @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. + * @param resource 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 RoutePolicy resource definition along with {@link Response}. + * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String routePolicyName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, routePolicyName, context).block(); + public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner resource) { + return beginCreate(resourceGroupName, routePolicyName, resource).getFinalResult(); } /** - * Gets a Route Policy. - * - * Implements Route Policy GET method. + * Implements Route Policy PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. + * @param resource 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 RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner getByResourceGroup(String resourceGroupName, String routePolicyName) { - return getByResourceGroupWithResponse(resourceGroupName, routePolicyName, Context.NONE).getValue(); + public RoutePolicyInner create(String resourceGroupName, String routePolicyName, RoutePolicyInner resource, + Context context) { + return beginCreate(resourceGroupName, routePolicyName, resource, context).getFinalResult(); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -579,109 +542,65 @@ public RoutePolicyInner getByResourceGroup(String resourceGroupName, String rout */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyPatch 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(); - } + RoutePolicyPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. - * @param context The context to associate with this operation. + * @param properties Route Policy 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 RoutePolicy resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the RoutePolicy resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String routePolicyName, - RoutePolicyPatch 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(); - } + private Response updateWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyPatch properties) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, properties, + Context.NONE); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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 RoutePolicy resource definition. + * @return the RoutePolicy resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RoutePolicyInner> beginUpdateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, routePolicyName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String routePolicyName, + RoutePolicyPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, properties, + context); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. - * @param context The context to associate with this operation. + * @param properties Route Policy 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. @@ -689,22 +608,18 @@ private PollerFlux, RoutePolicyInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, RoutePolicyInner> beginUpdateAsync(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, routePolicyName, body, context); + String routePolicyName, RoutePolicyPatch properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, routePolicyName, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RoutePolicyInner.class, RoutePolicyInner.class, context); + RoutePolicyInner.class, RoutePolicyInner.class, this.client.getContext()); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -712,18 +627,18 @@ private PollerFlux, RoutePolicyInner> beginUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RoutePolicyInner> beginUpdate(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body) { - return this.beginUpdateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + String routePolicyName, RoutePolicyPatch properties) { + Response response = updateWithResponse(resourceGroupName, routePolicyName, properties); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, Context.NONE); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -732,18 +647,18 @@ public SyncPoller, RoutePolicyInner> beginUpdate(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RoutePolicyInner> beginUpdate(String resourceGroupName, - String routePolicyName, RoutePolicyPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, routePolicyName, body, context).getSyncPoller(); + String routePolicyName, RoutePolicyPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, routePolicyName, properties, context); + return this.client.getLroResult(response, RoutePolicyInner.class, + RoutePolicyInner.class, context); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -751,58 +666,33 @@ public SyncPoller, RoutePolicyInner> beginUpdate(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String routePolicyName, - RoutePolicyPatch body) { - return beginUpdateAsync(resourceGroupName, routePolicyName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a Route Policy. - * - * API to update certain properties of the Route Policy resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param routePolicyName Name of the Route Policy. - * @param body Route Policy 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 RoutePolicy resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, - Context context) { - return beginUpdateAsync(resourceGroupName, routePolicyName, body, context).last() + RoutePolicyPatch properties) { + return beginUpdateAsync(resourceGroupName, routePolicyName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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 RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body) { - return updateAsync(resourceGroupName, routePolicyName, body).block(); + public RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch properties) { + return beginUpdate(resourceGroupName, routePolicyName, properties).getFinalResult(); } /** - * Updates a Route Policy. - * * API to update certain properties of the Route Policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param routePolicyName Name of the Route Policy. - * @param body Route Policy properties to update. + * @param properties Route Policy 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. @@ -810,14 +700,12 @@ public RoutePolicyInner update(String resourceGroupName, String routePolicyName, * @return the RoutePolicy resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch body, + public RoutePolicyInner update(String resourceGroupName, String routePolicyName, RoutePolicyPatch properties, Context context) { - return updateAsync(resourceGroupName, routePolicyName, body, context).block(); + return beginUpdate(resourceGroupName, routePolicyName, properties, context).getFinalResult(); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -829,111 +717,63 @@ public RoutePolicyInner update(String resourceGroupName, String routePolicyName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), routePolicyName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @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 Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), routePolicyName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String routePolicyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, Context.NONE); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @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 long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String routePolicyName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, routePolicyName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String routePolicyName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, context); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String routePolicyName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, routePolicyName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String routePolicyName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, routePolicyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -945,12 +785,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName) { - return this.beginDeleteAsync(resourceGroupName, routePolicyName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, routePolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -964,12 +803,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String routePolicyName, Context context) { - return this.beginDeleteAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, routePolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -986,27 +824,6 @@ private Mono deleteAsync(String resourceGroupName, String routePolicyName) } /** - * Deletes a Route Policy. - * - * Implements Route Policy DELETE method. - * - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String routePolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, routePolicyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1017,12 +834,10 @@ private Mono deleteAsync(String resourceGroupName, String routePolicyName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String routePolicyName) { - deleteAsync(resourceGroupName, routePolicyName).block(); + beginDelete(resourceGroupName, routePolicyName).getFinalResult(); } /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1034,99 +849,64 @@ public void delete(String resourceGroupName, String routePolicyName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String routePolicyName, Context context) { - deleteAsync(resourceGroupName, routePolicyName, context).block(); + beginDelete(resourceGroupName, routePolicyName, context).getFinalResult(); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 RoutePolicies by resource group. - * * Implements RoutePolicies 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedFlux}. + * @return the response of a RoutePolicy list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1134,33 +914,33 @@ 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 RoutePolicies as paginated response with {@link PagedFlux}. + * @return the response of a RoutePolicy list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1168,136 +948,108 @@ 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedFlux}. + * @return the response of a RoutePolicy list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedFlux}. + * @return the response of a RoutePolicy list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, 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. @@ -1306,141 +1058,87 @@ 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 common response for device updates along with {@link Response} on successful completion of {@link Mono}. + * @return the response body 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 contentType = "application/json"; 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)) + .withContext(context -> service.updateAdministrativeState(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, routePolicyName, + contentType, accept, body, 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}. + * @return the response body along with {@link Response}. */ @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(); - } + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body) { + final String contentType = "application/json"; 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); + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, + Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateAdministrativeStateWithResponse(String resourceGroupName, String routePolicyName, + UpdateAdministrativeState body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateAdministrativeStateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, contentType, accept, body, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeStateAsync(String resourceGroupName, String routePolicyName, - UpdateAdministrativeState body, Context context) { - context = this.client.mergeContext(context); + UpdateAdministrativeState body) { Mono>> mono - = updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body, context); + = updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForDeviceUpdateInner.class, - CommonPostActionResponseForDeviceUpdateInner.class, context); + 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. @@ -1449,19 +1147,21 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + Response response = updateAdministrativeStateWithResponse(resourceGroupName, routePolicyName, body); + return this.client + .getLroResult( + response, CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, Context.NONE); } /** - * 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. @@ -1471,20 +1171,22 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForDeviceUpdateInner> beginUpdateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { - return this.beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context) - .getSyncPoller(); + Response response + = updateAdministrativeStateWithResponse(resourceGroupName, routePolicyName, body, context); + return this.client + .getLroResult( + response, 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. @@ -1493,7 +1195,7 @@ private Mono>> updateAdministrativeStateWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAdministrativeStateAsync(String resourceGroupName, @@ -1503,29 +1205,6 @@ private Mono updateAdministrativeS } /** - * 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. @@ -1534,17 +1213,15 @@ private Mono updateAdministrativeS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { - return updateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).block(); + return beginUpdateAdministrativeState(resourceGroupName, routePolicyName, body).getFinalResult(); } /** - * 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. @@ -1554,12 +1231,12 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 common response for device updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { - return updateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context).block(); + return beginUpdateAdministrativeState(resourceGroupName, routePolicyName, body, context).getFinalResult(); } /** @@ -1570,33 +1247,16 @@ public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState(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 response of the action validate configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body 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)) + context -> service.validateConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1605,36 +1265,16 @@ private Mono>> validateConfigurationWithResponseAsync( * * @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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response validateConfigurationWithResponse(String resourceGroupName, String routePolicyName) { 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); + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, Context.NONE); } /** @@ -1642,19 +1282,18 @@ private Mono>> validateConfigurationWithResponseAsync( * * @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. + * @return the response body along with {@link Response}. */ - @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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateConfigurationWithResponse(String resourceGroupName, String routePolicyName, + Context context) { + final String accept = "application/json"; + return service.validateConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, context); } /** @@ -1662,21 +1301,19 @@ private Mono>> validateConfigurationWithResponseAsync( * * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateConfigurationResponseInner> - beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName, Context context) { - context = this.client.mergeContext(context); + beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName) { Mono>> mono - = validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName, context); + = validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ValidateConfigurationResponseInner.class, - ValidateConfigurationResponseInner.class, context); + ValidateConfigurationResponseInner.class, this.client.getContext()); } /** @@ -1687,12 +1324,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String routePolicyName) { - return this.beginValidateConfigurationAsync(resourceGroupName, routePolicyName).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, routePolicyName); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, Context.NONE); } /** @@ -1704,12 +1343,14 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateConfigurationResponseInner> beginValidateConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return this.beginValidateConfigurationAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + Response response = validateConfigurationWithResponse(resourceGroupName, routePolicyName, context); + return this.client.getLroResult( + response, ValidateConfigurationResponseInner.class, ValidateConfigurationResponseInner.class, context); } /** @@ -1720,7 +1361,7 @@ private Mono>> validateConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateConfigurationAsync(String resourceGroupName, @@ -1729,24 +1370,6 @@ private Mono validateConfigurationAsync(Stri .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. * @@ -1755,11 +1378,11 @@ private Mono validateConfigurationAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName) { - return validateConfigurationAsync(resourceGroupName, routePolicyName).block(); + return beginValidateConfiguration(resourceGroupName, routePolicyName).getFinalResult(); } /** @@ -1771,17 +1394,15 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return validateConfigurationAsync(resourceGroupName, routePolicyName, context).block(); + return beginValidateConfiguration(resourceGroupName, routePolicyName, context).getFinalResult(); } /** - * 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. @@ -1789,128 +1410,77 @@ public ValidateConfigurationResponseInner validateConfiguration(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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}. + * @return the response body 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)) + .withContext(context -> service.commitConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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}. + * @return the response body along with {@link Response}. */ @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.")); - } + private Response commitConfigurationWithResponse(String resourceGroupName, String routePolicyName) { 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); + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, routePolicyName, accept, Context.NONE); } /** - * 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, 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()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response commitConfigurationWithResponse(String resourceGroupName, String routePolicyName, + Context context) { + final String accept = "application/json"; + return service.commitConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CommonPostActionResponseForStateUpdateInner> - beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName, Context context) { - context = this.client.mergeContext(context); + beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName) { Mono>> mono - = commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName, context); + = commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName); return this.client .getLroResult( mono, this.client.getHttpPipeline(), CommonPostActionResponseForStateUpdateInner.class, - CommonPostActionResponseForStateUpdateInner.class, context); + 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. @@ -1918,18 +1488,20 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String routePolicyName) { - return this.beginCommitConfigurationAsync(resourceGroupName, routePolicyName).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, routePolicyName); + return this.client + .getLroResult( + response, CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, Context.NONE); } /** - * 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. @@ -1938,18 +1510,20 @@ private Mono>> commitConfigurationWithResponseAsync(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 {@link SyncPoller} for polling of common response for the state updates. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CommonPostActionResponseForStateUpdateInner> beginCommitConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return this.beginCommitConfigurationAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + Response response = commitConfigurationWithResponse(resourceGroupName, routePolicyName, context); + return this.client + .getLroResult( + response, 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. @@ -1957,7 +1531,7 @@ private Mono>> commitConfigurationWithResponseAsync(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 common response for the state updates on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitConfigurationAsync(String resourceGroupName, @@ -1967,28 +1541,6 @@ private Mono commitConfigurationAsy } /** - * 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. @@ -1996,17 +1548,15 @@ private Mono commitConfigurationAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName) { - return commitConfigurationAsync(resourceGroupName, routePolicyName).block(); + return beginCommitConfiguration(resourceGroupName, routePolicyName).getFinalResult(); } /** - * 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. @@ -2015,12 +1565,12 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(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 common response for the state updates. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName, Context context) { - return commitConfigurationAsync(resourceGroupName, routePolicyName, context).block(); + return beginCommitConfiguration(resourceGroupName, routePolicyName, context).getFinalResult(); } /** @@ -2030,17 +1580,11 @@ public CommonPostActionResponseForStateUpdateInner commitConfiguration(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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation 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( @@ -2050,6 +1594,24 @@ private Mono> listByResourceGroupNextSinglePageA .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a RoutePolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2058,23 +1620,15 @@ 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2084,17 +1638,11 @@ 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation 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( @@ -2104,6 +1652,24 @@ private Mono> listBySubscriptionNextSinglePageAs .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a RoutePolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2112,22 +1678,14 @@ 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 RoutePolicies along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a RoutePolicy list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/RoutePoliciesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java index 9792a1f9219a..40320cf6184b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -26,10 +26,10 @@ public final class RoutePoliciesImpl implements RoutePolicies { private final RoutePoliciesClient innerClient; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public RoutePoliciesImpl(RoutePoliciesClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -208,7 +208,7 @@ private RoutePoliciesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } 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 4906b5f3ebe0..d0302d582c5c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -8,26 +8,21 @@ 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.CommunityActionTypes; -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.RoutePolicyPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyProperties; 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 RoutePolicyImpl implements RoutePolicy, RoutePolicy.Definition, RoutePolicy.Update { private RoutePolicyInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; public String id() { return this.innerModel().id(); @@ -54,45 +49,12 @@ public Map tags() { } } - 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 CommunityActionTypes defaultAction() { - return this.innerModel().defaultAction(); - } - - public List statements() { - List inner = this.innerModel().statements(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public RoutePolicyProperties properties() { + return this.innerModel().properties(); } - public String annotation() { - return this.innerModel().annotation(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -111,7 +73,7 @@ public RoutePolicyInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } @@ -119,7 +81,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String routePolicyName; - private RoutePolicyPatch updateBody; + private RoutePolicyPatch updateProperties; public RoutePolicyImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -140,34 +102,33 @@ public RoutePolicy create(Context context) { return this; } - RoutePolicyImpl(String name, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + RoutePolicyImpl(String name, com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = new RoutePolicyInner(); this.serviceManager = serviceManager; this.routePolicyName = name; } public RoutePolicyImpl update() { - this.updateBody = new RoutePolicyPatch(); + this.updateProperties = new RoutePolicyPatch(); return this; } public RoutePolicy apply() { this.innerObject = serviceManager.serviceClient() .getRoutePolicies() - .update(resourceGroupName, routePolicyName, updateBody, Context.NONE); + .update(resourceGroupName, routePolicyName, updateProperties, Context.NONE); return this; } public RoutePolicy apply(Context context) { this.innerObject = serviceManager.serviceClient() .getRoutePolicies() - .update(resourceGroupName, routePolicyName, updateBody, context); + .update(resourceGroupName, routePolicyName, updateProperties, context); return this; } RoutePolicyImpl(RoutePolicyInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -226,8 +187,8 @@ public RoutePolicyImpl withRegion(String location) { return this; } - public RoutePolicyImpl withNetworkFabricId(String networkFabricId) { - this.innerModel().withNetworkFabricId(networkFabricId); + public RoutePolicyImpl withProperties(RoutePolicyProperties properties) { + this.innerModel().withProperties(properties); return this; } @@ -236,42 +197,17 @@ public RoutePolicyImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateBody.withTags(tags); - return this; - } - } - - public RoutePolicyImpl withAddressFamilyType(AddressFamilyType addressFamilyType) { - this.innerModel().withAddressFamilyType(addressFamilyType); - return this; - } - - public RoutePolicyImpl withDefaultAction(CommunityActionTypes defaultAction) { - if (isInCreateMode()) { - this.innerModel().withDefaultAction(defaultAction); - return this; - } else { - this.updateBody.withDefaultAction(defaultAction); - return this; - } - } - - public RoutePolicyImpl withStatements(List statements) { - if (isInCreateMode()) { - this.innerModel().withStatements(statements); - return this; - } else { - this.updateBody.withStatements(statements); + this.updateProperties.withTags(tags); return this; } } - public RoutePolicyImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public RoutePolicyImpl withProperties(RoutePolicyPatchableProperties properties) { + this.updateProperties.withProperties(properties); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java index 03ceb17730e0..6878c2a2e5b5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.implementation; @@ -12,14 +12,18 @@ public final class ValidateConfigurationResponseImpl implements ValidateConfigurationResponse { private ValidateConfigurationResponseInner innerObject; - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; ValidateConfigurationResponseImpl(ValidateConfigurationResponseInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } + public ManagementError error() { + return this.innerModel().error(); + } + public ConfigurationState configurationState() { return this.innerModel().configurationState(); } @@ -28,15 +32,11 @@ public String url() { return this.innerModel().url(); } - public ManagementError error() { - return this.innerModel().error(); - } - public ValidateConfigurationResponseInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { return this.serviceManager; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationResponseImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationResponseImpl.java new file mode 100644 index 000000000000..03891e3ffafb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationResponseImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.ViewDeviceConfigurationResponse; + +public final class ViewDeviceConfigurationResponseImpl implements ViewDeviceConfigurationResponse { + private ViewDeviceConfigurationResponseInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager; + + ViewDeviceConfigurationResponseImpl(ViewDeviceConfigurationResponseInner innerObject, + com.azure.resourcemanager.managednetworkfabric.FilesharesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String deviceConfigurationUrl() { + return this.innerModel().deviceConfigurationUrl(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public ViewDeviceConfigurationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListListResult.java new file mode 100644 index 000000000000..11eea08e84b0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a AccessControlList list operation. + */ +@Immutable +public final class AccessControlListListResult implements JsonSerializable { + /* + * The AccessControlList items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of AccessControlListListResult class. + */ + private AccessControlListListResult() { + } + + /** + * Get the value property: The AccessControlList items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AccessControlListListResult. + */ + public static AccessControlListListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListListResult deserializedAccessControlListListResult = new AccessControlListListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AccessControlListInner.fromJson(reader1)); + deserializedAccessControlListListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAccessControlListListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworkListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworkListResult.java new file mode 100644 index 000000000000..21c7ec0d2e09 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworkListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExternalNetwork list operation. + */ +@Immutable +public final class ExternalNetworkListResult implements JsonSerializable { + /* + * The ExternalNetwork items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExternalNetworkListResult class. + */ + private ExternalNetworkListResult() { + } + + /** + * Get the value property: The ExternalNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExternalNetworkListResult. + */ + public static ExternalNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkListResult deserializedExternalNetworkListResult = new ExternalNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExternalNetworkInner.fromJson(reader1)); + deserializedExternalNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExternalNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworkListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworkListResult.java new file mode 100644 index 000000000000..8e7b995e63f8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworkListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a InternalNetwork list operation. + */ +@Immutable +public final class InternalNetworkListResult implements JsonSerializable { + /* + * The InternalNetwork items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InternalNetworkListResult class. + */ + private InternalNetworkListResult() { + } + + /** + * Get the value property: The InternalNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InternalNetworkListResult. + */ + public static InternalNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkListResult deserializedInternalNetworkListResult = new InternalNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InternalNetworkInner.fromJson(reader1)); + deserializedInternalNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInternalNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayListResult.java new file mode 100644 index 000000000000..7238a56fd4ed --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a InternetGateway list operation. + */ +@Immutable +public final class InternetGatewayListResult implements JsonSerializable { + /* + * The InternetGateway items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InternetGatewayListResult class. + */ + private InternetGatewayListResult() { + } + + /** + * Get the value property: The InternetGateway items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternetGatewayListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternetGatewayListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InternetGatewayListResult. + */ + public static InternetGatewayListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternetGatewayListResult deserializedInternetGatewayListResult = new InternetGatewayListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InternetGatewayInner.fromJson(reader1)); + deserializedInternetGatewayListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInternetGatewayListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInternetGatewayListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRuleListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRuleListResult.java new file mode 100644 index 000000000000..c5b00b48f78b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRuleListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a InternetGatewayRule list operation. + */ +@Immutable +public final class InternetGatewayRuleListResult implements JsonSerializable { + /* + * The InternetGatewayRule items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InternetGatewayRuleListResult class. + */ + private InternetGatewayRuleListResult() { + } + + /** + * Get the value property: The InternetGatewayRule items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternetGatewayRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternetGatewayRuleListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InternetGatewayRuleListResult. + */ + public static InternetGatewayRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternetGatewayRuleListResult deserializedInternetGatewayRuleListResult + = new InternetGatewayRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InternetGatewayRuleInner.fromJson(reader1)); + deserializedInternetGatewayRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInternetGatewayRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInternetGatewayRuleListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunityListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunityListResult.java new file mode 100644 index 000000000000..7adad9bcb088 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunityListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a IpCommunity list operation. + */ +@Immutable +public final class IpCommunityListResult implements JsonSerializable { + /* + * The IpCommunity items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of IpCommunityListResult class. + */ + private IpCommunityListResult() { + } + + /** + * Get the value property: The IpCommunity items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpCommunityListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpCommunityListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IpCommunityListResult. + */ + public static IpCommunityListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpCommunityListResult deserializedIpCommunityListResult = new IpCommunityListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> IpCommunityInner.fromJson(reader1)); + deserializedIpCommunityListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIpCommunityListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIpCommunityListResult; + }); + } +} 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/implementation/models/IpExtendedCommunityListResult.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpExtendedCommunityListResult.java index 6af8cade3c43..6c818eba64b0 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/implementation/models/IpExtendedCommunityListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of IP Extended Communities. + * The response of a IpExtendedCommunity list operation. */ -@Fluent +@Immutable public final class IpExtendedCommunityListResult implements JsonSerializable { /* - * List of IP Extended Communities resources. + * The IpExtendedCommunity items on this page */ private List value; /* - * Url to follow for getting next page of resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of IpExtendedCommunityListResult class. */ - public IpExtendedCommunityListResult() { + private IpExtendedCommunityListResult() { } /** - * Get the value property: List of IP Extended Communities resources. + * Get the value property: The IpExtendedCommunity items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of IP Extended Communities resources. - * - * @param value the value value to set. - * @return the IpExtendedCommunityListResult object itself. - */ - public IpExtendedCommunityListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Url to follow for getting next page of resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ 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 IpExtendedCommunityListResult object itself. - */ - public IpExtendedCommunityListResult 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()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpExtendedCommunityListResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpExtendedCommunityListResult. */ public static IpExtendedCommunityListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixListResult.java new file mode 100644 index 000000000000..1e97b2411af8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a IpPrefix list operation. + */ +@Immutable +public final class IpPrefixListResult implements JsonSerializable { + /* + * The IpPrefix items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of IpPrefixListResult class. + */ + private IpPrefixListResult() { + } + + /** + * Get the value property: The IpPrefix items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpPrefixListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpPrefixListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IpPrefixListResult. + */ + public static IpPrefixListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpPrefixListResult deserializedIpPrefixListResult = new IpPrefixListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> IpPrefixInner.fromJson(reader1)); + deserializedIpPrefixListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIpPrefixListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIpPrefixListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainListResult.java new file mode 100644 index 000000000000..4a8b6211f00c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a L2IsolationDomain list operation. + */ +@Immutable +public final class L2IsolationDomainListResult implements JsonSerializable { + /* + * The L2IsolationDomain items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of L2IsolationDomainListResult class. + */ + private L2IsolationDomainListResult() { + } + + /** + * Get the value property: The L2IsolationDomain items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L2IsolationDomainListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L2IsolationDomainListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the L2IsolationDomainListResult. + */ + public static L2IsolationDomainListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L2IsolationDomainListResult deserializedL2IsolationDomainListResult = new L2IsolationDomainListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> L2IsolationDomainInner.fromJson(reader1)); + deserializedL2IsolationDomainListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedL2IsolationDomainListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedL2IsolationDomainListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainListResult.java new file mode 100644 index 000000000000..a5808142d7a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a L3IsolationDomain list operation. + */ +@Immutable +public final class L3IsolationDomainListResult implements JsonSerializable { + /* + * The L3IsolationDomain items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of L3IsolationDomainListResult class. + */ + private L3IsolationDomainListResult() { + } + + /** + * Get the value property: The L3IsolationDomain items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3IsolationDomainListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3IsolationDomainListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the L3IsolationDomainListResult. + */ + public static L3IsolationDomainListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3IsolationDomainListResult deserializedL3IsolationDomainListResult = new L3IsolationDomainListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> L3IsolationDomainInner.fromJson(reader1)); + deserializedL3IsolationDomainListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedL3IsolationDomainListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedL3IsolationDomainListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupListResult.java new file mode 100644 index 000000000000..fd4eec0fa007 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NeighborGroup list operation. + */ +@Immutable +public final class NeighborGroupListResult implements JsonSerializable { + /* + * The NeighborGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NeighborGroupListResult class. + */ + private NeighborGroupListResult() { + } + + /** + * Get the value property: The NeighborGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborGroupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NeighborGroupListResult. + */ + public static NeighborGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborGroupListResult deserializedNeighborGroupListResult = new NeighborGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NeighborGroupInner.fromJson(reader1)); + deserializedNeighborGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNeighborGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborGroupListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceListResult.java new file mode 100644 index 000000000000..b3af84140f0d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkDevice list operation. + */ +@Immutable +public final class NetworkDeviceListResult implements JsonSerializable { + /* + * The NetworkDevice items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkDeviceListResult class. + */ + private NetworkDeviceListResult() { + } + + /** + * Get the value property: The NetworkDevice items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceListResult. + */ + public static NetworkDeviceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceListResult deserializedNetworkDeviceListResult = new NetworkDeviceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NetworkDeviceInner.fromJson(reader1)); + deserializedNetworkDeviceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkDeviceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkuListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkuListResult.java new file mode 100644 index 000000000000..846f03a2b403 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkuListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkDeviceSku list operation. + */ +@Immutable +public final class NetworkDeviceSkuListResult implements JsonSerializable { + /* + * The NetworkDeviceSku items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkDeviceSkuListResult class. + */ + private NetworkDeviceSkuListResult() { + } + + /** + * Get the value property: The NetworkDeviceSku items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkDeviceSkuListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkDeviceSkuListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkDeviceSkuListResult. + */ + public static NetworkDeviceSkuListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkDeviceSkuListResult deserializedNetworkDeviceSkuListResult = new NetworkDeviceSkuListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkDeviceSkuInner.fromJson(reader1)); + deserializedNetworkDeviceSkuListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkDeviceSkuListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkDeviceSkuListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllerListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllerListResult.java new file mode 100644 index 000000000000..960edf0a97ff --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllerListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkFabricController list operation. + */ +@Immutable +public final class NetworkFabricControllerListResult implements JsonSerializable { + /* + * The NetworkFabricController items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkFabricControllerListResult class. + */ + private NetworkFabricControllerListResult() { + } + + /** + * Get the value property: The NetworkFabricController items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricControllerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricControllerListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricControllerListResult. + */ + public static NetworkFabricControllerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricControllerListResult deserializedNetworkFabricControllerListResult + = new NetworkFabricControllerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkFabricControllerInner.fromJson(reader1)); + deserializedNetworkFabricControllerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkFabricControllerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricControllerListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricListResult.java new file mode 100644 index 000000000000..1240bd87cc16 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkFabric list operation. + */ +@Immutable +public final class NetworkFabricListResult implements JsonSerializable { + /* + * The NetworkFabric items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkFabricListResult class. + */ + private NetworkFabricListResult() { + } + + /** + * Get the value property: The NetworkFabric items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricListResult. + */ + public static NetworkFabricListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricListResult deserializedNetworkFabricListResult = new NetworkFabricListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NetworkFabricInner.fromJson(reader1)); + deserializedNetworkFabricListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkFabricListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkuListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkuListResult.java new file mode 100644 index 000000000000..79ab2631ded1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkuListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkFabricSku list operation. + */ +@Immutable +public final class NetworkFabricSkuListResult implements JsonSerializable { + /* + * The NetworkFabricSku items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkFabricSkuListResult class. + */ + private NetworkFabricSkuListResult() { + } + + /** + * Get the value property: The NetworkFabricSku items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricSkuListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricSkuListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkFabricSkuListResult. + */ + public static NetworkFabricSkuListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricSkuListResult deserializedNetworkFabricSkuListResult = new NetworkFabricSkuListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkFabricSkuInner.fromJson(reader1)); + deserializedNetworkFabricSkuListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkFabricSkuListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricSkuListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfaceListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfaceListResult.java new file mode 100644 index 000000000000..e91930fc66d6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfaceListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkInterface list operation. + */ +@Immutable +public final class NetworkInterfaceListResult implements JsonSerializable { + /* + * The NetworkInterface items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkInterfaceListResult class. + */ + private NetworkInterfaceListResult() { + } + + /** + * Get the value property: The NetworkInterface items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkInterfaceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkInterfaceListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkInterfaceListResult. + */ + public static NetworkInterfaceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkInterfaceListResult deserializedNetworkInterfaceListResult = new NetworkInterfaceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkInterfaceInner.fromJson(reader1)); + deserializedNetworkInterfaceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkInterfaceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkInterfaceListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java new file mode 100644 index 000000000000..6076d36cc0a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkMonitor list operation. + */ +@Immutable +public final class NetworkMonitorListResult implements JsonSerializable { + /* + * The NetworkMonitor items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkMonitorListResult class. + */ + private NetworkMonitorListResult() { + } + + /** + * Get the value property: The NetworkMonitor items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkMonitorListResult. + */ + public static NetworkMonitorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorListResult deserializedNetworkMonitorListResult = new NetworkMonitorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkMonitorInner.fromJson(reader1)); + deserializedNetworkMonitorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkMonitorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokerListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokerListResult.java new file mode 100644 index 000000000000..838ba8ee5eab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokerListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkPacketBroker list operation. + */ +@Immutable +public final class NetworkPacketBrokerListResult implements JsonSerializable { + /* + * The NetworkPacketBroker items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkPacketBrokerListResult class. + */ + private NetworkPacketBrokerListResult() { + } + + /** + * Get the value property: The NetworkPacketBroker items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkPacketBrokerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkPacketBrokerListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkPacketBrokerListResult. + */ + public static NetworkPacketBrokerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkPacketBrokerListResult deserializedNetworkPacketBrokerListResult + = new NetworkPacketBrokerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkPacketBrokerInner.fromJson(reader1)); + deserializedNetworkPacketBrokerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkPacketBrokerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkPacketBrokerListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRackListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRackListResult.java new file mode 100644 index 000000000000..7be00f819345 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRackListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkRack list operation. + */ +@Immutable +public final class NetworkRackListResult implements JsonSerializable { + /* + * The NetworkRack items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkRackListResult class. + */ + private NetworkRackListResult() { + } + + /** + * Get the value property: The NetworkRack items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkRackListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkRackListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkRackListResult. + */ + public static NetworkRackListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkRackListResult deserializedNetworkRackListResult = new NetworkRackListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NetworkRackInner.fromJson(reader1)); + deserializedNetworkRackListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkRackListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkRackListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapListResult.java new file mode 100644 index 000000000000..e3bf613d6eac --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkTap list operation. + */ +@Immutable +public final class NetworkTapListResult implements JsonSerializable { + /* + * The NetworkTap items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkTapListResult class. + */ + private NetworkTapListResult() { + } + + /** + * Get the value property: The NetworkTap items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkTapListResult. + */ + public static NetworkTapListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapListResult deserializedNetworkTapListResult = new NetworkTapListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NetworkTapInner.fromJson(reader1)); + deserializedNetworkTapListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkTapListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRuleListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRuleListResult.java new file mode 100644 index 000000000000..863909f82722 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRuleListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkTapRule list operation. + */ +@Immutable +public final class NetworkTapRuleListResult implements JsonSerializable { + /* + * The NetworkTapRule items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkTapRuleListResult class. + */ + private NetworkTapRuleListResult() { + } + + /** + * Get the value property: The NetworkTapRule items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkTapRuleListResult. + */ + public static NetworkTapRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleListResult deserializedNetworkTapRuleListResult = new NetworkTapRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkTapRuleInner.fromJson(reader1)); + deserializedNetworkTapRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkTapRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectListResult.java new file mode 100644 index 000000000000..00161bfd0495 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectListResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a NetworkToNetworkInterconnect list operation. + */ +@Immutable +public final class NetworkToNetworkInterconnectListResult + implements JsonSerializable { + /* + * The NetworkToNetworkInterconnect items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkToNetworkInterconnectListResult class. + */ + private NetworkToNetworkInterconnectListResult() { + } + + /** + * Get the value property: The NetworkToNetworkInterconnect items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkToNetworkInterconnectListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkToNetworkInterconnectListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectListResult. + */ + public static NetworkToNetworkInterconnectListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkToNetworkInterconnectListResult deserializedNetworkToNetworkInterconnectListResult + = new NetworkToNetworkInterconnectListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkToNetworkInterconnectInner.fromJson(reader1)); + deserializedNetworkToNetworkInterconnectListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkToNetworkInterconnectListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java similarity index 78% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java index 7d07f0bd3c34..877e09f402ef 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.models; +package com.azure.resourcemanager.managednetworkfabric.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -20,23 +20,23 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,23 +53,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -79,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePolicyListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePolicyListResult.java new file mode 100644 index 000000000000..d617bd6997d4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePolicyListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a RoutePolicy list operation. + */ +@Immutable +public final class RoutePolicyListResult implements JsonSerializable { + /* + * The RoutePolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RoutePolicyListResult class. + */ + private RoutePolicyListResult() { + } + + /** + * Get the value property: The RoutePolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePolicyListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoutePolicyListResult. + */ + public static RoutePolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePolicyListResult deserializedRoutePolicyListResult = new RoutePolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> RoutePolicyInner.fromJson(reader1)); + deserializedRoutePolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRoutePolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePolicyListResult; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java index 828b83b30751..047b765e84cf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureNetworkFabricManagementServiceApi. + * Package containing the implementations for Fileshares. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.implementation; 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 04e3d0af93bb..4a859795584d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,8 +8,6 @@ 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; /** @@ -52,82 +50,18 @@ public interface AccessControlList { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the lastSyncedTime property: The last synced 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. + * Gets the properties property: The Access ControlList properties. * - * @return the administrativeState value. + * @return the properties value. */ - AdministrativeState administrativeState(); + AccessControlListProperties properties(); /** - * 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 defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - CommunityActionTypes defaultAction(); - - /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -161,7 +95,7 @@ public interface AccessControlList { * The entirety of the AccessControlList definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -205,16 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the AccessControlList definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The Access ControlList properties. + * + * @param properties The Access ControlList properties. + * @return the next definition stage. + */ + WithCreate withProperties(AccessControlListProperties properties); } /** * 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.WithConfigurationType, - DefinitionStages.WithAclsUrl, DefinitionStages.WithDefaultAction, DefinitionStages.WithMatchConfigurations, - DefinitionStages.WithDynamicMatchConfigurations, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -243,86 +188,6 @@ 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 defaultAction. - */ - interface WithDefaultAction { - /** - * Specifies the defaultAction property: Default action that needs to be applied when no condition is - * matched. Example: Permit | Deny.. - * - * @param defaultAction Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * @return the next definition stage. - */ - WithCreate withDefaultAction(CommunityActionTypes defaultAction); - } - - /** - * 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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -335,9 +200,7 @@ interface WithAnnotation { /** * The template for AccessControlList update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithAnnotation, UpdateStages.WithConfigurationType, - UpdateStages.WithAclsUrl, UpdateStages.WithDefaultAction, UpdateStages.WithMatchConfigurations, - UpdateStages.WithDynamicMatchConfigurations { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -363,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -372,83 +235,16 @@ interface WithTags { } /** - * The stage of the AccessControlList 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 AccessControlList update 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. - */ - Update withConfigurationType(ConfigurationType configurationType); - } - - /** - * The stage of the AccessControlList update 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. - */ - Update withAclsUrl(String aclsUrl); - } - - /** - * The stage of the AccessControlList update allowing to specify defaultAction. - */ - interface WithDefaultAction { - /** - * Specifies the defaultAction property: Default action that needs to be applied when no condition is - * matched. Example: Permit | Deny.. - * - * @param defaultAction Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * @return the next definition stage. - */ - Update withDefaultAction(CommunityActionTypes defaultAction); - } - - /** - * 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. + * The stage of the AccessControlList update allowing to specify properties. */ - interface WithDynamicMatchConfigurations { + interface WithProperties { /** - * Specifies the dynamicMatchConfigurations property: List of dynamic match configurations.. + * Specifies the properties property: Access Control Lists patch properties.. * - * @param dynamicMatchConfigurations List of dynamic match configurations. + * @param properties Access Control Lists patch properties. * @return the next definition stage. */ - Update withDynamicMatchConfigurations(List dynamicMatchConfigurations); + Update withProperties(AccessControlListPatchProperties properties); } } @@ -468,21 +264,17 @@ interface WithDynamicMatchConfigurations { 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates administrative state of Access Control Lists. - * * Implements the operation to the underlying resources. * * @param body Request payload. @@ -490,55 +282,47 @@ interface WithDynamicMatchConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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 index 2beedacacc40..28195e4640db 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -26,6 +26,16 @@ public final class AccessControlListAction implements JsonSerializable { + /* + * Type of actions that can be performed. + */ + private AclActionType type; + + /* + * Name of the counter block to get match count information. + */ + private String counterName; + + /* + * Remark comment + */ + private String remarkComment; + + /* + * Police rate configuration + */ + private PoliceRateConfigurationProperties policeRateConfiguration; + + /** + * Creates an instance of AccessControlListActionPatch class. + */ + public AccessControlListActionPatch() { + } + + /** + * 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 AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch 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 AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch withCounterName(String counterName) { + this.counterName = counterName; + return this; + } + + /** + * Get the remarkComment property: Remark comment. + * + * @return the remarkComment value. + */ + public String remarkComment() { + return this.remarkComment; + } + + /** + * Set the remarkComment property: Remark comment. + * + * @param remarkComment the remarkComment value to set. + * @return the AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch withRemarkComment(String remarkComment) { + this.remarkComment = remarkComment; + return this; + } + + /** + * Get the policeRateConfiguration property: Police rate configuration. + * + * @return the policeRateConfiguration value. + */ + public PoliceRateConfigurationProperties policeRateConfiguration() { + return this.policeRateConfiguration; + } + + /** + * Set the policeRateConfiguration property: Police rate configuration. + * + * @param policeRateConfiguration the policeRateConfiguration value to set. + * @return the AccessControlListActionPatch object itself. + */ + public AccessControlListActionPatch + withPoliceRateConfiguration(PoliceRateConfigurationProperties policeRateConfiguration) { + this.policeRateConfiguration = policeRateConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("counterName", this.counterName); + jsonWriter.writeStringField("remarkComment", this.remarkComment); + jsonWriter.writeJsonField("policeRateConfiguration", this.policeRateConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListActionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListActionPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListActionPatch. + */ + public static AccessControlListActionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListActionPatch deserializedAccessControlListActionPatch = new AccessControlListActionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedAccessControlListActionPatch.type = AclActionType.fromString(reader.getString()); + } else if ("counterName".equals(fieldName)) { + deserializedAccessControlListActionPatch.counterName = reader.getString(); + } else if ("remarkComment".equals(fieldName)) { + deserializedAccessControlListActionPatch.remarkComment = reader.getString(); + } else if ("policeRateConfiguration".equals(fieldName)) { + deserializedAccessControlListActionPatch.policeRateConfiguration + = PoliceRateConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListActionPatch; + }); + } +} 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 index 0e999bad8582..07cde20c4426 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,22 @@ * Defines the match condition that is supported to filter the traffic. */ @Fluent -public final class AccessControlListMatchCondition extends CommonMatchConditions { +public final class AccessControlListMatchCondition implements JsonSerializable { + /* + * List of the protocols that need to be matched. + */ + private List protocolTypes; + + /* + * Vlan match condition that needs to be matched. + */ + private VlanMatchCondition vlanMatchCondition; + + /* + * IP condition that needs to be matched. + */ + private IpMatchCondition ipCondition; + /* * List of ether type values that need to be matched. */ @@ -41,17 +57,87 @@ public final class AccessControlListMatchCondition extends CommonMatchConditions */ private List dscpMarkings; + /* + * Protocol neighbors that need to be matched. + */ + private List protocolNeighbors; + /* * Defines the port condition that needs to be matched. */ private AccessControlListPortCondition portCondition; + /* + * Internet Control Message Protocol (ICMP) configuration + */ + private IcmpConfigurationProperties icmpConfiguration; + /** * Creates an instance of AccessControlListMatchCondition class. */ public AccessControlListMatchCondition() { } + /** + * 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 AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition 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 AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition 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 AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withIpCondition(IpMatchCondition ipCondition) { + this.ipCondition = ipCondition; + return this; + } + /** * Get the etherTypes property: List of ether type values that need to be matched. * @@ -153,68 +239,63 @@ public AccessControlListMatchCondition withDscpMarkings(List dscpMarking } /** - * Get the portCondition property: Defines the port condition that needs to be matched. + * Get the protocolNeighbors property: Protocol neighbors that need to be matched. * - * @return the portCondition value. + * @return the protocolNeighbors value. */ - public AccessControlListPortCondition portCondition() { - return this.portCondition; + public List protocolNeighbors() { + return this.protocolNeighbors; } /** - * Set the portCondition property: Defines the port condition that needs to be matched. + * Set the protocolNeighbors property: Protocol neighbors that need to be matched. * - * @param portCondition the portCondition value to set. + * @param protocolNeighbors the protocolNeighbors value to set. * @return the AccessControlListMatchCondition object itself. */ - public AccessControlListMatchCondition withPortCondition(AccessControlListPortCondition portCondition) { - this.portCondition = portCondition; + public AccessControlListMatchCondition withProtocolNeighbors(List protocolNeighbors) { + this.protocolNeighbors = protocolNeighbors; return this; } /** - * {@inheritDoc} + * Get the portCondition property: Defines the port condition that needs to be matched. + * + * @return the portCondition value. */ - @Override - public AccessControlListMatchCondition withProtocolTypes(List protocolTypes) { - super.withProtocolTypes(protocolTypes); - return this; + public AccessControlListPortCondition portCondition() { + return this.portCondition; } /** - * {@inheritDoc} + * 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. */ - @Override - public AccessControlListMatchCondition withVlanMatchCondition(VlanMatchCondition vlanMatchCondition) { - super.withVlanMatchCondition(vlanMatchCondition); + public AccessControlListMatchCondition withPortCondition(AccessControlListPortCondition portCondition) { + this.portCondition = portCondition; return this; } /** - * {@inheritDoc} + * Get the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @return the icmpConfiguration value. */ - @Override - public AccessControlListMatchCondition withIpCondition(IpMatchCondition ipCondition) { - super.withIpCondition(ipCondition); - return this; + public IcmpConfigurationProperties icmpConfiguration() { + return this.icmpConfiguration; } /** - * Validates the instance. + * Set the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param icmpConfiguration the icmpConfiguration value to set. + * @return the AccessControlListMatchCondition object itself. */ - @Override - public void validate() { - if (portCondition() != null) { - portCondition().validate(); - } - if (vlanMatchCondition() != null) { - vlanMatchCondition().validate(); - } - if (ipCondition() != null) { - ipCondition().validate(); - } + public AccessControlListMatchCondition withIcmpConfiguration(IcmpConfigurationProperties icmpConfiguration) { + this.icmpConfiguration = icmpConfiguration; + return this; } /** @@ -223,15 +304,19 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("protocolTypes", protocolTypes(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("vlanMatchCondition", vlanMatchCondition()); - jsonWriter.writeJsonField("ipCondition", ipCondition()); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", this.vlanMatchCondition); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); jsonWriter.writeArrayField("etherTypes", this.etherTypes, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("fragments", this.fragments, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipLengths", this.ipLengths, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ttlValues", this.ttlValues, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("dscpMarkings", this.dscpMarkings, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("protocolNeighbors", this.protocolNeighbors, + (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("portCondition", this.portCondition); + jsonWriter.writeJsonField("icmpConfiguration", this.icmpConfiguration); return jsonWriter.writeEndObject(); } @@ -253,12 +338,12 @@ public static AccessControlListMatchCondition fromJson(JsonReader jsonReader) th if ("protocolTypes".equals(fieldName)) { List protocolTypes = reader.readArray(reader1 -> reader1.getString()); - deserializedAccessControlListMatchCondition.withProtocolTypes(protocolTypes); + deserializedAccessControlListMatchCondition.protocolTypes = protocolTypes; } else if ("vlanMatchCondition".equals(fieldName)) { - deserializedAccessControlListMatchCondition - .withVlanMatchCondition(VlanMatchCondition.fromJson(reader)); + deserializedAccessControlListMatchCondition.vlanMatchCondition + = VlanMatchCondition.fromJson(reader); } else if ("ipCondition".equals(fieldName)) { - deserializedAccessControlListMatchCondition.withIpCondition(IpMatchCondition.fromJson(reader)); + deserializedAccessControlListMatchCondition.ipCondition = IpMatchCondition.fromJson(reader); } else if ("etherTypes".equals(fieldName)) { List etherTypes = reader.readArray(reader1 -> reader1.getString()); deserializedAccessControlListMatchCondition.etherTypes = etherTypes; @@ -274,9 +359,15 @@ public static AccessControlListMatchCondition fromJson(JsonReader jsonReader) th } else if ("dscpMarkings".equals(fieldName)) { List dscpMarkings = reader.readArray(reader1 -> reader1.getString()); deserializedAccessControlListMatchCondition.dscpMarkings = dscpMarkings; + } else if ("protocolNeighbors".equals(fieldName)) { + List protocolNeighbors = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchCondition.protocolNeighbors = protocolNeighbors; } else if ("portCondition".equals(fieldName)) { deserializedAccessControlListMatchCondition.portCondition = AccessControlListPortCondition.fromJson(reader); + } else if ("icmpConfiguration".equals(fieldName)) { + deserializedAccessControlListMatchCondition.icmpConfiguration + = IcmpConfigurationProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java new file mode 100644 index 000000000000..f494687d4ce5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match condition that is supported to filter the traffic. + */ +@Fluent +public final class AccessControlListMatchConditionPatch + implements JsonSerializable { + /* + * List of the protocols that need to be matched. + */ + private List protocolTypes; + + /* + * Vlan match condition that needs to be matched. + */ + private VlanMatchConditionPatch vlanMatchCondition; + + /* + * IP condition that needs to be matched. + */ + private IpMatchConditionPatch ipCondition; + + /* + * List of ether type values that need to be matched. + */ + private List etherTypes; + + /* + * List of IP fragment packets that need to be matched. + */ + private List fragments; + + /* + * List of IP Lengths that need to be matched. + */ + private List ipLengths; + + /* + * List of TTL [Time To Live] values that need to be matched. + */ + private List ttlValues; + + /* + * List of DSCP Markings that need to be matched. + */ + private List dscpMarkings; + + /* + * Defines the port condition that needs to be matched. + */ + private AccessControlListPortConditionPatch portCondition; + + /* + * Protocol neighbors that need to be matched. + */ + private List protocolNeighbors; + + /* + * Internet Control Message Protocol (ICMP) configuration + */ + private IcmpConfigurationPatchProperties icmpConfiguration; + + /** + * Creates an instance of AccessControlListMatchConditionPatch class. + */ + public AccessControlListMatchConditionPatch() { + } + + /** + * 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 AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch 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 VlanMatchConditionPatch 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 AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withVlanMatchCondition(VlanMatchConditionPatch vlanMatchCondition) { + this.vlanMatchCondition = vlanMatchCondition; + return this; + } + + /** + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. + */ + public IpMatchConditionPatch ipCondition() { + return this.ipCondition; + } + + /** + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withIpCondition(IpMatchConditionPatch ipCondition) { + this.ipCondition = ipCondition; + return this; + } + + /** + * Get the etherTypes property: List of ether type values that need to be matched. + * + * @return the etherTypes value. + */ + public List etherTypes() { + return this.etherTypes; + } + + /** + * Set the etherTypes property: List of ether type values that need to be matched. + * + * @param etherTypes the etherTypes value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withEtherTypes(List etherTypes) { + this.etherTypes = etherTypes; + return this; + } + + /** + * Get the fragments property: List of IP fragment packets that need to be matched. + * + * @return the fragments value. + */ + public List fragments() { + return this.fragments; + } + + /** + * Set the fragments property: List of IP fragment packets that need to be matched. + * + * @param fragments the fragments value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withFragments(List fragments) { + this.fragments = fragments; + return this; + } + + /** + * Get the ipLengths property: List of IP Lengths that need to be matched. + * + * @return the ipLengths value. + */ + public List ipLengths() { + return this.ipLengths; + } + + /** + * Set the ipLengths property: List of IP Lengths that need to be matched. + * + * @param ipLengths the ipLengths value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withIpLengths(List ipLengths) { + this.ipLengths = ipLengths; + return this; + } + + /** + * Get the ttlValues property: List of TTL [Time To Live] values that need 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 need to be matched. + * + * @param ttlValues the ttlValues value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withTtlValues(List ttlValues) { + this.ttlValues = ttlValues; + return this; + } + + /** + * Get the dscpMarkings property: List of DSCP Markings that need to be matched. + * + * @return the dscpMarkings value. + */ + public List dscpMarkings() { + return this.dscpMarkings; + } + + /** + * Set the dscpMarkings property: List of DSCP Markings that need to be matched. + * + * @param dscpMarkings the dscpMarkings value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch 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 AccessControlListPortConditionPatch 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 AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withPortCondition(AccessControlListPortConditionPatch portCondition) { + this.portCondition = portCondition; + return this; + } + + /** + * Get the protocolNeighbors property: Protocol neighbors that need to be matched. + * + * @return the protocolNeighbors value. + */ + public List protocolNeighbors() { + return this.protocolNeighbors; + } + + /** + * Set the protocolNeighbors property: Protocol neighbors that need to be matched. + * + * @param protocolNeighbors the protocolNeighbors value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch withProtocolNeighbors(List protocolNeighbors) { + this.protocolNeighbors = protocolNeighbors; + return this; + } + + /** + * Get the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @return the icmpConfiguration value. + */ + public IcmpConfigurationPatchProperties icmpConfiguration() { + return this.icmpConfiguration; + } + + /** + * Set the icmpConfiguration property: Internet Control Message Protocol (ICMP) configuration. + * + * @param icmpConfiguration the icmpConfiguration value to set. + * @return the AccessControlListMatchConditionPatch object itself. + */ + public AccessControlListMatchConditionPatch + withIcmpConfiguration(IcmpConfigurationPatchProperties icmpConfiguration) { + this.icmpConfiguration = icmpConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", this.vlanMatchCondition); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); + jsonWriter.writeArrayField("etherTypes", this.etherTypes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("fragments", this.fragments, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipLengths", this.ipLengths, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ttlValues", this.ttlValues, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("dscpMarkings", this.dscpMarkings, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("portCondition", this.portCondition); + jsonWriter.writeArrayField("protocolNeighbors", this.protocolNeighbors, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("icmpConfiguration", this.icmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListMatchConditionPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListMatchConditionPatch. + */ + public static AccessControlListMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListMatchConditionPatch deserializedAccessControlListMatchConditionPatch + = new AccessControlListMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.protocolTypes = protocolTypes; + } else if ("vlanMatchCondition".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch.vlanMatchCondition + = VlanMatchConditionPatch.fromJson(reader); + } else if ("ipCondition".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch.ipCondition + = IpMatchConditionPatch.fromJson(reader); + } else if ("etherTypes".equals(fieldName)) { + List etherTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.etherTypes = etherTypes; + } else if ("fragments".equals(fieldName)) { + List fragments = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.fragments = fragments; + } else if ("ipLengths".equals(fieldName)) { + List ipLengths = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.ipLengths = ipLengths; + } else if ("ttlValues".equals(fieldName)) { + List ttlValues = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.ttlValues = ttlValues; + } else if ("dscpMarkings".equals(fieldName)) { + List dscpMarkings = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.dscpMarkings = dscpMarkings; + } else if ("portCondition".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch.portCondition + = AccessControlListPortConditionPatch.fromJson(reader); + } else if ("protocolNeighbors".equals(fieldName)) { + List protocolNeighbors = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListMatchConditionPatch.protocolNeighbors = protocolNeighbors; + } else if ("icmpConfiguration".equals(fieldName)) { + deserializedAccessControlListMatchConditionPatch.icmpConfiguration + = IcmpConfigurationPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListMatchConditionPatch; + }); + } +} 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 index 769b65cc777f..d2378faac197 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -31,7 +31,7 @@ public final class AccessControlListMatchConfiguration /* * Type of IP Address. IPv4 or IPv6 */ - private IpAddressType ipAddressType; + private IPAddressType ipAddressType; /* * List of the match conditions. @@ -94,7 +94,7 @@ public AccessControlListMatchConfiguration withSequenceNumber(Long sequenceNumbe * * @return the ipAddressType value. */ - public IpAddressType ipAddressType() { + public IPAddressType ipAddressType() { return this.ipAddressType; } @@ -104,7 +104,7 @@ public IpAddressType ipAddressType() { * @param ipAddressType the ipAddressType value to set. * @return the AccessControlListMatchConfiguration object itself. */ - public AccessControlListMatchConfiguration withIpAddressType(IpAddressType ipAddressType) { + public AccessControlListMatchConfiguration withIpAddressType(IPAddressType ipAddressType) { this.ipAddressType = ipAddressType; return this; } @@ -150,20 +150,6 @@ public AccessControlListMatchConfiguration withActions(List e.validate()); - } - if (actions() != null) { - actions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -202,7 +188,7 @@ public static AccessControlListMatchConfiguration fromJson(JsonReader jsonReader = reader.getNullable(JsonReader::getLong); } else if ("ipAddressType".equals(fieldName)) { deserializedAccessControlListMatchConfiguration.ipAddressType - = IpAddressType.fromString(reader.getString()); + = IPAddressType.fromString(reader.getString()); } else if ("matchConditions".equals(fieldName)) { List matchConditions = reader.readArray(reader1 -> AccessControlListMatchCondition.fromJson(reader1)); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java new file mode 100644 index 000000000000..df6f1d267d5d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match configuration that are supported to filter the traffic. + */ +@Fluent +public final class AccessControlListMatchConfigurationPatch + implements JsonSerializable { + /* + * The name of the match configuration. + */ + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration. + */ + private Long sequenceNumber; + + /* + * Type of IP Address. IPv4 or IPv6 + */ + private IPAddressType ipAddressType; + + /* + * List of the match conditions. + */ + private List matchConditions; + + /* + * List of actions that need to be performed for the matched conditions. + */ + private List actions; + + /** + * Creates an instance of AccessControlListMatchConfigurationPatch class. + */ + public AccessControlListMatchConfigurationPatch() { + } + + /** + * 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 AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch 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 AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch 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 AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch 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 AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch + 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 AccessControlListMatchConfigurationPatch object itself. + */ + public AccessControlListMatchConfigurationPatch withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + jsonWriter.writeNumberField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("matchConditions", this.matchConditions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListMatchConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListMatchConfigurationPatch if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListMatchConfigurationPatch. + */ + public static AccessControlListMatchConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListMatchConfigurationPatch deserializedAccessControlListMatchConfigurationPatch + = new AccessControlListMatchConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchConfigurationName".equals(fieldName)) { + deserializedAccessControlListMatchConfigurationPatch.matchConfigurationName = reader.getString(); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedAccessControlListMatchConfigurationPatch.sequenceNumber + = reader.getNullable(JsonReader::getLong); + } else if ("ipAddressType".equals(fieldName)) { + deserializedAccessControlListMatchConfigurationPatch.ipAddressType + = IPAddressType.fromString(reader.getString()); + } else if ("matchConditions".equals(fieldName)) { + List matchConditions + = reader.readArray(reader1 -> AccessControlListMatchConditionPatch.fromJson(reader1)); + deserializedAccessControlListMatchConfigurationPatch.matchConditions = matchConditions; + } else if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> AccessControlListActionPatch.fromJson(reader1)); + deserializedAccessControlListMatchConfigurationPatch.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListMatchConfigurationPatch; + }); + } +} 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 8879316f3e3e..3b22ac05d380 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListPatchProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The Access Control Lists patch resource definition. */ @Fluent -public final class AccessControlListPatch extends TagsUpdate { +public final class AccessControlListPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Access Control Lists patch properties. */ - private AccessControlListPatchProperties innerProperties; + private AccessControlListPatchProperties properties; /** * Creates an instance of AccessControlListPatch class. @@ -30,185 +34,53 @@ public AccessControlListPatch() { } /** - * Get the innerProperties property: Access Control Lists patch properties. - * - * @return the innerProperties value. - */ - private AccessControlListPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessControlListPatch withTags(Map tags) { - super.withTags(tags); - 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 AccessControlListPatch object itself. - */ - public AccessControlListPatch withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListPatchProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; - } - - /** - * Get the configurationType property: Input method to configure Access Control List. + * Get the tags property: Resource tags. * - * @return the configurationType value. + * @return the tags value. */ - public ConfigurationType configurationType() { - return this.innerProperties() == null ? null : this.innerProperties().configurationType(); + public Map tags() { + return this.tags; } /** - * Set the configurationType property: Input method to configure Access Control List. + * Set the tags property: Resource tags. * - * @param configurationType the configurationType value to set. + * @param tags the tags value to set. * @return the AccessControlListPatch object itself. */ - public AccessControlListPatch withConfigurationType(ConfigurationType configurationType) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListPatchProperties(); - } - this.innerProperties().withConfigurationType(configurationType); - return this; - } - - /** - * Get the aclsUrl property: Access Control List file URL. - * - * @return the aclsUrl value. - */ - public String aclsUrl() { - return this.innerProperties() == null ? null : this.innerProperties().aclsUrl(); - } - - /** - * Set the aclsUrl property: Access Control List file URL. - * - * @param aclsUrl the aclsUrl value to set. - * @return the AccessControlListPatch object itself. - */ - public AccessControlListPatch withAclsUrl(String aclsUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListPatchProperties(); - } - this.innerProperties().withAclsUrl(aclsUrl); - return this; - } - - /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.innerProperties() == null ? null : this.innerProperties().defaultAction(); - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the AccessControlListPatch object itself. - */ - public AccessControlListPatch withDefaultAction(CommunityActionTypes defaultAction) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListPatchProperties(); - } - this.innerProperties().withDefaultAction(defaultAction); - 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 AccessControlListPatch object itself. - */ - public AccessControlListPatch - withMatchConfigurations(List matchConfigurations) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessControlListPatchProperties(); - } - this.innerProperties().withMatchConfigurations(matchConfigurations); + public AccessControlListPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * Get the properties property: Access Control Lists patch properties. * - * @return the dynamicMatchConfigurations value. + * @return the properties value. */ - public List dynamicMatchConfigurations() { - return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); + public AccessControlListPatchProperties properties() { + return this.properties; } /** - * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * Set the properties property: Access Control Lists patch properties. * - * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @param properties the properties 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); + public AccessControlListPatch withProperties(AccessControlListPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -229,10 +101,9 @@ public static AccessControlListPatch fromJson(JsonReader jsonReader) throws IOEx if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAccessControlListPatch.withTags(tags); + deserializedAccessControlListPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedAccessControlListPatch.innerProperties - = AccessControlListPatchProperties.fromJson(reader); + deserializedAccessControlListPatch.properties = AccessControlListPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchProperties.java new file mode 100644 index 000000000000..5b0c91c2dbfb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchProperties.java @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Access Control Lists patch properties. + */ +@Fluent +public final class AccessControlListPatchProperties implements JsonSerializable { + /* + * Input method to configure Access Control List. + */ + private ConfigurationType configurationType; + + /* + * Access Control List file URL. + */ + private String aclsUrl; + + /* + * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + */ + private CommunityActionTypes defaultAction; + + /* + * List of match configurations. + */ + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + private List dynamicMatchConfigurations; + + /* + * Access Control List (ACL) Type + */ + private AclType aclType; + + /* + * Device Role + */ + private DeviceRole deviceRole; + + /* + * Global Access Control List (ACL) actions + */ + private GlobalAccessControlListActionPatchProperties globalAccessControlListActions; + + /* + * Switch configuration description. + */ + private String annotation; + + /** + * Creates an instance of AccessControlListPatchProperties class. + */ + public AccessControlListPatchProperties() { + } + + /** + * 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 AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties 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 AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withAclsUrl(String aclsUrl) { + this.aclsUrl = aclsUrl; + return this; + } + + /** + * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @return the defaultAction value. + */ + public CommunityActionTypes defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @param defaultAction the defaultAction value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withDefaultAction(CommunityActionTypes defaultAction) { + this.defaultAction = defaultAction; + 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 AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties + 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 AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties + withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; + return this; + } + + /** + * Get the aclType property: Access Control List (ACL) Type. + * + * @return the aclType value. + */ + public AclType aclType() { + return this.aclType; + } + + /** + * Set the aclType property: Access Control List (ACL) Type. + * + * @param aclType the aclType value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withAclType(AclType aclType) { + this.aclType = aclType; + return this; + } + + /** + * Get the deviceRole property: Device Role. + * + * @return the deviceRole value. + */ + public DeviceRole deviceRole() { + return this.deviceRole; + } + + /** + * Set the deviceRole property: Device Role. + * + * @param deviceRole the deviceRole value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withDeviceRole(DeviceRole deviceRole) { + this.deviceRole = deviceRole; + return this; + } + + /** + * Get the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + public GlobalAccessControlListActionPatchProperties globalAccessControlListActions() { + return this.globalAccessControlListActions; + } + + /** + * Set the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions the globalAccessControlListActions value to set. + * @return the AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withGlobalAccessControlListActions( + GlobalAccessControlListActionPatchProperties globalAccessControlListActions) { + this.globalAccessControlListActions = globalAccessControlListActions; + return this; + } + + /** + * 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 AccessControlListPatchProperties object itself. + */ + public AccessControlListPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationType", + this.configurationType == null ? null : this.configurationType.toString()); + jsonWriter.writeStringField("aclsUrl", this.aclsUrl); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); + jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("aclType", this.aclType == null ? null : this.aclType.toString()); + jsonWriter.writeStringField("deviceRole", this.deviceRole == null ? null : this.deviceRole.toString()); + jsonWriter.writeJsonField("globalAccessControlListActions", this.globalAccessControlListActions); + jsonWriter.writeStringField("annotation", this.annotation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListPatchProperties. + */ + public static AccessControlListPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListPatchProperties deserializedAccessControlListPatchProperties + = new AccessControlListPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationType".equals(fieldName)) { + deserializedAccessControlListPatchProperties.configurationType + = ConfigurationType.fromString(reader.getString()); + } else if ("aclsUrl".equals(fieldName)) { + deserializedAccessControlListPatchProperties.aclsUrl = reader.getString(); + } else if ("defaultAction".equals(fieldName)) { + deserializedAccessControlListPatchProperties.defaultAction + = CommunityActionTypes.fromString(reader.getString()); + } else if ("matchConfigurations".equals(fieldName)) { + List matchConfigurations + = reader.readArray(reader1 -> AccessControlListMatchConfigurationPatch.fromJson(reader1)); + deserializedAccessControlListPatchProperties.matchConfigurations = matchConfigurations; + } else if ("dynamicMatchConfigurations".equals(fieldName)) { + List dynamicMatchConfigurations + = reader.readArray(reader1 -> CommonDynamicMatchConfigurationPatch.fromJson(reader1)); + deserializedAccessControlListPatchProperties.dynamicMatchConfigurations + = dynamicMatchConfigurations; + } else if ("aclType".equals(fieldName)) { + deserializedAccessControlListPatchProperties.aclType = AclType.fromString(reader.getString()); + } else if ("deviceRole".equals(fieldName)) { + deserializedAccessControlListPatchProperties.deviceRole = DeviceRole.fromString(reader.getString()); + } else if ("globalAccessControlListActions".equals(fieldName)) { + deserializedAccessControlListPatchProperties.globalAccessControlListActions + = GlobalAccessControlListActionPatchProperties.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedAccessControlListPatchProperties.annotation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListPatchProperties; + }); + } +} 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 deleted file mode 100644 index a8b908c2ce8c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Access Control List Patch Properties defines the patchable resource properties. - */ -@Fluent -public class AccessControlListPatchableProperties implements JsonSerializable { - /* - * Input method to configure Access Control List. - */ - private ConfigurationType configurationType; - - /* - * Access Control List file URL. - */ - private String aclsUrl; - - /* - * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. - */ - private CommunityActionTypes defaultAction; - - /* - * List of match configurations. - */ - private List matchConfigurations; - - /* - * List of dynamic match configurations. - */ - 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 defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.defaultAction; - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the AccessControlListPatchableProperties object itself. - */ - public AccessControlListPatchableProperties withDefaultAction(CommunityActionTypes defaultAction) { - this.defaultAction = defaultAction; - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("configurationType", - this.configurationType == null ? null : this.configurationType.toString()); - jsonWriter.writeStringField("aclsUrl", this.aclsUrl); - jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); - jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessControlListPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessControlListPatchableProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccessControlListPatchableProperties. - */ - public static AccessControlListPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessControlListPatchableProperties deserializedAccessControlListPatchableProperties - = new AccessControlListPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("configurationType".equals(fieldName)) { - deserializedAccessControlListPatchableProperties.configurationType - = ConfigurationType.fromString(reader.getString()); - } else if ("aclsUrl".equals(fieldName)) { - deserializedAccessControlListPatchableProperties.aclsUrl = reader.getString(); - } else if ("defaultAction".equals(fieldName)) { - deserializedAccessControlListPatchableProperties.defaultAction - = CommunityActionTypes.fromString(reader.getString()); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> AccessControlListMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchableProperties.matchConfigurations = matchConfigurations; - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedAccessControlListPatchableProperties.dynamicMatchConfigurations - = dynamicMatchConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedAccessControlListPatchableProperties; - }); - } -} 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 index 294e12d3eefe..c1975faf0c4f 100644 --- 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 @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -16,7 +16,27 @@ * Defines the port condition that needs to be matched. */ @Fluent -public final class AccessControlListPortCondition extends PortCondition { +public final class AccessControlListPortCondition implements JsonSerializable { + /* + * Port type that needs to be matched. + */ + private PortType portType; + + /* + * Layer4 protocol type that needs to be matched. + */ + private Layer4Protocol layer4Protocol; + + /* + * List of the Ports that need to be matched. + */ + private List ports; + + /* + * List of the port Group Names that need to be matched. + */ + private List portGroupNames; + /* * List of protocol flags that need to be matched. Example: established | initial | . List of * eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg @@ -30,80 +50,108 @@ public AccessControlListPortCondition() { } /** - * Get the flags property: List of protocol flags that need to be matched. Example: established | initial | - * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, - * not-urg, psh, rst, syn, urg. + * Get the portType property: Port type that needs to be matched. * - * @return the flags value. + * @return the portType value. */ - public List flags() { - return this.flags; + public PortType portType() { + return this.portType; } /** - * Set the flags property: List of protocol flags that need to be matched. Example: established | initial | - * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, - * not-urg, psh, rst, syn, urg. + * Set the portType property: Port type that needs to be matched. * - * @param flags the flags value to set. + * @param portType the portType value to set. * @return the AccessControlListPortCondition object itself. */ - public AccessControlListPortCondition withFlags(List flags) { - this.flags = flags; + public AccessControlListPortCondition withPortType(PortType portType) { + this.portType = portType; return this; } /** - * {@inheritDoc} + * Get the layer4Protocol property: Layer4 protocol type that needs to be matched. + * + * @return the layer4Protocol value. */ - @Override - public AccessControlListPortCondition withPortType(PortType portType) { - super.withPortType(portType); - return this; + public Layer4Protocol layer4Protocol() { + return this.layer4Protocol; } /** - * {@inheritDoc} + * Set the layer4Protocol property: Layer4 protocol type that needs to be matched. + * + * @param layer4Protocol the layer4Protocol value to set. + * @return the AccessControlListPortCondition object itself. */ - @Override public AccessControlListPortCondition withLayer4Protocol(Layer4Protocol layer4Protocol) { - super.withLayer4Protocol(layer4Protocol); + this.layer4Protocol = layer4Protocol; return this; } /** - * {@inheritDoc} + * 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 AccessControlListPortCondition object itself. */ - @Override public AccessControlListPortCondition withPorts(List ports) { - super.withPorts(ports); + this.ports = ports; return this; } /** - * {@inheritDoc} + * Get the portGroupNames property: List of the port Group Names that need to be matched. + * + * @return the portGroupNames value. + */ + public List portGroupNames() { + return this.portGroupNames; + } + + /** + * Set the portGroupNames property: List of the port Group Names that need to be matched. + * + * @param portGroupNames the portGroupNames value to set. + * @return the AccessControlListPortCondition object itself. */ - @Override public AccessControlListPortCondition withPortGroupNames(List portGroupNames) { - super.withPortGroupNames(portGroupNames); + this.portGroupNames = portGroupNames; return this; } /** - * Validates the instance. + * Get the flags property: List of protocol flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, + * not-urg, psh, rst, syn, urg. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the flags value. */ - @Override - public void validate() { - if (layer4Protocol() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property layer4Protocol in model AccessControlListPortCondition")); - } + public List flags() { + return this.flags; } - private static final ClientLogger LOGGER = new ClientLogger(AccessControlListPortCondition.class); + /** + * Set the flags property: List of protocol flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, + * not-urg, psh, rst, syn, urg. + * + * @param flags the flags value to set. + * @return the AccessControlListPortCondition object itself. + */ + public AccessControlListPortCondition withFlags(List flags) { + this.flags = flags; + return this; + } /** * {@inheritDoc} @@ -111,10 +159,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("layer4Protocol", layer4Protocol() == null ? null : layer4Protocol().toString()); - jsonWriter.writeStringField("portType", portType() == null ? null : portType().toString()); - jsonWriter.writeArrayField("ports", ports(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("portGroupNames", portGroupNames(), + jsonWriter.writeStringField("layer4Protocol", + this.layer4Protocol == null ? null : this.layer4Protocol.toString()); + jsonWriter.writeStringField("portType", this.portType == null ? null : this.portType.toString()); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("portGroupNames", this.portGroupNames, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("flags", this.flags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); @@ -138,16 +187,16 @@ public static AccessControlListPortCondition fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("layer4Protocol".equals(fieldName)) { - deserializedAccessControlListPortCondition - .withLayer4Protocol(Layer4Protocol.fromString(reader.getString())); + deserializedAccessControlListPortCondition.layer4Protocol + = Layer4Protocol.fromString(reader.getString()); } else if ("portType".equals(fieldName)) { - deserializedAccessControlListPortCondition.withPortType(PortType.fromString(reader.getString())); + deserializedAccessControlListPortCondition.portType = PortType.fromString(reader.getString()); } else if ("ports".equals(fieldName)) { List ports = reader.readArray(reader1 -> reader1.getString()); - deserializedAccessControlListPortCondition.withPorts(ports); + deserializedAccessControlListPortCondition.ports = ports; } else if ("portGroupNames".equals(fieldName)) { List portGroupNames = reader.readArray(reader1 -> reader1.getString()); - deserializedAccessControlListPortCondition.withPortGroupNames(portGroupNames); + deserializedAccessControlListPortCondition.portGroupNames = portGroupNames; } else if ("flags".equals(fieldName)) { List flags = reader.readArray(reader1 -> reader1.getString()); deserializedAccessControlListPortCondition.flags = flags; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java new file mode 100644 index 000000000000..3c2f6f94285f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the port condition that needs to be matched. + */ +@Fluent +public final class AccessControlListPortConditionPatch + implements JsonSerializable { + /* + * Port type that needs to be matched. + */ + private PortType portType; + + /* + * Layer4 protocol type that needs to be matched. + */ + private Layer4Protocol layer4Protocol; + + /* + * List of the Ports that need to be matched. + */ + private List ports; + + /* + * List of the port Group Names that need to be matched. + */ + private List portGroupNames; + + /* + * List of protocol flags that need to be matched. Example: established | initial | . List of + * eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg + */ + private List flags; + + /** + * Creates an instance of AccessControlListPortConditionPatch class. + */ + public AccessControlListPortConditionPatch() { + } + + /** + * 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 AccessControlListPortConditionPatch object itself. + */ + public AccessControlListPortConditionPatch 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 AccessControlListPortConditionPatch object itself. + */ + public AccessControlListPortConditionPatch 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 AccessControlListPortConditionPatch object itself. + */ + public AccessControlListPortConditionPatch withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the portGroupNames property: List of the port Group Names that need to be matched. + * + * @return the portGroupNames value. + */ + public List portGroupNames() { + return this.portGroupNames; + } + + /** + * Set the portGroupNames property: List of the port Group Names that need to be matched. + * + * @param portGroupNames the portGroupNames value to set. + * @return the AccessControlListPortConditionPatch object itself. + */ + public AccessControlListPortConditionPatch withPortGroupNames(List portGroupNames) { + this.portGroupNames = portGroupNames; + return this; + } + + /** + * Get the flags property: List of protocol flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, + * not-urg, psh, rst, syn, urg. + * + * @return the flags value. + */ + public List flags() { + return this.flags; + } + + /** + * Set the flags property: List of protocol flags that need to be matched. Example: established | initial | + * <List-of-TCP-flags>. List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, not-rst, not-syn, + * not-urg, psh, rst, syn, urg. + * + * @param flags the flags value to set. + * @return the AccessControlListPortConditionPatch object itself. + */ + public AccessControlListPortConditionPatch withFlags(List flags) { + this.flags = flags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("portType", this.portType == null ? null : this.portType.toString()); + jsonWriter.writeStringField("layer4Protocol", + this.layer4Protocol == null ? null : this.layer4Protocol.toString()); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("portGroupNames", this.portGroupNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("flags", this.flags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccessControlListPortConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccessControlListPortConditionPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessControlListPortConditionPatch. + */ + public static AccessControlListPortConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccessControlListPortConditionPatch deserializedAccessControlListPortConditionPatch + = new AccessControlListPortConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("portType".equals(fieldName)) { + deserializedAccessControlListPortConditionPatch.portType = PortType.fromString(reader.getString()); + } else if ("layer4Protocol".equals(fieldName)) { + deserializedAccessControlListPortConditionPatch.layer4Protocol + = Layer4Protocol.fromString(reader.getString()); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListPortConditionPatch.ports = ports; + } else if ("portGroupNames".equals(fieldName)) { + List portGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListPortConditionPatch.portGroupNames = portGroupNames; + } else if ("flags".equals(fieldName)) { + List flags = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessControlListPortConditionPatch.flags = flags; + } else { + reader.skipChildren(); + } + } + + return deserializedAccessControlListPortConditionPatch; + }); + } +} 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/models/AccessControlListProperties.java similarity index 68% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListProperties.java index 3c972a9bc3f2..66186e247721 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/models/AccessControlListProperties.java @@ -1,22 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -25,26 +18,11 @@ * Access Control List Properties defines the resource properties. */ @Fluent -public final class AccessControlListProperties extends AnnotationResource { +public final class AccessControlListProperties implements JsonSerializable { /* - * The last synced timestamp. - */ - private OffsetDateTime lastSyncedTime; - - /* - * Configuration state of the resource. - */ - private ConfigurationState configurationState; - - /* - * Provisioning state of the resource. + * Switch configuration description. */ - private ProvisioningState provisioningState; - - /* - * Administrative state of the resource. - */ - private AdministrativeState administrativeState; + private String annotation; /* * Input method to configure Access Control List. @@ -71,46 +49,70 @@ public final class AccessControlListProperties extends AnnotationResource { */ private List dynamicMatchConfigurations; - /** - * Creates an instance of AccessControlListProperties class. + /* + * The last synced timestamp. */ - public AccessControlListProperties() { - } + private OffsetDateTime lastSyncedTime; - /** - * Get the lastSyncedTime property: The last synced timestamp. - * - * @return the lastSyncedTime value. + /* + * Access Control List (ACL) Type */ - public OffsetDateTime lastSyncedTime() { - return this.lastSyncedTime; - } + private AclType aclType; + + /* + * Device Role + */ + private DeviceRole deviceRole; + + /* + * Global Access Control List (ACL) actions + */ + private GlobalAccessControlListActionProperties globalAccessControlListActions; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of AccessControlListProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public AccessControlListProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the AccessControlListProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public AccessControlListProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -218,27 +220,109 @@ public List dynamicMatchConfigurations() { } /** - * {@inheritDoc} + * Get the lastSyncedTime property: The last synced timestamp. + * + * @return the lastSyncedTime value. */ - @Override - public AccessControlListProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public OffsetDateTime lastSyncedTime() { + return this.lastSyncedTime; + } + + /** + * Get the aclType property: Access Control List (ACL) Type. + * + * @return the aclType value. + */ + public AclType aclType() { + return this.aclType; + } + + /** + * Set the aclType property: Access Control List (ACL) Type. + * + * @param aclType the aclType value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties withAclType(AclType aclType) { + this.aclType = aclType; return this; } /** - * Validates the instance. + * Get the deviceRole property: Device Role. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the deviceRole value. */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } + public DeviceRole deviceRole() { + return this.deviceRole; + } + + /** + * Set the deviceRole property: Device Role. + * + * @param deviceRole the deviceRole value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties withDeviceRole(DeviceRole deviceRole) { + this.deviceRole = deviceRole; + return this; + } + + /** + * Get the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @return the globalAccessControlListActions value. + */ + public GlobalAccessControlListActionProperties globalAccessControlListActions() { + return this.globalAccessControlListActions; + } + + /** + * Set the globalAccessControlListActions property: Global Access Control List (ACL) actions. + * + * @param globalAccessControlListActions the globalAccessControlListActions value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties + withGlobalAccessControlListActions(GlobalAccessControlListActionProperties globalAccessControlListActions) { + this.globalAccessControlListActions = globalAccessControlListActions; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * 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; } /** @@ -247,15 +331,18 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("configurationType", this.configurationType == null ? null : this.configurationType.toString()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("aclsUrl", this.aclsUrl); jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("aclType", this.aclType == null ? null : this.aclType.toString()); + jsonWriter.writeStringField("deviceRole", this.deviceRole == null ? null : this.deviceRole.toString()); + jsonWriter.writeJsonField("globalAccessControlListActions", this.globalAccessControlListActions); return jsonWriter.writeEndObject(); } @@ -265,6 +352,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AccessControlListProperties if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AccessControlListProperties. */ public static AccessControlListProperties fromJson(JsonReader jsonReader) throws IOException { @@ -274,23 +362,11 @@ public static AccessControlListProperties fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedAccessControlListProperties.withAnnotation(reader.getString()); - } else if ("lastSyncedTime".equals(fieldName)) { - deserializedAccessControlListProperties.lastSyncedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("configurationState".equals(fieldName)) { - deserializedAccessControlListProperties.configurationState - = ConfigurationState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedAccessControlListProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("administrativeState".equals(fieldName)) { - deserializedAccessControlListProperties.administrativeState - = AdministrativeState.fromString(reader.getString()); - } else if ("configurationType".equals(fieldName)) { + if ("configurationType".equals(fieldName)) { deserializedAccessControlListProperties.configurationType = ConfigurationType.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedAccessControlListProperties.annotation = reader.getString(); } else if ("aclsUrl".equals(fieldName)) { deserializedAccessControlListProperties.aclsUrl = reader.getString(); } else if ("defaultAction".equals(fieldName)) { @@ -304,6 +380,27 @@ public static AccessControlListProperties fromJson(JsonReader jsonReader) throws List dynamicMatchConfigurations = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); deserializedAccessControlListProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; + } else if ("lastSyncedTime".equals(fieldName)) { + deserializedAccessControlListProperties.lastSyncedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("aclType".equals(fieldName)) { + deserializedAccessControlListProperties.aclType = AclType.fromString(reader.getString()); + } else if ("deviceRole".equals(fieldName)) { + deserializedAccessControlListProperties.deviceRole = DeviceRole.fromString(reader.getString()); + } else if ("globalAccessControlListActions".equals(fieldName)) { + deserializedAccessControlListProperties.globalAccessControlListActions + = GlobalAccessControlListActionProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedAccessControlListProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedAccessControlListProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAccessControlListProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedAccessControlListProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); } else { reader.skipChildren(); } 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 454ce1ff5e4d..67cee2eb56cb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface AccessControlLists { /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN Context context); /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN AccessControlList getByResourceGroup(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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN void deleteByResourceGroup(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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String accessControlListName, Context context); /** - * 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 com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List AccessControlLists by subscription. - * * Implements AccessControlLists 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 Access Control Lists as paginated response with {@link PagedIterable}. + * @return the response of a AccessControlList list operation 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. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -148,14 +128,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ 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. @@ -163,13 +141,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ 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. @@ -178,14 +154,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ 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. @@ -193,13 +167,11 @@ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ 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. @@ -208,14 +180,12 @@ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String accessControlListName, Context context); /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param id the resource ID. @@ -227,8 +197,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St AccessControlList getById(String id); /** - * Gets a Access Control List. - * * Implements Access Control List GET method. * * @param id the resource ID. @@ -241,8 +209,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St Response getByIdWithResponse(String id, Context context); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param id the resource ID. @@ -253,8 +219,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St void deleteById(String id); /** - * Deletes a Access Control List. - * * Implements Access Control List DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index b9c860048ba3..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Access Control Lists. - */ -@Fluent -public final class AccessControlListsListResult implements JsonSerializable { - /* - * List of Access Control List resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of AccessControlListsListResult class. - */ - public AccessControlListsListResult() { - } - - /** - * Get the value property: List of Access Control List resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Access Control List resources. - * - * @param value the value value to set. - * @return the AccessControlListsListResult object itself. - */ - public AccessControlListsListResult 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 AccessControlListsListResult object itself. - */ - public AccessControlListsListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessControlListsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessControlListsListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccessControlListsListResult. - */ - public static AccessControlListsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessControlListsListResult deserializedAccessControlListsListResult = new AccessControlListsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> AccessControlListInner.fromJson(reader1)); - deserializedAccessControlListsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAccessControlListsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAccessControlListsListResult; - }); - } -} 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 index d17e8b2c95a2..290abc5c953b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,20 +12,30 @@ */ public final class AclActionType extends ExpandableStringEnum { /** - * Static value Drop for AclActionType. + * AclActionType Drop. */ public static final AclActionType DROP = fromString("Drop"); /** - * Static value Count for AclActionType. + * AclActionType Count. */ public static final AclActionType COUNT = fromString("Count"); /** - * Static value Log for AclActionType. + * AclActionType Log. */ public static final AclActionType LOG = fromString("Log"); + /** + * AclActionType Remark. + */ + public static final AclActionType REMARK = fromString("Remark"); + + /** + * AclActionType PoliceRate. + */ + public static final AclActionType POLICE_RATE = fromString("PoliceRate"); + /** * Creates a new instance of AclActionType value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java new file mode 100644 index 000000000000..3dd0b7a74309 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Access Control List (ACL) Type. + */ +public final class AclType extends ExpandableStringEnum { + /** + * AclType Control Plane Traffic Policy. + */ + public static final AclType CP = fromString("ControlPlaneTrafficPolicy"); + + /** + * AclType Tenant. + */ + public static final AclType TENANT = fromString("Tenant"); + + /** + * AclType Management. + */ + public static final AclType MANAGEMENT = fromString("Management"); + + /** + * Creates a new instance of AclType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AclType() { + } + + /** + * Creates or finds a AclType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AclType. + */ + public static AclType fromString(String name) { + return fromString(name, AclType.class); + } + + /** + * Gets known AclType values. + * + * @return known AclType values. + */ + public static Collection values() { + return values(AclType.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 index 914757a13d90..d0b7e9938ad6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class Action extends ExpandableStringEnum { /** - * Static value Allow for Action. + * Action Allow. */ public static final Action ALLOW = fromString("Allow"); /** - * Static value Deny for Action. + * Action Deny. */ public static final Action DENY = fromString("Deny"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java new file mode 100644 index 000000000000..058504a52b96 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IP Community Properties. + */ +@Fluent +public final class ActionIpCommunityPatchProperties implements JsonSerializable { + /* + * List of IP Community IDs. + */ + private IpCommunityIdList add; + + /* + * List of IP Community IDs. + */ + private IpCommunityIdList delete; + + /* + * List of IP Community IDs. + */ + private IpCommunityIdList set; + + /** + * Creates an instance of ActionIpCommunityPatchProperties class. + */ + public ActionIpCommunityPatchProperties() { + } + + /** + * Get the add property: List of IP Community IDs. + * + * @return the add value. + */ + public IpCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Community IDs. + * + * @param add the add value to set. + * @return the ActionIpCommunityPatchProperties object itself. + */ + public ActionIpCommunityPatchProperties withAdd(IpCommunityIdList add) { + this.add = add; + return this; + } + + /** + * Get the delete property: List of IP Community IDs. + * + * @return the delete value. + */ + public IpCommunityIdList delete() { + return this.delete; + } + + /** + * Set the delete property: List of IP Community IDs. + * + * @param delete the delete value to set. + * @return the ActionIpCommunityPatchProperties object itself. + */ + public ActionIpCommunityPatchProperties withDelete(IpCommunityIdList delete) { + this.delete = delete; + return this; + } + + /** + * Get the set property: List of IP Community IDs. + * + * @return the set value. + */ + public IpCommunityIdList set() { + return this.set; + } + + /** + * Set the set property: List of IP Community IDs. + * + * @param set the set value to set. + * @return the ActionIpCommunityPatchProperties object itself. + */ + public ActionIpCommunityPatchProperties withSet(IpCommunityIdList set) { + this.set = set; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("add", this.add); + jsonWriter.writeJsonField("delete", this.delete); + jsonWriter.writeJsonField("set", this.set); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionIpCommunityPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionIpCommunityPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionIpCommunityPatchProperties. + */ + public static ActionIpCommunityPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionIpCommunityPatchProperties deserializedActionIpCommunityPatchProperties + = new ActionIpCommunityPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("add".equals(fieldName)) { + deserializedActionIpCommunityPatchProperties.add = IpCommunityIdList.fromJson(reader); + } else if ("delete".equals(fieldName)) { + deserializedActionIpCommunityPatchProperties.delete = IpCommunityIdList.fromJson(reader); + } else if ("set".equals(fieldName)) { + deserializedActionIpCommunityPatchProperties.set = IpCommunityIdList.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActionIpCommunityPatchProperties; + }); + } +} 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 8fbd22dd2e43..f8eb70bc34d1 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,12 @@ * IP Community Properties. */ @Fluent -public final class ActionIpCommunityProperties extends IpCommunityAddOperationProperties { +public final class ActionIpCommunityProperties implements JsonSerializable { + /* + * List of IP Community IDs. + */ + private IpCommunityIdList add; + /* * List of IP Community IDs. */ @@ -31,6 +37,26 @@ public final class ActionIpCommunityProperties extends IpCommunityAddOperationPr public ActionIpCommunityProperties() { } + /** + * Get the add property: List of IP Community IDs. + * + * @return the add value. + */ + public IpCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Community IDs. + * + * @param add the add value to set. + * @return the ActionIpCommunityProperties object itself. + */ + public ActionIpCommunityProperties withAdd(IpCommunityIdList add) { + this.add = add; + return this; + } + /** * Get the delete property: List of IP Community IDs. * @@ -71,40 +97,13 @@ public ActionIpCommunityProperties withSet(IpCommunityIdList set) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ActionIpCommunityProperties withAdd(IpCommunityIdList add) { - super.withAdd(add); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (delete() != null) { - delete().validate(); - } - if (set() != null) { - set().validate(); - } - if (add() != null) { - add().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", add()); + jsonWriter.writeJsonField("add", this.add); jsonWriter.writeJsonField("delete", this.delete); jsonWriter.writeJsonField("set", this.set); return jsonWriter.writeEndObject(); @@ -126,7 +125,7 @@ public static ActionIpCommunityProperties fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("add".equals(fieldName)) { - deserializedActionIpCommunityProperties.withAdd(IpCommunityIdList.fromJson(reader)); + deserializedActionIpCommunityProperties.add = IpCommunityIdList.fromJson(reader); } else if ("delete".equals(fieldName)) { deserializedActionIpCommunityProperties.delete = IpCommunityIdList.fromJson(reader); } else if ("set".equals(fieldName)) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java new file mode 100644 index 000000000000..d8b218a7f13b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IP Extended Community Properties. + */ +@Fluent +public final class ActionIpExtendedCommunityPatchProperties + implements JsonSerializable { + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList add; + + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList delete; + + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList set; + + /** + * Creates an instance of ActionIpExtendedCommunityPatchProperties class. + */ + public ActionIpExtendedCommunityPatchProperties() { + } + + /** + * Get the add property: List of IP Extended Community IDs. + * + * @return the add value. + */ + public IpExtendedCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Extended Community IDs. + * + * @param add the add value to set. + * @return the ActionIpExtendedCommunityPatchProperties object itself. + */ + public ActionIpExtendedCommunityPatchProperties withAdd(IpExtendedCommunityIdList add) { + this.add = add; + return this; + } + + /** + * Get the delete property: List of IP Extended Community IDs. + * + * @return the delete value. + */ + public IpExtendedCommunityIdList delete() { + return this.delete; + } + + /** + * Set the delete property: List of IP Extended Community IDs. + * + * @param delete the delete value to set. + * @return the ActionIpExtendedCommunityPatchProperties object itself. + */ + public ActionIpExtendedCommunityPatchProperties withDelete(IpExtendedCommunityIdList delete) { + this.delete = delete; + return this; + } + + /** + * Get the set property: List of IP Extended Community IDs. + * + * @return the set value. + */ + public IpExtendedCommunityIdList set() { + return this.set; + } + + /** + * Set the set property: List of IP Extended Community IDs. + * + * @param set the set value to set. + * @return the ActionIpExtendedCommunityPatchProperties object itself. + */ + public ActionIpExtendedCommunityPatchProperties withSet(IpExtendedCommunityIdList set) { + this.set = set; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("add", this.add); + jsonWriter.writeJsonField("delete", this.delete); + jsonWriter.writeJsonField("set", this.set); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionIpExtendedCommunityPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionIpExtendedCommunityPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionIpExtendedCommunityPatchProperties. + */ + public static ActionIpExtendedCommunityPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionIpExtendedCommunityPatchProperties deserializedActionIpExtendedCommunityPatchProperties + = new ActionIpExtendedCommunityPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("add".equals(fieldName)) { + deserializedActionIpExtendedCommunityPatchProperties.add + = IpExtendedCommunityIdList.fromJson(reader); + } else if ("delete".equals(fieldName)) { + deserializedActionIpExtendedCommunityPatchProperties.delete + = IpExtendedCommunityIdList.fromJson(reader); + } else if ("set".equals(fieldName)) { + deserializedActionIpExtendedCommunityPatchProperties.set + = IpExtendedCommunityIdList.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActionIpExtendedCommunityPatchProperties; + }); + } +} 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 b222a7dd0197..37fbaacf48b6 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,13 @@ * IP Extended Community Properties. */ @Fluent -public final class ActionIpExtendedCommunityProperties extends IpExtendedCommunityAddOperationProperties { +public final class ActionIpExtendedCommunityProperties + implements JsonSerializable { + /* + * List of IP Extended Community IDs. + */ + private IpExtendedCommunityIdList add; + /* * List of IP Extended Community IDs. */ @@ -31,6 +38,26 @@ public final class ActionIpExtendedCommunityProperties extends IpExtendedCommuni public ActionIpExtendedCommunityProperties() { } + /** + * Get the add property: List of IP Extended Community IDs. + * + * @return the add value. + */ + public IpExtendedCommunityIdList add() { + return this.add; + } + + /** + * Set the add property: List of IP Extended Community IDs. + * + * @param add the add value to set. + * @return the ActionIpExtendedCommunityProperties object itself. + */ + public ActionIpExtendedCommunityProperties withAdd(IpExtendedCommunityIdList add) { + this.add = add; + return this; + } + /** * Get the delete property: List of IP Extended Community IDs. * @@ -71,40 +98,13 @@ public ActionIpExtendedCommunityProperties withSet(IpExtendedCommunityIdList set return this; } - /** - * {@inheritDoc} - */ - @Override - public ActionIpExtendedCommunityProperties withAdd(IpExtendedCommunityIdList add) { - super.withAdd(add); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (delete() != null) { - delete().validate(); - } - if (set() != null) { - set().validate(); - } - if (add() != null) { - add().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", add()); + jsonWriter.writeJsonField("add", this.add); jsonWriter.writeJsonField("delete", this.delete); jsonWriter.writeJsonField("set", this.set); return jsonWriter.writeEndObject(); @@ -127,7 +127,7 @@ public static ActionIpExtendedCommunityProperties fromJson(JsonReader jsonReader reader.nextToken(); if ("add".equals(fieldName)) { - deserializedActionIpExtendedCommunityProperties.withAdd(IpExtendedCommunityIdList.fromJson(reader)); + deserializedActionIpExtendedCommunityProperties.add = IpExtendedCommunityIdList.fromJson(reader); } else if ("delete".equals(fieldName)) { deserializedActionIpExtendedCommunityProperties.delete = IpExtendedCommunityIdList.fromJson(reader); } else if ("set".equals(fieldName)) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java index d030601d0d28..1e6df33906f3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); 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 index d8989b8dee09..655e4abe5fc2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class AddressFamilyType extends ExpandableStringEnum { /** - * Static value IPv4 for AddressFamilyType. + * AddressType-IPv4. */ public static final AddressFamilyType IPV4 = fromString("IPv4"); /** - * Static value IPv6 for AddressFamilyType. + * AddressType-IPv6. */ public static final AddressFamilyType IPV6 = fromString("IPv6"); 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 39464f4bf748..1a9ceb0650e7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,25 +12,30 @@ */ public final class AdministrativeState extends ExpandableStringEnum { /** - * Static value Enabled for AdministrativeState. + * Enabled Administrative State. */ public static final AdministrativeState ENABLED = fromString("Enabled"); /** - * Static value Disabled for AdministrativeState. + * Disabled Administrative State. */ public static final AdministrativeState DISABLED = fromString("Disabled"); /** - * Static value MAT for AdministrativeState. + * MAT(Manual Action Taken) Administrative State. */ public static final AdministrativeState MAT = fromString("MAT"); /** - * Static value RMA for AdministrativeState. + * RMA(Return Material Authorization) Administrative State. */ public static final AdministrativeState RMA = fromString("RMA"); + /** + * UnderMaintenance Administrative State. + */ + public static final AdministrativeState UNDER_MAINTENANCE = fromString("UnderMaintenance"); + /** * 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 fc558df4de4a..2b055aaba204 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,20 +47,6 @@ public AggregateRoute withPrefix(String prefix) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property prefix in model AggregateRoute")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AggregateRoute.class); - /** * {@inheritDoc} */ 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 9799caa3db62..a12645b0ea37 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,20 +73,6 @@ public AggregateRouteConfiguration withIpv6Routes(List ipv6Route return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java new file mode 100644 index 000000000000..be2b7244b64f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * List of IPv4 and IPv6 aggregate routes. + */ +@Fluent +public final class AggregateRoutePatchConfiguration implements JsonSerializable { + /* + * List of IPv4 Route prefixes. + */ + private List ipv4Routes; + + /* + * List of Ipv6Routes prefixes. + */ + private List ipv6Routes; + + /** + * Creates an instance of AggregateRoutePatchConfiguration class. + */ + public AggregateRoutePatchConfiguration() { + } + + /** + * Get the ipv4Routes property: List of IPv4 Route prefixes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Route prefixes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the AggregateRoutePatchConfiguration object itself. + */ + public AggregateRoutePatchConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of Ipv6Routes prefixes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of Ipv6Routes prefixes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the AggregateRoutePatchConfiguration object itself. + */ + public AggregateRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AggregateRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AggregateRoutePatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AggregateRoutePatchConfiguration. + */ + public static AggregateRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AggregateRoutePatchConfiguration deserializedAggregateRoutePatchConfiguration + = new AggregateRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes = reader.readArray(reader1 -> AggregateRoute.fromJson(reader1)); + deserializedAggregateRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes = reader.readArray(reader1 -> AggregateRoute.fromJson(reader1)); + deserializedAggregateRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedAggregateRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java index 2c86538a0868..b73d4127965a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class AllowASOverride extends ExpandableStringEnum { /** - * Static value Enable for AllowASOverride. + * AllowASOverride-Enable. */ public static final AllowASOverride ENABLE = fromString("Enable"); /** - * Static value Disable for AllowASOverride. + * AllowASOverride-Disable. */ public static final AllowASOverride DISABLE = fromString("Disable"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java deleted file mode 100644 index 8d1a66bf865d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AnnotationResource.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Switch configuration entries require a description to discern between configuration groups. - */ -@Fluent -public class AnnotationResource implements JsonSerializable { - /* - * Switch configuration description. - */ - private String annotation; - - /** - * Creates an instance of AnnotationResource class. - */ - public AnnotationResource() { - } - - /** - * 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 AnnotationResource object itself. - */ - public AnnotationResource withAnnotation(String annotation) { - this.annotation = annotation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", this.annotation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AnnotationResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AnnotationResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AnnotationResource. - */ - public static AnnotationResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AnnotationResource deserializedAnnotationResource = new AnnotationResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedAnnotationResource.annotation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAnnotationResource; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponse.java new file mode 100644 index 000000000000..f449525d002a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponse.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffResponseInner; + +/** + * An immutable client-side representation of ArmConfigurationDiffResponse. + */ +public interface ArmConfigurationDiffResponse { + /** + * Gets the configurationDiffUrl property: Storage URL to the diff file. + * + * @return the configurationDiffUrl value. + */ + String configurationDiffUrl(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffResponseInner + * object. + * + * @return the inner object. + */ + ArmConfigurationDiffResponseInner 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 index 5416efcd2d61..dcd8430fe018 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,22 +12,22 @@ */ public final class BfdAdministrativeState extends ExpandableStringEnum { /** - * Static value Enabled for BfdAdministrativeState. + * Represents the enabled state of BFD administrative state. */ public static final BfdAdministrativeState ENABLED = fromString("Enabled"); /** - * Static value Disabled for BfdAdministrativeState. + * Represents the disabled state of BFD administrative state. */ public static final BfdAdministrativeState DISABLED = fromString("Disabled"); /** - * Static value MAT for BfdAdministrativeState. + * Represents the MAT(Manual Action Taken) state of BFD administrative state. */ public static final BfdAdministrativeState MAT = fromString("MAT"); /** - * Static value RMA for BfdAdministrativeState. + * Represents the RMA(Return Material Authorization) state of BFD administrative state. */ public static final BfdAdministrativeState RMA = fromString("RMA"); 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 982071f6502b..d1ffc4439048 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -86,14 +86,6 @@ public BfdConfiguration withMultiplier(Integer multiplier) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java new file mode 100644 index 000000000000..4cdf748e3083 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BFD configuration properties. + */ +@Fluent +public final class BfdPatchConfiguration implements JsonSerializable { + /* + * Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + */ + private BfdAdministrativeState administrativeState; + + /* + * Interval in milliseconds. Example: 300. + */ + private Integer intervalInMilliSeconds; + + /* + * Multiplier for the Bfd Configuration. Example: 5. + */ + private Integer multiplier; + + /** + * Creates an instance of BfdPatchConfiguration class. + */ + public BfdPatchConfiguration() { + } + + /** + * Get the administrativeState property: Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the intervalInMilliSeconds property: Interval in milliseconds. Example: 300. + * + * @return the intervalInMilliSeconds value. + */ + public Integer intervalInMilliSeconds() { + return this.intervalInMilliSeconds; + } + + /** + * Set the intervalInMilliSeconds property: Interval in milliseconds. Example: 300. + * + * @param intervalInMilliSeconds the intervalInMilliSeconds value to set. + * @return the BfdPatchConfiguration object itself. + */ + public BfdPatchConfiguration withIntervalInMilliSeconds(Integer intervalInMilliSeconds) { + this.intervalInMilliSeconds = intervalInMilliSeconds; + return this; + } + + /** + * Get the multiplier property: Multiplier for the Bfd Configuration. Example: 5. + * + * @return the multiplier value. + */ + 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 BfdPatchConfiguration object itself. + */ + public BfdPatchConfiguration withMultiplier(Integer multiplier) { + this.multiplier = multiplier; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("intervalInMilliSeconds", this.intervalInMilliSeconds); + jsonWriter.writeNumberField("multiplier", this.multiplier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BfdPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BfdPatchConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BfdPatchConfiguration. + */ + public static BfdPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BfdPatchConfiguration deserializedBfdPatchConfiguration = new BfdPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administrativeState".equals(fieldName)) { + deserializedBfdPatchConfiguration.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("intervalInMilliSeconds".equals(fieldName)) { + deserializedBfdPatchConfiguration.intervalInMilliSeconds = reader.getNullable(JsonReader::getInt); + } else if ("multiplier".equals(fieldName)) { + deserializedBfdPatchConfiguration.multiplier = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedBfdPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java new file mode 100644 index 000000000000..2709f4a004af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Border Gateway Protocol (BGP) Administrative State values. + */ +public final class BgpAdministrativeState extends ExpandableStringEnum { + /** + * BgpAdministrativeState-Enabled. + */ + public static final BgpAdministrativeState ENABLED = fromString("Enabled"); + + /** + * BgpAdministrativeState-Disabled. + */ + public static final BgpAdministrativeState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of BgpAdministrativeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BgpAdministrativeState() { + } + + /** + * Creates or finds a BgpAdministrativeState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BgpAdministrativeState. + */ + public static BgpAdministrativeState fromString(String name) { + return fromString(name, BgpAdministrativeState.class); + } + + /** + * Gets known BgpAdministrativeState values. + * + * @return known BgpAdministrativeState values. + */ + public static Collection values() { + return values(BgpAdministrativeState.class); + } +} 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 faae15d1fc80..ffbdf9b5fa4a 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,12 @@ * BGP configuration properties. */ @Fluent -public class BgpConfiguration extends AnnotationResource { +public final class BgpConfiguration implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * BFD configuration properties */ @@ -40,12 +46,12 @@ public class BgpConfiguration extends AnnotationResource { /* * ASN of Network Fabric. Example: 65048. */ - private Long fabricAsn; + private Long fabricASN; /* * Peer ASN. Example: 65047. */ - private Long peerAsn; + private long peerASN; /* * List of BGP IPv4 Listen Range prefixes. @@ -67,12 +73,47 @@ public class BgpConfiguration extends AnnotationResource { */ private List ipv6NeighborAddress; + /* + * InternalNetwork BMP Configuration + */ + private InternalNetworkBmpProperties bmpConfiguration; + + /* + * V4 over V6 bgp session. + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * v6 over v4 bgp session. + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + /** * Creates an instance of BgpConfiguration class. */ public BgpConfiguration() { } + /** + * 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 BgpConfiguration object itself. + */ + public BgpConfiguration withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the bfdConfiguration property: BFD configuration properties. * @@ -156,42 +197,31 @@ public BgpConfiguration withAllowASOverride(AllowASOverride allowASOverride) { } /** - * Get the fabricAsn property: ASN of Network Fabric. Example: 65048. + * Get the fabricASN property: ASN of Network Fabric. Example: 65048. * - * @return the fabricAsn value. - */ - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * Set the fabricAsn property: ASN of Network Fabric. Example: 65048. - * - * @param fabricAsn the fabricAsn value to set. - * @return the BgpConfiguration object itself. + * @return the fabricASN value. */ - BgpConfiguration withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; - return this; + public Long fabricASN() { + return this.fabricASN; } /** - * Get the peerAsn property: Peer ASN. Example: 65047. + * Get the peerASN property: Peer ASN. Example: 65047. * - * @return the peerAsn value. + * @return the peerASN value. */ - public Long peerAsn() { - return this.peerAsn; + public long peerASN() { + return this.peerASN; } /** - * Set the peerAsn property: Peer ASN. Example: 65047. + * Set the peerASN property: Peer ASN. Example: 65047. * - * @param peerAsn the peerAsn value to set. + * @param peerASN the peerASN value to set. * @return the BgpConfiguration object itself. */ - public BgpConfiguration withPeerAsn(Long peerAsn) { - this.peerAsn = peerAsn; + public BgpConfiguration withPeerASN(long peerASN) { + this.peerASN = peerASN; return this; } @@ -276,30 +306,63 @@ public BgpConfiguration withIpv6NeighborAddress(List ipv6Neighb } /** - * {@inheritDoc} + * Get the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @return the bmpConfiguration value. */ - @Override - public BgpConfiguration withAnnotation(String annotation) { - super.withAnnotation(annotation); + public InternalNetworkBmpProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the BgpConfiguration object itself. + */ + public BgpConfiguration withBmpConfiguration(InternalNetworkBmpProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; return this; } /** - * Validates the instance. + * Get the v4OverV6BgpSession property: V4 over V6 bgp session. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the v4OverV6BgpSession value. */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4NeighborAddress() != null) { - ipv4NeighborAddress().forEach(e -> e.validate()); - } - if (ipv6NeighborAddress() != null) { - ipv6NeighborAddress().forEach(e -> e.validate()); - } + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; + } + + /** + * Set the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the BgpConfiguration object itself. + */ + public BgpConfiguration withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; + return this; + } + + /** + * Get the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @return the v6OverV4BgpSession value. + */ + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the BgpConfiguration object itself. + */ + public BgpConfiguration withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; + return this; } /** @@ -308,14 +371,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeLongField("peerASN", this.peerASN); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeStringField("defaultRouteOriginate", this.defaultRouteOriginate == null ? null : this.defaultRouteOriginate.toString()); jsonWriter.writeNumberField("allowAS", this.allowAS); jsonWriter.writeStringField("allowASOverride", this.allowASOverride == null ? null : this.allowASOverride.toString()); - jsonWriter.writeNumberField("peerASN", this.peerAsn); jsonWriter.writeArrayField("ipv4ListenRangePrefixes", this.ipv4ListenRangePrefixes, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipv6ListenRangePrefixes", this.ipv6ListenRangePrefixes, @@ -324,6 +387,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("ipv6NeighborAddress", this.ipv6NeighborAddress, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); return jsonWriter.writeEndObject(); } @@ -333,6 +401,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BgpConfiguration if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the BgpConfiguration. */ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOException { @@ -342,8 +411,10 @@ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedBgpConfiguration.withAnnotation(reader.getString()); + if ("peerASN".equals(fieldName)) { + deserializedBgpConfiguration.peerASN = reader.getLong(); + } else if ("annotation".equals(fieldName)) { + deserializedBgpConfiguration.annotation = reader.getString(); } else if ("bfdConfiguration".equals(fieldName)) { deserializedBgpConfiguration.bfdConfiguration = BfdConfiguration.fromJson(reader); } else if ("defaultRouteOriginate".equals(fieldName)) { @@ -354,9 +425,7 @@ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOExceptio } else if ("allowASOverride".equals(fieldName)) { deserializedBgpConfiguration.allowASOverride = AllowASOverride.fromString(reader.getString()); } else if ("fabricASN".equals(fieldName)) { - deserializedBgpConfiguration.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedBgpConfiguration.peerAsn = reader.getNullable(JsonReader::getLong); + deserializedBgpConfiguration.fabricASN = reader.getNullable(JsonReader::getLong); } else if ("ipv4ListenRangePrefixes".equals(fieldName)) { List ipv4ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); deserializedBgpConfiguration.ipv4ListenRangePrefixes = ipv4ListenRangePrefixes; @@ -371,6 +440,14 @@ public static BgpConfiguration fromJson(JsonReader jsonReader) throws IOExceptio List ipv6NeighborAddress = reader.readArray(reader1 -> NeighborAddress.fromJson(reader1)); deserializedBgpConfiguration.ipv6NeighborAddress = ipv6NeighborAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedBgpConfiguration.bmpConfiguration = InternalNetworkBmpProperties.fromJson(reader); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedBgpConfiguration.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedBgpConfiguration.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java new file mode 100644 index 000000000000..845f3544bba9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BGP configuration properties. + */ +@Fluent +public final class BgpPatchConfiguration implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * BFD configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * Originate a defaultRoute. Ex: "True" | "False". + */ + private BooleanEnumProperty defaultRouteOriginate; + + /* + * Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is + * disable, Possible values are 1-10, default is 2. + */ + private Integer allowAS; + + /* + * Enable Or Disable state. + */ + private AllowASOverride allowASOverride; + + /* + * ASN of Network Fabric. Example: 65048. + */ + private Long fabricASN; + + /* + * Peer ASN. Example: 65047. + */ + private Long peerASN; + + /* + * List of BGP IPv4 Listen Range prefixes. + */ + private List ipv4ListenRangePrefixes; + + /* + * List of BGP IPv6 Listen Ranges prefixes. + */ + private List ipv6ListenRangePrefixes; + + /* + * List with stringified IPv4 Neighbor Addresses. + */ + private List ipv4NeighborAddress; + + /* + * List with stringified IPv6 Neighbor Address. + */ + private List ipv6NeighborAddress; + + /* + * InternalNetwork BMP Configuration + */ + private InternalNetworkBmpPatchProperties bmpConfiguration; + + /* + * V4 over V6 bgp session. + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * v6 over v4 bgp session. + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + + /** + * Creates an instance of BgpPatchConfiguration class. + */ + public BgpPatchConfiguration() { + } + + /** + * 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 BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the defaultRouteOriginate property: Originate a defaultRoute. Ex: "True" | "False". + * + * @return the defaultRouteOriginate value. + */ + public BooleanEnumProperty defaultRouteOriginate() { + return this.defaultRouteOriginate; + } + + /** + * Set the defaultRouteOriginate property: Originate a defaultRoute. Ex: "True" | "False". + * + * @param defaultRouteOriginate the defaultRouteOriginate value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withDefaultRouteOriginate(BooleanEnumProperty defaultRouteOriginate) { + this.defaultRouteOriginate = defaultRouteOriginate; + return this; + } + + /** + * Get the allowAS property: Allows for routes to be received and processed even if the router detects its own ASN + * in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + * + * @return the allowAS value. + */ + public Integer allowAS() { + return this.allowAS; + } + + /** + * Set the allowAS property: Allows for routes to be received and processed even if the router detects its own ASN + * in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + * + * @param allowAS the allowAS value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withAllowAS(Integer allowAS) { + this.allowAS = allowAS; + return this; + } + + /** + * Get the allowASOverride property: Enable Or Disable state. + * + * @return the allowASOverride value. + */ + public AllowASOverride allowASOverride() { + return this.allowASOverride; + } + + /** + * Set the allowASOverride property: Enable Or Disable state. + * + * @param allowASOverride the allowASOverride value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withAllowASOverride(AllowASOverride allowASOverride) { + this.allowASOverride = allowASOverride; + return this; + } + + /** + * Get the fabricASN property: ASN of Network Fabric. Example: 65048. + * + * @return the fabricASN value. + */ + public Long fabricASN() { + return this.fabricASN; + } + + /** + * Get the peerASN property: Peer ASN. Example: 65047. + * + * @return the peerASN value. + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peerASN property: Peer ASN. Example: 65047. + * + * @param peerASN the peerASN value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the ipv4ListenRangePrefixes property: List of BGP IPv4 Listen Range prefixes. + * + * @return the ipv4ListenRangePrefixes value. + */ + public List ipv4ListenRangePrefixes() { + return this.ipv4ListenRangePrefixes; + } + + /** + * Set the ipv4ListenRangePrefixes property: List of BGP IPv4 Listen Range prefixes. + * + * @param ipv4ListenRangePrefixes the ipv4ListenRangePrefixes value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv4ListenRangePrefixes(List ipv4ListenRangePrefixes) { + this.ipv4ListenRangePrefixes = ipv4ListenRangePrefixes; + return this; + } + + /** + * Get the ipv6ListenRangePrefixes property: List of BGP IPv6 Listen Ranges prefixes. + * + * @return the ipv6ListenRangePrefixes value. + */ + public List ipv6ListenRangePrefixes() { + return this.ipv6ListenRangePrefixes; + } + + /** + * Set the ipv6ListenRangePrefixes property: List of BGP IPv6 Listen Ranges prefixes. + * + * @param ipv6ListenRangePrefixes the ipv6ListenRangePrefixes value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv6ListenRangePrefixes(List ipv6ListenRangePrefixes) { + this.ipv6ListenRangePrefixes = ipv6ListenRangePrefixes; + return this; + } + + /** + * Get the ipv4NeighborAddress property: List with stringified IPv4 Neighbor Addresses. + * + * @return the ipv4NeighborAddress value. + */ + public List ipv4NeighborAddress() { + return this.ipv4NeighborAddress; + } + + /** + * Set the ipv4NeighborAddress property: List with stringified IPv4 Neighbor Addresses. + * + * @param ipv4NeighborAddress the ipv4NeighborAddress value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv4NeighborAddress(List ipv4NeighborAddress) { + this.ipv4NeighborAddress = ipv4NeighborAddress; + return this; + } + + /** + * Get the ipv6NeighborAddress property: List with stringified IPv6 Neighbor Address. + * + * @return the ipv6NeighborAddress value. + */ + public List ipv6NeighborAddress() { + return this.ipv6NeighborAddress; + } + + /** + * Set the ipv6NeighborAddress property: List with stringified IPv6 Neighbor Address. + * + * @param ipv6NeighborAddress the ipv6NeighborAddress value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withIpv6NeighborAddress(List ipv6NeighborAddress) { + this.ipv6NeighborAddress = ipv6NeighborAddress; + return this; + } + + /** + * Get the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @return the bmpConfiguration value. + */ + public InternalNetworkBmpPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: InternalNetwork BMP Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withBmpConfiguration(InternalNetworkBmpPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @return the v4OverV6BgpSession value. + */ + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; + } + + /** + * Set the v4OverV6BgpSession property: V4 over V6 bgp session. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; + return this; + } + + /** + * Get the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @return the v6OverV4BgpSession value. + */ + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: v6 over v4 bgp session. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the BgpPatchConfiguration object itself. + */ + public BgpPatchConfiguration withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeStringField("defaultRouteOriginate", + this.defaultRouteOriginate == null ? null : this.defaultRouteOriginate.toString()); + jsonWriter.writeNumberField("allowAS", this.allowAS); + jsonWriter.writeStringField("allowASOverride", + this.allowASOverride == null ? null : this.allowASOverride.toString()); + jsonWriter.writeNumberField("peerASN", this.peerASN); + jsonWriter.writeArrayField("ipv4ListenRangePrefixes", this.ipv4ListenRangePrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv6ListenRangePrefixes", this.ipv6ListenRangePrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv4NeighborAddress", this.ipv4NeighborAddress, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6NeighborAddress", this.ipv6NeighborAddress, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BgpPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BgpPatchConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BgpPatchConfiguration. + */ + public static BgpPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BgpPatchConfiguration deserializedBgpPatchConfiguration = new BgpPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedBgpPatchConfiguration.annotation = reader.getString(); + } else if ("bfdConfiguration".equals(fieldName)) { + deserializedBgpPatchConfiguration.bfdConfiguration = BfdPatchConfiguration.fromJson(reader); + } else if ("defaultRouteOriginate".equals(fieldName)) { + deserializedBgpPatchConfiguration.defaultRouteOriginate + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("allowAS".equals(fieldName)) { + deserializedBgpPatchConfiguration.allowAS = reader.getNullable(JsonReader::getInt); + } else if ("allowASOverride".equals(fieldName)) { + deserializedBgpPatchConfiguration.allowASOverride = AllowASOverride.fromString(reader.getString()); + } else if ("fabricASN".equals(fieldName)) { + deserializedBgpPatchConfiguration.fabricASN = reader.getNullable(JsonReader::getLong); + } else if ("peerASN".equals(fieldName)) { + deserializedBgpPatchConfiguration.peerASN = reader.getNullable(JsonReader::getLong); + } else if ("ipv4ListenRangePrefixes".equals(fieldName)) { + List ipv4ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedBgpPatchConfiguration.ipv4ListenRangePrefixes = ipv4ListenRangePrefixes; + } else if ("ipv6ListenRangePrefixes".equals(fieldName)) { + List ipv6ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedBgpPatchConfiguration.ipv6ListenRangePrefixes = ipv6ListenRangePrefixes; + } else if ("ipv4NeighborAddress".equals(fieldName)) { + List ipv4NeighborAddress + = reader.readArray(reader1 -> NeighborAddressPatch.fromJson(reader1)); + deserializedBgpPatchConfiguration.ipv4NeighborAddress = ipv4NeighborAddress; + } else if ("ipv6NeighborAddress".equals(fieldName)) { + List ipv6NeighborAddress + = reader.readArray(reader1 -> NeighborAddressPatch.fromJson(reader1)); + deserializedBgpPatchConfiguration.ipv6NeighborAddress = ipv6NeighborAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedBgpPatchConfiguration.bmpConfiguration + = InternalNetworkBmpPatchProperties.fromJson(reader); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedBgpPatchConfiguration.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedBgpPatchConfiguration.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBgpPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java new file mode 100644 index 000000000000..6dca9cbff157 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Bit rate in bits per second. + */ +@Fluent +public final class BitRate implements JsonSerializable { + /* + * Bitrate. + */ + private Long rate; + + /* + * Bitrate unit. + */ + private BitRateUnit unit; + + /** + * Creates an instance of BitRate class. + */ + public BitRate() { + } + + /** + * Get the rate property: Bitrate. + * + * @return the rate value. + */ + public Long rate() { + return this.rate; + } + + /** + * Set the rate property: Bitrate. + * + * @param rate the rate value to set. + * @return the BitRate object itself. + */ + public BitRate withRate(Long rate) { + this.rate = rate; + return this; + } + + /** + * Get the unit property: Bitrate unit. + * + * @return the unit value. + */ + public BitRateUnit unit() { + return this.unit; + } + + /** + * Set the unit property: Bitrate unit. + * + * @param unit the unit value to set. + * @return the BitRate object itself. + */ + public BitRate withUnit(BitRateUnit unit) { + this.unit = unit; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("rate", this.rate); + jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BitRate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BitRate if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the BitRate. + */ + public static BitRate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BitRate deserializedBitRate = new BitRate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rate".equals(fieldName)) { + deserializedBitRate.rate = reader.getNullable(JsonReader::getLong); + } else if ("unit".equals(fieldName)) { + deserializedBitRate.unit = BitRateUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBitRate; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java new file mode 100644 index 000000000000..1bb9e75ff436 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Bit rate unit. + */ +public final class BitRateUnit extends ExpandableStringEnum { + /** + * Bit rate unit in bits per second. + */ + public static final BitRateUnit BPS = fromString("bps"); + + /** + * Bit rate unit in kilobits per second. + */ + public static final BitRateUnit KBPS = fromString("Kbps"); + + /** + * Bit rate unit in megabits per second. + */ + public static final BitRateUnit MBPS = fromString("Mbps"); + + /** + * Bit rate unit in gigabits per second. + */ + public static final BitRateUnit GBPS = fromString("Gbps"); + + /** + * Creates a new instance of BitRateUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BitRateUnit() { + } + + /** + * Creates or finds a BitRateUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding BitRateUnit. + */ + public static BitRateUnit fromString(String name) { + return fromString(name, BitRateUnit.class); + } + + /** + * Gets known BitRateUnit values. + * + * @return known BitRateUnit values. + */ + public static Collection values() { + return values(BitRateUnit.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java new file mode 100644 index 000000000000..a6529c37c860 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BMP Configuration patch properties. + */ +@Fluent +public final class BmpConfigurationPatchProperties implements JsonSerializable { + /* + * Enabling a station. Either True/False. + */ + private StationConfigurationState stationConfigurationState; + + /* + * Scope resource ARM Identifier. + */ + private String scopeResourceId; + + /* + * Name of the station. + */ + private String stationName; + + /* + * IP Address of the station. + */ + private String stationIp; + + /* + * Port of the station. Default value is 5000. + */ + private Integer stationPort; + + /* + * Station Connection Mode. + */ + private StationConnectionMode stationConnectionMode; + + /* + * Station Connection Properties. + */ + private StationConnectionPatchProperties stationConnectionProperties; + + /* + * Network of the station + */ + private String stationNetwork; + + /* + * The List of Network ID's that need to be monitored. + */ + private List monitoredNetworks; + + /* + * Export Policy for the BMP Configuration. + */ + private BmpExportPolicy exportPolicy; + + /* + * Monitored Address Families for the BMP Configuration. + */ + private List monitoredAddressFamilies; + + /** + * Creates an instance of BmpConfigurationPatchProperties class. + */ + public BmpConfigurationPatchProperties() { + } + + /** + * Get the stationConfigurationState property: Enabling a station. Either True/False. + * + * @return the stationConfigurationState value. + */ + public StationConfigurationState stationConfigurationState() { + return this.stationConfigurationState; + } + + /** + * Set the stationConfigurationState property: Enabling a station. Either True/False. + * + * @param stationConfigurationState the stationConfigurationState value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withStationConfigurationState(StationConfigurationState stationConfigurationState) { + this.stationConfigurationState = stationConfigurationState; + return this; + } + + /** + * Get the scopeResourceId property: Scope resource ARM Identifier. + * + * @return the scopeResourceId value. + */ + public String scopeResourceId() { + return this.scopeResourceId; + } + + /** + * Set the scopeResourceId property: Scope resource ARM Identifier. + * + * @param scopeResourceId the scopeResourceId value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withScopeResourceId(String scopeResourceId) { + this.scopeResourceId = scopeResourceId; + return this; + } + + /** + * Get the stationName property: Name of the station. + * + * @return the stationName value. + */ + public String stationName() { + return this.stationName; + } + + /** + * Set the stationName property: Name of the station. + * + * @param stationName the stationName value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationName(String stationName) { + this.stationName = stationName; + return this; + } + + /** + * Get the stationIp property: IP Address of the station. + * + * @return the stationIp value. + */ + public String stationIp() { + return this.stationIp; + } + + /** + * Set the stationIp property: IP Address of the station. + * + * @param stationIp the stationIp value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationIp(String stationIp) { + this.stationIp = stationIp; + return this; + } + + /** + * Get the stationPort property: Port of the station. Default value is 5000. + * + * @return the stationPort value. + */ + public Integer stationPort() { + return this.stationPort; + } + + /** + * Set the stationPort property: Port of the station. Default value is 5000. + * + * @param stationPort the stationPort value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationPort(Integer stationPort) { + this.stationPort = stationPort; + return this; + } + + /** + * Get the stationConnectionMode property: Station Connection Mode. + * + * @return the stationConnectionMode value. + */ + public StationConnectionMode stationConnectionMode() { + return this.stationConnectionMode; + } + + /** + * Set the stationConnectionMode property: Station Connection Mode. + * + * @param stationConnectionMode the stationConnectionMode value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationConnectionMode(StationConnectionMode stationConnectionMode) { + this.stationConnectionMode = stationConnectionMode; + return this; + } + + /** + * Get the stationConnectionProperties property: Station Connection Properties. + * + * @return the stationConnectionProperties value. + */ + public StationConnectionPatchProperties stationConnectionProperties() { + return this.stationConnectionProperties; + } + + /** + * Set the stationConnectionProperties property: Station Connection Properties. + * + * @param stationConnectionProperties the stationConnectionProperties value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withStationConnectionProperties(StationConnectionPatchProperties stationConnectionProperties) { + this.stationConnectionProperties = stationConnectionProperties; + return this; + } + + /** + * Get the stationNetwork property: Network of the station. + * + * @return the stationNetwork value. + */ + public String stationNetwork() { + return this.stationNetwork; + } + + /** + * Set the stationNetwork property: Network of the station. + * + * @param stationNetwork the stationNetwork value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withStationNetwork(String stationNetwork) { + this.stationNetwork = stationNetwork; + return this; + } + + /** + * Get the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @return the monitoredNetworks value. + */ + public List monitoredNetworks() { + return this.monitoredNetworks; + } + + /** + * Set the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @param monitoredNetworks the monitoredNetworks value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withMonitoredNetworks(List monitoredNetworks) { + this.monitoredNetworks = monitoredNetworks; + return this; + } + + /** + * Get the exportPolicy property: Export Policy for the BMP Configuration. + * + * @return the exportPolicy value. + */ + public BmpExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Export Policy for the BMP Configuration. + * + * @param exportPolicy the exportPolicy value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties withExportPolicy(BmpExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @return the monitoredAddressFamilies value. + */ + public List monitoredAddressFamilies() { + return this.monitoredAddressFamilies; + } + + /** + * Set the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @param monitoredAddressFamilies the monitoredAddressFamilies value to set. + * @return the BmpConfigurationPatchProperties object itself. + */ + public BmpConfigurationPatchProperties + withMonitoredAddressFamilies(List monitoredAddressFamilies) { + this.monitoredAddressFamilies = monitoredAddressFamilies; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("stationConfigurationState", + this.stationConfigurationState == null ? null : this.stationConfigurationState.toString()); + jsonWriter.writeStringField("scopeResourceId", this.scopeResourceId); + jsonWriter.writeStringField("stationName", this.stationName); + jsonWriter.writeStringField("stationIp", this.stationIp); + jsonWriter.writeNumberField("stationPort", this.stationPort); + jsonWriter.writeStringField("stationConnectionMode", + this.stationConnectionMode == null ? null : this.stationConnectionMode.toString()); + jsonWriter.writeJsonField("stationConnectionProperties", this.stationConnectionProperties); + jsonWriter.writeStringField("stationNetwork", this.stationNetwork); + jsonWriter.writeArrayField("monitoredNetworks", this.monitoredNetworks, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("exportPolicy", this.exportPolicy == null ? null : this.exportPolicy.toString()); + jsonWriter.writeArrayField("monitoredAddressFamilies", this.monitoredAddressFamilies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BmpConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BmpConfigurationPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BmpConfigurationPatchProperties. + */ + public static BmpConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BmpConfigurationPatchProperties deserializedBmpConfigurationPatchProperties + = new BmpConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("stationConfigurationState".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationConfigurationState + = StationConfigurationState.fromString(reader.getString()); + } else if ("scopeResourceId".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.scopeResourceId = reader.getString(); + } else if ("stationName".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationName = reader.getString(); + } else if ("stationIp".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationIp = reader.getString(); + } else if ("stationPort".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationPort = reader.getNullable(JsonReader::getInt); + } else if ("stationConnectionMode".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationConnectionMode + = StationConnectionMode.fromString(reader.getString()); + } else if ("stationConnectionProperties".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationConnectionProperties + = StationConnectionPatchProperties.fromJson(reader); + } else if ("stationNetwork".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.stationNetwork = reader.getString(); + } else if ("monitoredNetworks".equals(fieldName)) { + List monitoredNetworks = reader.readArray(reader1 -> reader1.getString()); + deserializedBmpConfigurationPatchProperties.monitoredNetworks = monitoredNetworks; + } else if ("exportPolicy".equals(fieldName)) { + deserializedBmpConfigurationPatchProperties.exportPolicy + = BmpExportPolicy.fromString(reader.getString()); + } else if ("monitoredAddressFamilies".equals(fieldName)) { + List monitoredAddressFamilies + = reader.readArray(reader1 -> BmpMonitoredAddressFamily.fromString(reader1.getString())); + deserializedBmpConfigurationPatchProperties.monitoredAddressFamilies = monitoredAddressFamilies; + } else { + reader.skipChildren(); + } + } + + return deserializedBmpConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java new file mode 100644 index 000000000000..2ead18e7c106 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * BGP Monitoring Protocol (BMP) Configuration properties. + */ +@Fluent +public final class BmpConfigurationProperties implements JsonSerializable { + /* + * Enabling a station. Either True/False. + */ + private StationConfigurationState stationConfigurationState; + + /* + * Scope resource ARM Identifier. + */ + private String scopeResourceId; + + /* + * Name of the station. + */ + private String stationName; + + /* + * IP Address of the station. + */ + private String stationIp; + + /* + * Port of the station. Default value is 5000. + */ + private Integer stationPort; + + /* + * Station Connection Mode. + */ + private StationConnectionMode stationConnectionMode; + + /* + * Station Connection Properties. + */ + private StationConnectionProperties stationConnectionProperties; + + /* + * Network of the station + */ + private String stationNetwork; + + /* + * The List of Network ID's that need to be monitored. + */ + private List monitoredNetworks; + + /* + * Export Policy for the BMP Configuration. + */ + private BmpExportPolicy exportPolicy; + + /* + * Monitored Address Families for the BMP Configuration. + */ + private List monitoredAddressFamilies; + + /** + * Creates an instance of BmpConfigurationProperties class. + */ + public BmpConfigurationProperties() { + } + + /** + * Get the stationConfigurationState property: Enabling a station. Either True/False. + * + * @return the stationConfigurationState value. + */ + public StationConfigurationState stationConfigurationState() { + return this.stationConfigurationState; + } + + /** + * Set the stationConfigurationState property: Enabling a station. Either True/False. + * + * @param stationConfigurationState the stationConfigurationState value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withStationConfigurationState(StationConfigurationState stationConfigurationState) { + this.stationConfigurationState = stationConfigurationState; + return this; + } + + /** + * Get the scopeResourceId property: Scope resource ARM Identifier. + * + * @return the scopeResourceId value. + */ + public String scopeResourceId() { + return this.scopeResourceId; + } + + /** + * Set the scopeResourceId property: Scope resource ARM Identifier. + * + * @param scopeResourceId the scopeResourceId value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withScopeResourceId(String scopeResourceId) { + this.scopeResourceId = scopeResourceId; + return this; + } + + /** + * Get the stationName property: Name of the station. + * + * @return the stationName value. + */ + public String stationName() { + return this.stationName; + } + + /** + * Set the stationName property: Name of the station. + * + * @param stationName the stationName value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationName(String stationName) { + this.stationName = stationName; + return this; + } + + /** + * Get the stationIp property: IP Address of the station. + * + * @return the stationIp value. + */ + public String stationIp() { + return this.stationIp; + } + + /** + * Set the stationIp property: IP Address of the station. + * + * @param stationIp the stationIp value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationIp(String stationIp) { + this.stationIp = stationIp; + return this; + } + + /** + * Get the stationPort property: Port of the station. Default value is 5000. + * + * @return the stationPort value. + */ + public Integer stationPort() { + return this.stationPort; + } + + /** + * Set the stationPort property: Port of the station. Default value is 5000. + * + * @param stationPort the stationPort value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationPort(Integer stationPort) { + this.stationPort = stationPort; + return this; + } + + /** + * Get the stationConnectionMode property: Station Connection Mode. + * + * @return the stationConnectionMode value. + */ + public StationConnectionMode stationConnectionMode() { + return this.stationConnectionMode; + } + + /** + * Set the stationConnectionMode property: Station Connection Mode. + * + * @param stationConnectionMode the stationConnectionMode value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationConnectionMode(StationConnectionMode stationConnectionMode) { + this.stationConnectionMode = stationConnectionMode; + return this; + } + + /** + * Get the stationConnectionProperties property: Station Connection Properties. + * + * @return the stationConnectionProperties value. + */ + public StationConnectionProperties stationConnectionProperties() { + return this.stationConnectionProperties; + } + + /** + * Set the stationConnectionProperties property: Station Connection Properties. + * + * @param stationConnectionProperties the stationConnectionProperties value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withStationConnectionProperties(StationConnectionProperties stationConnectionProperties) { + this.stationConnectionProperties = stationConnectionProperties; + return this; + } + + /** + * Get the stationNetwork property: Network of the station. + * + * @return the stationNetwork value. + */ + public String stationNetwork() { + return this.stationNetwork; + } + + /** + * Set the stationNetwork property: Network of the station. + * + * @param stationNetwork the stationNetwork value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withStationNetwork(String stationNetwork) { + this.stationNetwork = stationNetwork; + return this; + } + + /** + * Get the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @return the monitoredNetworks value. + */ + public List monitoredNetworks() { + return this.monitoredNetworks; + } + + /** + * Set the monitoredNetworks property: The List of Network ID's that need to be monitored. + * + * @param monitoredNetworks the monitoredNetworks value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withMonitoredNetworks(List monitoredNetworks) { + this.monitoredNetworks = monitoredNetworks; + return this; + } + + /** + * Get the exportPolicy property: Export Policy for the BMP Configuration. + * + * @return the exportPolicy value. + */ + public BmpExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Export Policy for the BMP Configuration. + * + * @param exportPolicy the exportPolicy value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties withExportPolicy(BmpExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @return the monitoredAddressFamilies value. + */ + public List monitoredAddressFamilies() { + return this.monitoredAddressFamilies; + } + + /** + * Set the monitoredAddressFamilies property: Monitored Address Families for the BMP Configuration. + * + * @param monitoredAddressFamilies the monitoredAddressFamilies value to set. + * @return the BmpConfigurationProperties object itself. + */ + public BmpConfigurationProperties + withMonitoredAddressFamilies(List monitoredAddressFamilies) { + this.monitoredAddressFamilies = monitoredAddressFamilies; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("stationConfigurationState", + this.stationConfigurationState == null ? null : this.stationConfigurationState.toString()); + jsonWriter.writeStringField("scopeResourceId", this.scopeResourceId); + jsonWriter.writeStringField("stationName", this.stationName); + jsonWriter.writeStringField("stationIp", this.stationIp); + jsonWriter.writeNumberField("stationPort", this.stationPort); + jsonWriter.writeStringField("stationConnectionMode", + this.stationConnectionMode == null ? null : this.stationConnectionMode.toString()); + jsonWriter.writeJsonField("stationConnectionProperties", this.stationConnectionProperties); + jsonWriter.writeStringField("stationNetwork", this.stationNetwork); + jsonWriter.writeArrayField("monitoredNetworks", this.monitoredNetworks, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("exportPolicy", this.exportPolicy == null ? null : this.exportPolicy.toString()); + jsonWriter.writeArrayField("monitoredAddressFamilies", this.monitoredAddressFamilies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BmpConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BmpConfigurationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BmpConfigurationProperties. + */ + public static BmpConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BmpConfigurationProperties deserializedBmpConfigurationProperties = new BmpConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("stationConfigurationState".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationConfigurationState + = StationConfigurationState.fromString(reader.getString()); + } else if ("scopeResourceId".equals(fieldName)) { + deserializedBmpConfigurationProperties.scopeResourceId = reader.getString(); + } else if ("stationName".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationName = reader.getString(); + } else if ("stationIp".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationIp = reader.getString(); + } else if ("stationPort".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationPort = reader.getNullable(JsonReader::getInt); + } else if ("stationConnectionMode".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationConnectionMode + = StationConnectionMode.fromString(reader.getString()); + } else if ("stationConnectionProperties".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationConnectionProperties + = StationConnectionProperties.fromJson(reader); + } else if ("stationNetwork".equals(fieldName)) { + deserializedBmpConfigurationProperties.stationNetwork = reader.getString(); + } else if ("monitoredNetworks".equals(fieldName)) { + List monitoredNetworks = reader.readArray(reader1 -> reader1.getString()); + deserializedBmpConfigurationProperties.monitoredNetworks = monitoredNetworks; + } else if ("exportPolicy".equals(fieldName)) { + deserializedBmpConfigurationProperties.exportPolicy + = BmpExportPolicy.fromString(reader.getString()); + } else if ("monitoredAddressFamilies".equals(fieldName)) { + List monitoredAddressFamilies + = reader.readArray(reader1 -> BmpMonitoredAddressFamily.fromString(reader1.getString())); + deserializedBmpConfigurationProperties.monitoredAddressFamilies = monitoredAddressFamilies; + } else { + reader.skipChildren(); + } + } + + return deserializedBmpConfigurationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java new file mode 100644 index 000000000000..97f7e00c7f93 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * BGP Monitoring Protocol (BMP) configuration state. + */ +public final class BmpConfigurationState extends ExpandableStringEnum { + /** + * BGP Monitoring Protocol (BMP) ConfigurationState - Enabled. + */ + public static final BmpConfigurationState ENABLED = fromString("Enabled"); + + /** + * BGP Monitoring Protocol (BMP) ConfigurationState - Disabled. + */ + public static final BmpConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of BmpConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BmpConfigurationState() { + } + + /** + * Creates or finds a BmpConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BmpConfigurationState. + */ + public static BmpConfigurationState fromString(String name) { + return fromString(name, BmpConfigurationState.class); + } + + /** + * Gets known BmpConfigurationState values. + * + * @return known BmpConfigurationState values. + */ + public static Collection values() { + return values(BmpConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java new file mode 100644 index 000000000000..b8ce71574c77 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + */ +public final class BmpExportPolicy extends ExpandableStringEnum { + /** + * BMP ExportPolicy Pre-Policy. + */ + public static final BmpExportPolicy PRE_POLICY = fromString("Pre-Policy"); + + /** + * BMP ExportPolicy Post-Policy. + */ + public static final BmpExportPolicy POST_POLICY = fromString("Post-Policy"); + + /** + * BMP ExportPolicy All. + */ + public static final BmpExportPolicy ALL = fromString("All"); + + /** + * Creates a new instance of BmpExportPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BmpExportPolicy() { + } + + /** + * Creates or finds a BmpExportPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding BmpExportPolicy. + */ + public static BmpExportPolicy fromString(String name) { + return fromString(name, BmpExportPolicy.class); + } + + /** + * Gets known BmpExportPolicy values. + * + * @return known BmpExportPolicy values. + */ + public static Collection values() { + return values(BmpExportPolicy.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java new file mode 100644 index 000000000000..baef9cc6453b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Monitored Address Family. + */ +public final class BmpMonitoredAddressFamily extends ExpandableStringEnum { + /** + * IPv4 Unicast. + */ + public static final BmpMonitoredAddressFamily IPV4UNICAST = fromString("ipv4Unicast"); + + /** + * IPv6 Unicast. + */ + public static final BmpMonitoredAddressFamily IPV6UNICAST = fromString("ipv6Unicast"); + + /** + * VPN IPv4. + */ + public static final BmpMonitoredAddressFamily VPN_IPV4 = fromString("vpnIpv4"); + + /** + * VPN IPv6. + */ + public static final BmpMonitoredAddressFamily VPN_IPV6 = fromString("vpnIpv6"); + + /** + * All Address Families. + */ + public static final BmpMonitoredAddressFamily ALL = fromString("All"); + + /** + * Creates a new instance of BmpMonitoredAddressFamily value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BmpMonitoredAddressFamily() { + } + + /** + * Creates or finds a BmpMonitoredAddressFamily from its string representation. + * + * @param name a name to look for. + * @return the corresponding BmpMonitoredAddressFamily. + */ + public static BmpMonitoredAddressFamily fromString(String name) { + return fromString(name, BmpMonitoredAddressFamily.class); + } + + /** + * Gets known BmpMonitoredAddressFamily values. + * + * @return known BmpMonitoredAddressFamily values. + */ + public static Collection values() { + return values(BmpMonitoredAddressFamily.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java index 0b527fc9403e..7fd73236e0c0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * Boolean Enum. Example- True/False. + * Boolean union. Example- True/False. */ public final class BooleanEnumProperty extends ExpandableStringEnum { /** - * Static value True for BooleanEnumProperty. + * EnumProperty-True. */ public static final BooleanEnumProperty TRUE = fromString("True"); /** - * Static value False for BooleanEnumProperty. + * EnumProperty-False. */ public static final BooleanEnumProperty FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java new file mode 100644 index 000000000000..eb5d05a3b092 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Burst size in packets. + */ +@Fluent +public final class BurstSize implements JsonSerializable { + /* + * Burst size. + */ + private Long size; + + /* + * Burst size unit. + */ + private BurstSizeUnit unit; + + /** + * Creates an instance of BurstSize class. + */ + public BurstSize() { + } + + /** + * Get the size property: Burst size. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Burst size. + * + * @param size the size value to set. + * @return the BurstSize object itself. + */ + public BurstSize withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the unit property: Burst size unit. + * + * @return the unit value. + */ + public BurstSizeUnit unit() { + return this.unit; + } + + /** + * Set the unit property: Burst size unit. + * + * @param unit the unit value to set. + * @return the BurstSize object itself. + */ + public BurstSize withUnit(BurstSizeUnit unit) { + this.unit = unit; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BurstSize from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BurstSize if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the BurstSize. + */ + public static BurstSize fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BurstSize deserializedBurstSize = new BurstSize(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedBurstSize.size = reader.getNullable(JsonReader::getLong); + } else if ("unit".equals(fieldName)) { + deserializedBurstSize.unit = BurstSizeUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBurstSize; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java new file mode 100644 index 000000000000..c4f6c6201662 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Burst size unit in packets. + */ +public final class BurstSizeUnit extends ExpandableStringEnum { + /** + * Burst size unit in bytes. + */ + public static final BurstSizeUnit BYTES = fromString("Bytes"); + + /** + * Burst size unit in kilobytes. + */ + public static final BurstSizeUnit KBYTES = fromString("KBytes"); + + /** + * Burst size unit in megabytes. + */ + public static final BurstSizeUnit MBYTES = fromString("MBytes"); + + /** + * Burst size unit in gigabytes. + */ + public static final BurstSizeUnit GBYTES = fromString("GBytes"); + + /** + * Creates a new instance of BurstSizeUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BurstSizeUnit() { + } + + /** + * Creates or finds a BurstSizeUnit from its string representation. + * + * @param name a name to look for. + * @return the corresponding BurstSizeUnit. + */ + public static BurstSizeUnit fromString(String name) { + return fromString(name, BurstSizeUnit.class); + } + + /** + * Gets known BurstSizeUnit values. + * + * @return known BurstSizeUnit values. + */ + public static Collection values() { + return values(BurstSizeUnit.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java new file mode 100644 index 000000000000..376a9d730101 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Commit Batch Details. + */ +@Immutable +public final class CommitBatchDetails implements JsonSerializable { + /* + * List of devices for which the commit operation failed. + */ + private List failedDevices; + + /** + * Creates an instance of CommitBatchDetails class. + */ + private CommitBatchDetails() { + } + + /** + * Get the failedDevices property: List of devices for which the commit operation failed. + * + * @return the failedDevices value. + */ + public List failedDevices() { + return this.failedDevices; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("failedDevices", this.failedDevices, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitBatchDetails. + */ + public static CommitBatchDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchDetails deserializedCommitBatchDetails = new CommitBatchDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failedDevices".equals(fieldName)) { + List failedDevices = reader.readArray(reader1 -> reader1.getString()); + deserializedCommitBatchDetails.failedDevices = failedDevices; + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchDetails; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java new file mode 100644 index 000000000000..65211f475359 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Commit Batch State. + */ +public final class CommitBatchState extends ExpandableStringEnum { + /** + * CommitBatchState-PartialSuccess. + */ + public static final CommitBatchState PROCESSING = fromString("Processing"); + + /** + * CommitBatchState-Succeeded. + */ + public static final CommitBatchState SUCCEEDED = fromString("Succeeded"); + + /** + * CommitBatchState-Failed. + */ + public static final CommitBatchState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CommitBatchState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CommitBatchState() { + } + + /** + * Creates or finds a CommitBatchState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommitBatchState. + */ + public static CommitBatchState fromString(String name) { + return fromString(name, CommitBatchState.class); + } + + /** + * Gets known CommitBatchState values. + * + * @return known CommitBatchState values. + */ + public static Collection values() { + return values(CommitBatchState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java new file mode 100644 index 000000000000..a3b8da941412 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Commit Batch Status Request. + */ +@Fluent +public final class CommitBatchStatusRequest implements JsonSerializable { + /* + * Commit Batch Identifier. If not provided, the latest commit batch status will be returned. + */ + private String commitBatchId; + + /** + * Creates an instance of CommitBatchStatusRequest class. + */ + public CommitBatchStatusRequest() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Set the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @param commitBatchId the commitBatchId value to set. + * @return the CommitBatchStatusRequest object itself. + */ + public CommitBatchStatusRequest withCommitBatchId(String commitBatchId) { + this.commitBatchId = commitBatchId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommitBatchStatusRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommitBatchStatusRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommitBatchStatusRequest. + */ + public static CommitBatchStatusRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommitBatchStatusRequest deserializedCommitBatchStatusRequest = new CommitBatchStatusRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedCommitBatchStatusRequest.commitBatchId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommitBatchStatusRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponse.java new file mode 100644 index 000000000000..4a30a8ffbdec --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponse.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner; + +/** + * An immutable client-side representation of CommitBatchStatusResponse. + */ +public interface CommitBatchStatusResponse { + /** + * Gets the commitBatchId property: Commit Batch Identifier. + * + * @return the commitBatchId value. + */ + String commitBatchId(); + + /** + * Gets the commitBatchState property: Commit Batch State. + * + * @return the commitBatchState value. + */ + CommitBatchState commitBatchState(); + + /** + * Gets the commitBatchDetails property: Commit Batch Details. + * + * @return the commitBatchDetails value. + */ + CommitBatchDetails commitBatchDetails(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner + * object. + * + * @return the inner object. + */ + CommitBatchStatusResponseInner innerModel(); +} 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 index caac04182223..c2ed6b88d36d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,23 +98,6 @@ public CommonDynamicMatchConfiguration withPortGroups(List 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()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java new file mode 100644 index 000000000000..251be8eff0c0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Dynamic match configuration object. + */ +@Fluent +public final class CommonDynamicMatchConfigurationPatch + implements JsonSerializable { + /* + * List of IP Groups. + */ + private List ipGroups; + + /* + * List of vlan groups. + */ + private List vlanGroups; + + /* + * List of the port groups. + */ + private List portGroups; + + /** + * Creates an instance of CommonDynamicMatchConfigurationPatch class. + */ + public CommonDynamicMatchConfigurationPatch() { + } + + /** + * 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 CommonDynamicMatchConfigurationPatch object itself. + */ + public CommonDynamicMatchConfigurationPatch 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 CommonDynamicMatchConfigurationPatch object itself. + */ + public CommonDynamicMatchConfigurationPatch withVlanGroups(List vlanGroups) { + this.vlanGroups = vlanGroups; + return this; + } + + /** + * Get the portGroups property: List of the port groups. + * + * @return the portGroups value. + */ + public List portGroups() { + return this.portGroups; + } + + /** + * Set the portGroups property: List of the port groups. + * + * @param portGroups the portGroups value to set. + * @return the CommonDynamicMatchConfigurationPatch object itself. + */ + public CommonDynamicMatchConfigurationPatch withPortGroups(List portGroups) { + this.portGroups = portGroups; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipGroups", this.ipGroups, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("vlanGroups", this.vlanGroups, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("portGroups", this.portGroups, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonDynamicMatchConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonDynamicMatchConfigurationPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonDynamicMatchConfigurationPatch. + */ + public static CommonDynamicMatchConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonDynamicMatchConfigurationPatch deserializedCommonDynamicMatchConfigurationPatch + = new CommonDynamicMatchConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipGroups".equals(fieldName)) { + List ipGroups + = reader.readArray(reader1 -> IpGroupPatchProperties.fromJson(reader1)); + deserializedCommonDynamicMatchConfigurationPatch.ipGroups = ipGroups; + } else if ("vlanGroups".equals(fieldName)) { + List vlanGroups + = reader.readArray(reader1 -> VlanGroupPatchProperties.fromJson(reader1)); + deserializedCommonDynamicMatchConfigurationPatch.vlanGroups = vlanGroups; + } else if ("portGroups".equals(fieldName)) { + List portGroups + = reader.readArray(reader1 -> PortGroupPatchProperties.fromJson(reader1)); + deserializedCommonDynamicMatchConfigurationPatch.portGroups = portGroups; + } else { + reader.skipChildren(); + } + } + + return deserializedCommonDynamicMatchConfigurationPatch; + }); + } +} 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 deleted file mode 100644 index a8fdc12d4895..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines the common match conditions of the ACL and Network Tap Rule. - */ -@Fluent -public class CommonMatchConditions implements JsonSerializable { - /* - * List of the protocols that need to be matched. - */ - private List protocolTypes; - - /* - * Vlan match condition that needs to be matched. - */ - private VlanMatchCondition vlanMatchCondition; - - /* - * IP condition that needs to be matched. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("vlanMatchCondition", this.vlanMatchCondition); - jsonWriter.writeJsonField("ipCondition", this.ipCondition); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CommonMatchConditions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CommonMatchConditions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CommonMatchConditions. - */ - public static CommonMatchConditions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CommonMatchConditions deserializedCommonMatchConditions = new CommonMatchConditions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("protocolTypes".equals(fieldName)) { - List protocolTypes = reader.readArray(reader1 -> reader1.getString()); - deserializedCommonMatchConditions.protocolTypes = protocolTypes; - } else if ("vlanMatchCondition".equals(fieldName)) { - deserializedCommonMatchConditions.vlanMatchCondition = VlanMatchCondition.fromJson(reader); - } else if ("ipCondition".equals(fieldName)) { - deserializedCommonMatchConditions.ipCondition = IpMatchCondition.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCommonMatchConditions; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java new file mode 100644 index 000000000000..43370713fb1c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Common response for device Ro Commands. + */ +@Immutable +public final class CommonPostActionResponseForDeviceROCommands + implements JsonSerializable { + /* + * Gets the configuration state. + */ + private ConfigurationState configurationState; + + /* + * Predefined link containing Device RO Command output. + */ + private String outputUrl; + + /* + * Device RO command Response limited to 4000 characters. + */ + private String deviceConfigurationPreview; + + /** + * Creates an instance of CommonPostActionResponseForDeviceROCommands class. + */ + private CommonPostActionResponseForDeviceROCommands() { + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the outputUrl property: Predefined link containing Device RO Command output. + * + * @return the outputUrl value. + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * Get the deviceConfigurationPreview property: Device RO command Response limited to 4000 characters. + * + * @return the deviceConfigurationPreview value. + */ + public String deviceConfigurationPreview() { + return this.deviceConfigurationPreview; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("outputUrl", this.outputUrl); + jsonWriter.writeStringField("deviceConfigurationPreview", this.deviceConfigurationPreview); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CommonPostActionResponseForDeviceROCommands from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CommonPostActionResponseForDeviceROCommands if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CommonPostActionResponseForDeviceROCommands. + */ + public static CommonPostActionResponseForDeviceROCommands fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CommonPostActionResponseForDeviceROCommands deserializedCommonPostActionResponseForDeviceROCommands + = new CommonPostActionResponseForDeviceROCommands(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommands.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("outputUrl".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommands.outputUrl = reader.getString(); + } else if ("deviceConfigurationPreview".equals(fieldName)) { + deserializedCommonPostActionResponseForDeviceROCommands.deviceConfigurationPreview + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCommonPostActionResponseForDeviceROCommands; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java new file mode 100644 index 000000000000..2e56a80866d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of CommonPostActionResponseForDeviceROCommandsOperationStatusResult. + */ +public interface CommonPostActionResponseForDeviceROCommandsOperationStatusResult { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the properties property: The additional properties of the operation status result. + * + * @return the properties value. + */ + CommonPostActionResponseForDeviceROCommands properties(); + + /** + * Gets the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner + * object. + * + * @return the inner object. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceRWCommands.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceRWCommands.java new file mode 100644 index 000000000000..351574f8ac47 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceRWCommands.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner; + +/** + * An immutable client-side representation of CommonPostActionResponseForDeviceRWCommands. + */ +public interface CommonPostActionResponseForDeviceRWCommands { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the outputUrl property: Predefined link containing Device Rw Command output. + * + * @return the outputUrl value. + */ + String outputUrl(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner + * object. + * + * @return the inner object. + */ + CommonPostActionResponseForDeviceRWCommandsInner innerModel(); +} 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 index 1d0f8b0c59b5..201fa3cccd6a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,6 +12,13 @@ * An immutable client-side representation of CommonPostActionResponseForDeviceUpdate. */ public interface CommonPostActionResponseForDeviceUpdate { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + /** * Gets the configurationState property: Gets the configuration state. * @@ -33,13 +40,6 @@ public interface CommonPostActionResponseForDeviceUpdate { */ List failedDevices(); - /** - * Gets the error property: The error object. - * - * @return the error value. - */ - ManagementError error(); - /** * Gets the inner * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner object. 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 index 3332a7d14a82..9aa8f3eef0fc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,18 +12,18 @@ */ public interface CommonPostActionResponseForStateUpdate { /** - * Gets the configurationState property: Gets the configuration state. + * Gets the error property: The error object. * - * @return the configurationState value. + * @return the error value. */ - ConfigurationState configurationState(); + ManagementError error(); /** - * Gets the error property: The error object. + * Gets the configurationState property: Gets the configuration state. * - * @return the error value. + * @return the configurationState value. */ - ManagementError error(); + ConfigurationState configurationState(); /** * Gets the inner diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java index e8fb1e6fbb5a..d4fbe364ddcf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * community action types. Example: Permit | Deny. + * Community action types. Example: Permit | Deny. */ public final class CommunityActionTypes extends ExpandableStringEnum { /** - * Static value Permit for CommunityActionTypes. + * Permit Community Action Types. */ public static final CommunityActionTypes PERMIT = fromString("Permit"); /** - * Static value Deny for CommunityActionTypes. + * Deny Community Action Types. */ public static final CommunityActionTypes DENY = fromString("Deny"); 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 5b2541d221c3..775393367bc6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,22 +12,22 @@ */ public final class Condition extends ExpandableStringEnum { /** - * Static value EqualTo for Condition. + * Condition-EqualTo. */ public static final Condition EQUAL_TO = fromString("EqualTo"); /** - * Static value GreaterThanOrEqualTo for Condition. + * Condition-GreaterThanOrEqualTo. */ public static final Condition GREATER_THAN_OR_EQUAL_TO = fromString("GreaterThanOrEqualTo"); /** - * Static value LesserThanOrEqualTo for Condition. + * Condition-LesserThanOrEqualTo. */ public static final Condition LESSER_THAN_OR_EQUAL_TO = fromString("LesserThanOrEqualTo"); /** - * Static value Range for Condition. + * Condition-Range. */ public static final Condition RANGE = fromString("Range"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java new file mode 100644 index 000000000000..f3541de04f3d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Conditional Default Route Configuration properties. + */ +@Fluent +public final class ConditionalDefaultRouteProperties implements JsonSerializable { + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of ConditionalDefaultRouteProperties class. + */ + public ConditionalDefaultRouteProperties() { + } + + /** + * 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 ConditionalDefaultRouteProperties object itself. + */ + public ConditionalDefaultRouteProperties 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 ConditionalDefaultRouteProperties object itself. + */ + public ConditionalDefaultRouteProperties withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConditionalDefaultRouteProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConditionalDefaultRouteProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConditionalDefaultRouteProperties. + */ + public static ConditionalDefaultRouteProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConditionalDefaultRouteProperties deserializedConditionalDefaultRouteProperties + = new ConditionalDefaultRouteProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedConditionalDefaultRouteProperties.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedConditionalDefaultRouteProperties.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedConditionalDefaultRouteProperties; + }); + } +} 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 index c91dbad5a550..8eed2f400d4e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,62 +12,62 @@ */ public final class ConfigurationState extends ExpandableStringEnum { /** - * Static value Succeeded for ConfigurationState. + * Success Configuration State. */ public static final ConfigurationState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ConfigurationState. + * Failed Configuration State. */ public static final ConfigurationState FAILED = fromString("Failed"); /** - * Static value Rejected for ConfigurationState. + * Rejected Configuration State. */ public static final ConfigurationState REJECTED = fromString("Rejected"); /** - * Static value Accepted for ConfigurationState. + * Accepted Configuration State. */ public static final ConfigurationState ACCEPTED = fromString("Accepted"); /** - * Static value Provisioned for ConfigurationState. + * Provisioned Configuration State. */ public static final ConfigurationState PROVISIONED = fromString("Provisioned"); /** - * Static value ErrorProvisioning for ConfigurationState. + * ErrorProvisioning Configuration State. */ public static final ConfigurationState ERROR_PROVISIONING = fromString("ErrorProvisioning"); /** - * Static value Deprovisioning for ConfigurationState. + * Deprovisioning Configuration State. */ public static final ConfigurationState DEPROVISIONING = fromString("Deprovisioning"); /** - * Static value Deprovisioned for ConfigurationState. + * Deprovisioned Configuration State. */ public static final ConfigurationState DEPROVISIONED = fromString("Deprovisioned"); /** - * Static value ErrorDeprovisioning for ConfigurationState. + * ErrorDeprovisioning Configuration State. */ public static final ConfigurationState ERROR_DEPROVISIONING = fromString("ErrorDeprovisioning"); /** - * Static value DeferredControl for ConfigurationState. + * DeferredControl Configuration State. */ public static final ConfigurationState DEFERRED_CONTROL = fromString("DeferredControl"); /** - * Static value Provisioning for ConfigurationState. + * Provisioning Configuration State. */ public static final ConfigurationState PROVISIONING = fromString("Provisioning"); /** - * Static value PendingCommit for ConfigurationState. + * PendingCommit Configuration State. */ public static final ConfigurationState PENDING_COMMIT = fromString("PendingCommit"); 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 index 1a090e6056f1..d30bd4a6afa8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class ConfigurationType extends ExpandableStringEnum { /** - * Static value File for ConfigurationType. + * File Configuration Type. */ public static final ConfigurationType FILE = fromString("File"); /** - * Static value Inline for ConfigurationType. + * Inline Configuration Type. */ public static final ConfigurationType INLINE = fromString("Inline"); 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 c15d07c73ca1..d9706e3b7d47 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 @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +15,12 @@ * Connected Subnet properties. */ @Fluent -public final class ConnectedSubnet extends AnnotationResource { +public final class ConnectedSubnet implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Prefix of the Connected Subnet. */ @@ -28,57 +33,53 @@ public ConnectedSubnet() { } /** - * Get the prefix property: Prefix of the Connected Subnet. + * Get the annotation property: Switch configuration description. * - * @return the prefix value. + * @return the annotation value. */ - public String prefix() { - return this.prefix; + public String annotation() { + return this.annotation; } /** - * Set the prefix property: Prefix of the Connected Subnet. + * Set the annotation property: Switch configuration description. * - * @param prefix the prefix value to set. + * @param annotation the annotation value to set. * @return the ConnectedSubnet object itself. */ - public ConnectedSubnet withPrefix(String prefix) { - this.prefix = prefix; + public ConnectedSubnet withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * {@inheritDoc} + * Get the prefix property: Prefix of the Connected Subnet. + * + * @return the prefix value. */ - @Override - public ConnectedSubnet withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public String prefix() { + return this.prefix; } /** - * Validates the instance. + * Set the prefix property: Prefix of the Connected Subnet. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param prefix the prefix value to set. + * @return the ConnectedSubnet object itself. */ - @Override - public void validate() { - if (prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property prefix in model ConnectedSubnet")); - } + public ConnectedSubnet withPrefix(String prefix) { + this.prefix = prefix; + return this; } - private static final ClientLogger LOGGER = new ClientLogger(ConnectedSubnet.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("prefix", this.prefix); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -98,10 +99,10 @@ public static ConnectedSubnet fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedConnectedSubnet.withAnnotation(reader.getString()); - } else if ("prefix".equals(fieldName)) { + if ("prefix".equals(fieldName)) { deserializedConnectedSubnet.prefix = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedConnectedSubnet.annotation = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java new file mode 100644 index 000000000000..aa0bdb131a16 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Connected Subnet properties. + */ +@Fluent +public final class ConnectedSubnetPatch implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Prefix of the Connected Subnet. + */ + private String prefix; + + /** + * Creates an instance of ConnectedSubnetPatch class. + */ + public ConnectedSubnetPatch() { + } + + /** + * 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 ConnectedSubnetPatch object itself. + */ + public ConnectedSubnetPatch withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the prefix property: Prefix of the Connected Subnet. + * + * @return the prefix value. + */ + public String prefix() { + return this.prefix; + } + + /** + * Set the prefix property: Prefix of the Connected Subnet. + * + * @param prefix the prefix value to set. + * @return the ConnectedSubnetPatch object itself. + */ + public ConnectedSubnetPatch withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("prefix", this.prefix); + jsonWriter.writeStringField("annotation", this.annotation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedSubnetPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedSubnetPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectedSubnetPatch. + */ + public static ConnectedSubnetPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedSubnetPatch deserializedConnectedSubnetPatch = new ConnectedSubnetPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefix".equals(fieldName)) { + deserializedConnectedSubnetPatch.prefix = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedConnectedSubnetPatch.annotation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedSubnetPatch; + }); + } +} 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 index cf5144984ae9..1f9e74863008 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,11 +16,6 @@ */ @Fluent public final class ConnectedSubnetRoutePolicy implements JsonSerializable { - /* - * ARM Resource ID of the Route Policy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - /* * Array of ARM Resource ID of the RoutePolicies. */ @@ -32,28 +27,6 @@ public final class ConnectedSubnetRoutePolicy implements JsonSerializable { + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + private L3ExportRoutePolicyPatch exportRoutePolicy; + + /** + * Creates an instance of ConnectedSubnetRoutePolicyPatch class. + */ + public ConnectedSubnetRoutePolicyPatch() { + } + + /** + * Get the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @return the exportRoutePolicy value. + */ + public L3ExportRoutePolicyPatch 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 ConnectedSubnetRoutePolicyPatch object itself. + */ + public ConnectedSubnetRoutePolicyPatch withExportRoutePolicy(L3ExportRoutePolicyPatch exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectedSubnetRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectedSubnetRoutePolicyPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConnectedSubnetRoutePolicyPatch. + */ + public static ConnectedSubnetRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectedSubnetRoutePolicyPatch deserializedConnectedSubnetRoutePolicyPatch + = new ConnectedSubnetRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportRoutePolicy".equals(fieldName)) { + deserializedConnectedSubnetRoutePolicyPatch.exportRoutePolicy + = L3ExportRoutePolicyPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectedSubnetRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java index 4ac7dcee63b3..07192755e404 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Network Fabric Controller services. */ -@Fluent +@Immutable public final class ControllerServices implements JsonSerializable { /* * The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, then the default @@ -31,7 +31,7 @@ public final class ControllerServices implements JsonSerializable ipv4AddressSpaces() { return this.ipv4AddressSpaces; } - /** - * Set the ipv4AddressSpaces property: 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. - * - * @param ipv4AddressSpaces the ipv4AddressSpaces value to set. - * @return the ControllerServices object itself. - */ - public ControllerServices withIpv4AddressSpaces(List ipv4AddressSpaces) { - this.ipv4AddressSpaces = ipv4AddressSpaces; - return this; - } - /** * Get the ipv6AddressSpaces property: The IPv6 is not supported right now. * @@ -67,25 +54,6 @@ 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 ControllerServices object itself. - */ - public ControllerServices withIpv6AddressSpaces(List ipv6AddressSpaces) { - this.ipv6AddressSpaces = ipv6AddressSpaces; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java new file mode 100644 index 000000000000..2d2b4d5b6400 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The network tap destination properties. + */ +@Fluent +public final class DestinationPatchProperties implements JsonSerializable { + /* + * Destination name. + */ + private String name; + + /* + * Type of destination. Input can be IsolationDomain or Direct. + */ + private DestinationType destinationType; + + /* + * The destination Id. ARM Resource ID of either NNI or Internal Networks. + */ + private String destinationId; + + /* + * Isolation Domain Properties. + */ + private IsolationDomainPatchProperties isolationDomainProperties; + + /* + * ARM Resource ID of destination Tap Rule that contains match configurations. + */ + private String destinationTapRuleId; + + /** + * Creates an instance of DestinationPatchProperties class. + */ + public DestinationPatchProperties() { + } + + /** + * 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 DestinationPatchProperties object itself. + */ + public DestinationPatchProperties 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 DestinationPatchProperties object itself. + */ + public DestinationPatchProperties 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 DestinationPatchProperties object itself. + */ + public DestinationPatchProperties withDestinationId(String destinationId) { + this.destinationId = destinationId; + return this; + } + + /** + * Get the isolationDomainProperties property: Isolation Domain Properties. + * + * @return the isolationDomainProperties value. + */ + public IsolationDomainPatchProperties isolationDomainProperties() { + return this.isolationDomainProperties; + } + + /** + * Set the isolationDomainProperties property: Isolation Domain Properties. + * + * @param isolationDomainProperties the isolationDomainProperties value to set. + * @return the DestinationPatchProperties object itself. + */ + public DestinationPatchProperties + withIsolationDomainProperties(IsolationDomainPatchProperties 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 DestinationPatchProperties object itself. + */ + public DestinationPatchProperties withDestinationTapRuleId(String destinationTapRuleId) { + this.destinationTapRuleId = destinationTapRuleId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("destinationType", + this.destinationType == null ? null : this.destinationType.toString()); + jsonWriter.writeStringField("destinationId", this.destinationId); + jsonWriter.writeJsonField("isolationDomainProperties", this.isolationDomainProperties); + jsonWriter.writeStringField("destinationTapRuleId", this.destinationTapRuleId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DestinationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DestinationPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DestinationPatchProperties. + */ + public static DestinationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DestinationPatchProperties deserializedDestinationPatchProperties = new DestinationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDestinationPatchProperties.name = reader.getString(); + } else if ("destinationType".equals(fieldName)) { + deserializedDestinationPatchProperties.destinationType + = DestinationType.fromString(reader.getString()); + } else if ("destinationId".equals(fieldName)) { + deserializedDestinationPatchProperties.destinationId = reader.getString(); + } else if ("isolationDomainProperties".equals(fieldName)) { + deserializedDestinationPatchProperties.isolationDomainProperties + = IsolationDomainPatchProperties.fromJson(reader); + } else if ("destinationTapRuleId".equals(fieldName)) { + deserializedDestinationPatchProperties.destinationTapRuleId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDestinationPatchProperties; + }); + } +} 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 index a7b4e197b468..7b21025addbf 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -15,7 +15,7 @@ * The network tap destination properties. */ @Fluent -public class DestinationProperties implements JsonSerializable { +public final class DestinationProperties implements JsonSerializable { /* * Destination name. */ @@ -149,17 +149,6 @@ public DestinationProperties withDestinationTapRuleId(String destinationTapRuleI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (isolationDomainProperties() != null) { - isolationDomainProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -181,6 +170,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DestinationProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DestinationProperties. */ public static DestinationProperties fromJson(JsonReader jsonReader) throws IOException { 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 index 7f2778885e80..820efa3a5baa 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class DestinationType extends ExpandableStringEnum { /** - * Static value IsolationDomain for DestinationType. + * DestinationType-IsolationDomain. */ public static final DestinationType ISOLATION_DOMAIN = fromString("IsolationDomain"); /** - * Static value Direct for DestinationType. + * DestinationType-Direct. */ public static final DestinationType DIRECT = fromString("Direct"); 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 index 74018cd0eee2..f25d15929293 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,25 +12,50 @@ */ public final class DeviceAdministrativeState extends ExpandableStringEnum { /** - * Static value RMA for DeviceAdministrativeState. + * Device AdministrativeState-RMA. */ public static final DeviceAdministrativeState RMA = fromString("RMA"); /** - * Static value Resync for DeviceAdministrativeState. + * Device AdministrativeState-RMA(Return Material Authorization) Ungraceful. + */ + public static final DeviceAdministrativeState UNGRACEFUL_RMA = fromString("UngracefulRMA"); + + /** + * Device AdministrativeState-Resync. */ public static final DeviceAdministrativeState RESYNC = fromString("Resync"); /** - * Static value GracefulQuarantine for DeviceAdministrativeState. + * Device AdministrativeState-GracefulQuarantine. */ public static final DeviceAdministrativeState GRACEFUL_QUARANTINE = fromString("GracefulQuarantine"); /** - * Static value Quarantine for DeviceAdministrativeState. + * Device AdministrativeState-UngracefulQuarantine. + */ + public static final DeviceAdministrativeState UNGRACEFUL_QUARANTINE = fromString("UngracefulQuarantine"); + + /** + * Device AdministrativeState-Quarantine. */ public static final DeviceAdministrativeState QUARANTINE = fromString("Quarantine"); + /** + * Device AdministrativeState-UnderMaintenance. + */ + public static final DeviceAdministrativeState UNDER_MAINTENANCE = fromString("UnderMaintenance"); + + /** + * Device AdministrativeState-Enable. + */ + public static final DeviceAdministrativeState ENABLE = fromString("Enable"); + + /** + * Device AdministrativeState-Disable. + */ + public static final DeviceAdministrativeState DISABLE = fromString("Disable"); + /** * Creates a new instance of DeviceAdministrativeState value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java index 4a9ce51ef40b..cdaa405f0a5d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Network device interface properties. */ -@Fluent +@Immutable public final class DeviceInterfaceProperties implements JsonSerializable { /* * Interface identifier. Example: HundredGigE0/0. @@ -35,7 +35,7 @@ public final class DeviceInterfaceProperties implements JsonSerializable supportedConnectorTypes() { return this.supportedConnectorTypes; } - /** - * Set the supportedConnectorTypes property: List of supported connector types. - * - * @param supportedConnectorTypes the supportedConnectorTypes value to set. - * @return the DeviceInterfaceProperties object itself. - */ - public DeviceInterfaceProperties - withSupportedConnectorTypes(List supportedConnectorTypes) { - this.supportedConnectorTypes = supportedConnectorTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedConnectorTypes() != null) { - supportedConnectorTypes().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java new file mode 100644 index 000000000000..411a0303c4c5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Provide the RO command. + */ +@Fluent +public final class DeviceRoCommand implements JsonSerializable { + /* + * Specify the command. + */ + private String command; + + /** + * Creates an instance of DeviceRoCommand class. + */ + public DeviceRoCommand() { + } + + /** + * Get the command property: Specify the command. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: Specify the command. + * + * @param command the command value to set. + * @return the DeviceRoCommand object itself. + */ + public DeviceRoCommand withCommand(String command) { + this.command = command; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("command", this.command); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeviceRoCommand from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeviceRoCommand if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DeviceRoCommand. + */ + public static DeviceRoCommand fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeviceRoCommand deserializedDeviceRoCommand = new DeviceRoCommand(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("command".equals(fieldName)) { + deserializedDeviceRoCommand.command = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeviceRoCommand; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java new file mode 100644 index 000000000000..aa1107b639af --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Device Role. + */ +public final class DeviceRole extends ExpandableStringEnum { + /** + * DeviceRole - Customer Edge (CE). + */ + public static final DeviceRole CE = fromString("CE"); + + /** + * DeviceRole - Top of Rack (ToR). + */ + public static final DeviceRole TOR = fromString("ToR"); + + /** + * DeviceRole - Network Packet Broker (NPB). + */ + public static final DeviceRole NPB = fromString("NPB"); + + /** + * Device Role Management Switch. + */ + public static final DeviceRole MANAGEMENT_SWITCH = fromString("ManagementSwitch"); + + /** + * Creates a new instance of DeviceRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeviceRole() { + } + + /** + * Creates or finds a DeviceRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeviceRole. + */ + public static DeviceRole fromString(String name) { + return fromString(name, DeviceRole.class); + } + + /** + * Gets known DeviceRole values. + * + * @return known DeviceRole values. + */ + public static Collection values() { + return values(DeviceRole.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java new file mode 100644 index 000000000000..39f18d9d6733 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Provide the Rw command. + */ +@Fluent +public final class DeviceRwCommand implements JsonSerializable { + /* + * Specify the command. + */ + private String command; + + /** + * Creates an instance of DeviceRwCommand class. + */ + public DeviceRwCommand() { + } + + /** + * Get the command property: Specify the command. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: Specify the command. + * + * @param command the command value to set. + * @return the DeviceRwCommand object itself. + */ + public DeviceRwCommand withCommand(String command) { + this.command = command; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("command", this.command); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeviceRwCommand from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeviceRwCommand if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DeviceRwCommand. + */ + public static DeviceRwCommand fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeviceRwCommand deserializedDeviceRwCommand = new DeviceRwCommand(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("command".equals(fieldName)) { + deserializedDeviceRwCommand.command = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeviceRwCommand; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java new file mode 100644 index 000000000000..5feb1caf2cdc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Discard Commit Batch Request. + */ +@Fluent +public final class DiscardCommitBatchRequest implements JsonSerializable { + /* + * Commit Batch Identifier. If not provided, the latest commit batch status will be returned. + */ + private String commitBatchId; + + /** + * Creates an instance of DiscardCommitBatchRequest class. + */ + public DiscardCommitBatchRequest() { + } + + /** + * Get the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @return the commitBatchId value. + */ + public String commitBatchId() { + return this.commitBatchId; + } + + /** + * Set the commitBatchId property: Commit Batch Identifier. If not provided, the latest commit batch status will be + * returned. + * + * @param commitBatchId the commitBatchId value to set. + * @return the DiscardCommitBatchRequest object itself. + */ + public DiscardCommitBatchRequest withCommitBatchId(String commitBatchId) { + this.commitBatchId = commitBatchId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commitBatchId", this.commitBatchId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscardCommitBatchRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscardCommitBatchRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiscardCommitBatchRequest. + */ + public static DiscardCommitBatchRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscardCommitBatchRequest deserializedDiscardCommitBatchRequest = new DiscardCommitBatchRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commitBatchId".equals(fieldName)) { + deserializedDiscardCommitBatchRequest.commitBatchId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscardCommitBatchRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponse.java new file mode 100644 index 000000000000..0b92361336bd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponse.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner; + +/** + * An immutable client-side representation of DiscardCommitBatchResponse. + */ +public interface DiscardCommitBatchResponse { + /** + * Gets the commitBatchId property: Commit Batch Identifier. + * + * @return the commitBatchId value. + */ + String commitBatchId(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner + * object. + * + * @return the inner object. + */ + DiscardCommitBatchResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.java deleted file mode 100644 index bdb0433da901..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableOnResources.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Update administrative state on list of resources. - */ -@Fluent -public class EnableDisableOnResources implements JsonSerializable { - /* - * Network Fabrics or Network Rack resource Id. - */ - private List resourceIds; - - /** - * Creates an instance of EnableDisableOnResources class. - */ - public EnableDisableOnResources() { - } - - /** - * Get the resourceIds property: Network Fabrics or Network Rack resource Id. - * - * @return the resourceIds value. - */ - public List resourceIds() { - return this.resourceIds; - } - - /** - * Set the resourceIds property: Network Fabrics or Network Rack resource Id. - * - * @param resourceIds the resourceIds value to set. - * @return the EnableDisableOnResources object itself. - */ - public EnableDisableOnResources withResourceIds(List resourceIds) { - this.resourceIds = resourceIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("resourceIds", this.resourceIds, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnableDisableOnResources from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnableDisableOnResources if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnableDisableOnResources. - */ - public static EnableDisableOnResources fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnableDisableOnResources deserializedEnableDisableOnResources = new EnableDisableOnResources(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceIds".equals(fieldName)) { - List resourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedEnableDisableOnResources.resourceIds = resourceIds; - } else { - reader.skipChildren(); - } - } - - return deserializedEnableDisableOnResources; - }); - } -} 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 index 54fa23d64988..fcf382320f50 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class EnableDisableState extends ExpandableStringEnum { /** - * Static value Enable for EnableDisableState. + * AdministrativeState Enable. */ public static final EnableDisableState ENABLE = fromString("Enable"); /** - * Static value Disable for EnableDisableState. + * AdministrativeState Disable. */ public static final EnableDisableState DISABLE = fromString("Disable"); + /** + * AdministrativeState UnderMaintenance. + */ + public static final EnableDisableState UNDER_MAINTENANCE = fromString("UnderMaintenance"); + /** * Creates a new instance of EnableDisableState value. * 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 index ff5510a1f6b7..143124986174 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class Encapsulation extends ExpandableStringEnum { /** - * Static value None for Encapsulation. + * Encapsulation-None. */ public static final Encapsulation NONE = fromString("None"); /** - * Static value GRE for Encapsulation. + * Encapsulation-GRE. */ public static final Encapsulation GRE = fromString("GRE"); 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 index 9c7ab27fc6df..bd0e6ca6dd33 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class EncapsulationType extends ExpandableStringEnum { /** - * Static value None for EncapsulationType. + * None EncapsulationType. */ public static final EncapsulationType NONE = fromString("None"); /** - * Static value GTPv1 for EncapsulationType. + * GTPv1 EncapsulationType. */ public static final EncapsulationType GTPV1 = fromString("GTPv1"); 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 index d5ed9237722e..78df76156e6a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ExportRoutePolicy withExportIpv6RoutePolicyId(String exportIpv6RoutePolic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 4966fd8f4af3..b35857ca1371 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ExportRoutePolicyInformation withExportIpv6RoutePolicyId(String exportIpv return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java new file mode 100644 index 000000000000..2394f9a0dfea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Export Route Policy Configuration. + */ +@Fluent +public final class ExportRoutePolicyInformationPatch implements JsonSerializable { + /* + * Export IPv4 Route Policy Id. + */ + private String exportIpv4RoutePolicyId; + + /* + * Export IPv6 Route Policy Id. + */ + private String exportIpv6RoutePolicyId; + + /** + * Creates an instance of ExportRoutePolicyInformationPatch class. + */ + public ExportRoutePolicyInformationPatch() { + } + + /** + * 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 ExportRoutePolicyInformationPatch object itself. + */ + public ExportRoutePolicyInformationPatch 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 ExportRoutePolicyInformationPatch object itself. + */ + public ExportRoutePolicyInformationPatch withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("exportIpv4RoutePolicyId", this.exportIpv4RoutePolicyId); + jsonWriter.writeStringField("exportIpv6RoutePolicyId", this.exportIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportRoutePolicyInformationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportRoutePolicyInformationPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExportRoutePolicyInformationPatch. + */ + public static ExportRoutePolicyInformationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportRoutePolicyInformationPatch deserializedExportRoutePolicyInformationPatch + = new ExportRoutePolicyInformationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportIpv4RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyInformationPatch.exportIpv4RoutePolicyId = reader.getString(); + } else if ("exportIpv6RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyInformationPatch.exportIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportRoutePolicyInformationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java new file mode 100644 index 000000000000..08d47646917f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Export Route Policy either IPv4 or IPv6. + */ +@Fluent +public final class ExportRoutePolicyPatch implements JsonSerializable { + /* + * ARM resource ID of RoutePolicy. + */ + private String exportIpv4RoutePolicyId; + + /* + * ARM resource ID of RoutePolicy. + */ + private String exportIpv6RoutePolicyId; + + /** + * Creates an instance of ExportRoutePolicyPatch class. + */ + public ExportRoutePolicyPatch() { + } + + /** + * 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 ExportRoutePolicyPatch object itself. + */ + public ExportRoutePolicyPatch 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 ExportRoutePolicyPatch object itself. + */ + public ExportRoutePolicyPatch withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("exportIpv4RoutePolicyId", this.exportIpv4RoutePolicyId); + jsonWriter.writeStringField("exportIpv6RoutePolicyId", this.exportIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExportRoutePolicyPatch. + */ + public static ExportRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportRoutePolicyPatch deserializedExportRoutePolicyPatch = new ExportRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportIpv4RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyPatch.exportIpv4RoutePolicyId = reader.getString(); + } else if ("exportIpv6RoutePolicyId".equals(fieldName)) { + deserializedExportRoutePolicyPatch.exportIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java index 44e30da0763f..3cee932eb837 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -79,26 +78,6 @@ public ExpressRouteConnectionInformation withExpressRouteAuthorizationKey(String return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (expressRouteCircuitId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expressRouteCircuitId in model ExpressRouteConnectionInformation")); - } - if (expressRouteAuthorizationKey() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property expressRouteAuthorizationKey in model ExpressRouteConnectionInformation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExpressRouteConnectionInformation.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java new file mode 100644 index 000000000000..dde13d4ef730 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Extended VLAN status. + */ +public final class ExtendedVlan extends ExpandableStringEnum { + /** + * Extended VLAN is enabled. + */ + public static final ExtendedVlan ENABLED = fromString("Enabled"); + + /** + * Extended VLAN is disabled. + */ + public static final ExtendedVlan DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ExtendedVlan value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedVlan() { + } + + /** + * Creates or finds a ExtendedVlan from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedVlan. + */ + public static ExtendedVlan fromString(String name) { + return fromString(name, ExtendedVlan.class); + } + + /** + * Gets known ExtendedVlan values. + * + * @return known ExtendedVlan values. + */ + public static Collection values() { + return values(ExtendedVlan.class); + } +} 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 index 3bb918ca6c14..2b851c8bb3ed 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class Extension extends ExpandableStringEnum { /** - * Static value NoExtension for Extension. + * Extension-NoExtension. */ public static final Extension NO_EXTENSION = fromString("NoExtension"); /** - * Static value NPB for Extension. + * Extension-NPB. */ public static final Extension NPB = fromString("NPB"); 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 deleted file mode 100644 index 4b5500ccca2f..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Extension property. - */ -@Fluent -public class ExtensionEnumProperty implements JsonSerializable { - /* - * Extension. Example: NoExtension | NPB. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtensionEnumProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtensionEnumProperty if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExtensionEnumProperty. - */ - public static ExtensionEnumProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExtensionEnumProperty deserializedExtensionEnumProperty = new ExtensionEnumProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("extension".equals(fieldName)) { - deserializedExtensionEnumProperty.extension = Extension.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExtensionEnumProperty; - }); - } -} 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 056b4ea38baa..8fd00e8eef70 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -34,98 +34,18 @@ public interface ExternalNetwork { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the peeringOption property: Peering option list. - * - * @return the peeringOption value. - */ - PeeringOption peeringOption(); - - /** - * Gets the optionBProperties property: option B properties object. - * - * @return the optionBProperties value. - */ - L3OptionBProperties optionBProperties(); - - /** - * Gets the optionAProperties property: option A properties object. - * - * @return the optionAProperties value. - */ - ExternalNetworkPropertiesOptionAProperties optionAProperties(); - - /** - * Gets the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. - */ - ConfigurationState configurationState(); - - /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the properties property: External Network Properties. * - * @return the provisioningState value. + * @return the properties value. */ - ProvisioningState provisioningState(); + ExternalNetworkProperties properties(); /** - * Gets the administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - AdministrativeState administrativeState(); - - /** - * Gets the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @return the networkToNetworkInterconnectId value. - */ - String networkToNetworkInterconnectId(); - - /** - * 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 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -145,7 +65,7 @@ public interface ExternalNetwork { * The entirety of the ExternalNetwork definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithPeeringOption, DefinitionStages.WithCreate { + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -169,30 +89,27 @@ interface WithParentResource { * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @return the next definition stage. */ - WithPeeringOption withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); + WithProperties withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); } /** - * The stage of the ExternalNetwork definition allowing to specify peeringOption. + * The stage of the ExternalNetwork definition allowing to specify properties. */ - interface WithPeeringOption { + interface WithProperties { /** - * Specifies the peeringOption property: Peering option list.. + * Specifies the properties property: External Network Properties. * - * @param peeringOption Peering option list. + * @param properties External Network Properties. * @return the next definition stage. */ - WithCreate withPeeringOption(PeeringOption peeringOption); + WithCreate withProperties(ExternalNetworkProperties properties); } /** * The stage of the ExternalNetwork 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.WithOptionBProperties, DefinitionStages.WithOptionAProperties, - DefinitionStages.WithNetworkToNetworkInterconnectId, DefinitionStages.WithImportRoutePolicyId, - DefinitionStages.WithExportRoutePolicyId, DefinitionStages.WithImportRoutePolicy, - DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithAnnotation { + interface WithCreate { /** * Executes the create request. * @@ -208,116 +125,6 @@ interface WithCreate extends DefinitionStages.WithOptionBProperties, DefinitionS */ ExternalNetwork create(Context context); } - - /** - * The stage of the ExternalNetwork definition allowing to specify optionBProperties. - */ - interface WithOptionBProperties { - /** - * Specifies the optionBProperties property: option B properties object. - * - * @param optionBProperties option B properties object. - * @return the next definition stage. - */ - WithCreate withOptionBProperties(L3OptionBProperties optionBProperties); - } - - /** - * The stage of the ExternalNetwork definition allowing to specify optionAProperties. - */ - interface WithOptionAProperties { - /** - * Specifies the optionAProperties property: option A properties object. - * - * @param optionAProperties option A properties object. - * @return the next definition stage. - */ - WithCreate withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties); - } - - /** - * The stage of the ExternalNetwork definition allowing to specify networkToNetworkInterconnectId. - */ - interface WithNetworkToNetworkInterconnectId { - /** - * Specifies the networkToNetworkInterconnectId property: ARM Resource ID of the - * networkToNetworkInterconnectId of the ExternalNetwork resource.. - * - * @param networkToNetworkInterconnectId ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * @return the next definition stage. - */ - WithCreate withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId); - } - - /** - * The stage of the ExternalNetwork definition allowing to specify importRoutePolicyId. - */ - interface WithImportRoutePolicyId { - /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - WithCreate withImportRoutePolicyId(String importRoutePolicyId); - } - - /** - * The stage of the ExternalNetwork definition allowing to specify exportRoutePolicyId. - */ - interface WithExportRoutePolicyId { - /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -330,10 +137,7 @@ interface WithAnnotation { /** * The template for ExternalNetwork update. */ - interface Update extends UpdateStages.WithPeeringOption, UpdateStages.WithOptionBProperties, - UpdateStages.WithOptionAProperties, UpdateStages.WithNetworkToNetworkInterconnectId, - UpdateStages.WithImportRoutePolicyId, UpdateStages.WithExportRoutePolicyId, UpdateStages.WithImportRoutePolicy, - UpdateStages.WithExportRoutePolicy, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -355,126 +159,16 @@ interface Update extends UpdateStages.WithPeeringOption, UpdateStages.WithOption */ interface UpdateStages { /** - * The stage of the ExternalNetwork update allowing to specify peeringOption. + * The stage of the ExternalNetwork update allowing to specify properties. */ - interface WithPeeringOption { + interface WithProperties { /** - * Specifies the peeringOption property: Peering option list.. + * Specifies the properties property: External Network Patch properties.. * - * @param peeringOption Peering option list. + * @param properties External Network Patch properties. * @return the next definition stage. */ - Update withPeeringOption(PeeringOption peeringOption); - } - - /** - * The stage of the ExternalNetwork update allowing to specify optionBProperties. - */ - interface WithOptionBProperties { - /** - * Specifies the optionBProperties property: option B properties object. - * - * @param optionBProperties option B properties object. - * @return the next definition stage. - */ - Update withOptionBProperties(L3OptionBProperties optionBProperties); - } - - /** - * The stage of the ExternalNetwork update allowing to specify optionAProperties. - */ - interface WithOptionAProperties { - /** - * Specifies the optionAProperties property: option A properties object. - * - * @param optionAProperties option A properties object. - * @return the next definition stage. - */ - Update withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties); - } - - /** - * The stage of the ExternalNetwork update allowing to specify networkToNetworkInterconnectId. - */ - interface WithNetworkToNetworkInterconnectId { - /** - * Specifies the networkToNetworkInterconnectId property: ARM Resource ID of the - * networkToNetworkInterconnectId of the ExternalNetwork resource.. - * - * @param networkToNetworkInterconnectId ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * @return the next definition stage. - */ - Update withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId); - } - - /** - * The stage of the ExternalNetwork update allowing to specify importRoutePolicyId. - */ - interface WithImportRoutePolicyId { - /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - Update withImportRoutePolicyId(String importRoutePolicyId); - } - - /** - * The stage of the ExternalNetwork update allowing to specify exportRoutePolicyId. - */ - interface WithExportRoutePolicyId { - /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - Update withAnnotation(String annotation); + Update withProperties(ExternalNetworkPatchProperties properties); } } @@ -494,21 +188,17 @@ interface WithAnnotation { ExternalNetwork refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State 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. - * @return common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param body Request payload. @@ -516,35 +206,32 @@ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + ExternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkBfdAdministrativeStateRequest body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, - Context context); + ExternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(ExternalNetworkBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateRequest.java new file mode 100644 index 000000000000..3025792d2c42 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateRequest.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * External Network Administrative State request. + */ +@Fluent +public final class ExternalNetworkBfdAdministrativeStateRequest + implements JsonSerializable { + /* + * Route Type that helps to know which bfd we are updating. + */ + private ExternalNetworkRouteType routeType; + + /* + * Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of ExternalNetworkBfdAdministrativeStateRequest class. + */ + public ExternalNetworkBfdAdministrativeStateRequest() { + } + + /** + * Get the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + public ExternalNetworkRouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: Route Type that helps to know which bfd we are updating. + * + * @param routeType the routeType value to set. + * @return the ExternalNetworkBfdAdministrativeStateRequest object itself. + */ + public ExternalNetworkBfdAdministrativeStateRequest withRouteType(ExternalNetworkRouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Get the administrativeState property: Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: Administrative state. + * + * @param administrativeState the administrativeState value to set. + * @return the ExternalNetworkBfdAdministrativeStateRequest object itself. + */ + public ExternalNetworkBfdAdministrativeStateRequest + withAdministrativeState(BfdAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkBfdAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkBfdAdministrativeStateRequest if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkBfdAdministrativeStateRequest. + */ + public static ExternalNetworkBfdAdministrativeStateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkBfdAdministrativeStateRequest deserializedExternalNetworkBfdAdministrativeStateRequest + = new ExternalNetworkBfdAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedExternalNetworkBfdAdministrativeStateRequest.routeType + = ExternalNetworkRouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedExternalNetworkBfdAdministrativeStateRequest.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkBfdAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateResponse.java new file mode 100644 index 000000000000..eb5afa1a1ae4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateResponse.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkBfdAdministrativeStateResponseInner; + +/** + * An immutable client-side representation of ExternalNetworkBfdAdministrativeStateResponse. + */ +public interface ExternalNetworkBfdAdministrativeStateResponse { + /** + * Gets the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + ExternalNetworkRouteType routeType(); + + /** + * Gets the administrativeState property: Administrative state. + * + * @return the administrativeState value. + */ + BfdAdministrativeState administrativeState(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkBfdAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + ExternalNetworkBfdAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java new file mode 100644 index 000000000000..ef1538fbed9d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BMP Monitoring Configuration patch properties. + */ +@Fluent +public final class ExternalNetworkBmpPatchProperties implements JsonSerializable { + /* + * BMP Configuration State. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of ExternalNetworkBmpPatchProperties class. + */ + public ExternalNetworkBmpPatchProperties() { + } + + /** + * Get the configurationState property: BMP Configuration State. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: BMP Configuration State. + * + * @param configurationState the configurationState value to set. + * @return the ExternalNetworkBmpPatchProperties object itself. + */ + public ExternalNetworkBmpPatchProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkBmpPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkBmpPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkBmpPatchProperties. + */ + public static ExternalNetworkBmpPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkBmpPatchProperties deserializedExternalNetworkBmpPatchProperties + = new ExternalNetworkBmpPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedExternalNetworkBmpPatchProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkBmpPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java new file mode 100644 index 000000000000..4a630c6b1ce5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BGP Monitoring Protocol (BMP) Configuration properties. + */ +@Fluent +public final class ExternalNetworkBmpProperties implements JsonSerializable { + /* + * BMP Configuration State. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of ExternalNetworkBmpProperties class. + */ + public ExternalNetworkBmpProperties() { + } + + /** + * Get the configurationState property: BMP Configuration State. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: BMP Configuration State. + * + * @param configurationState the configurationState value to set. + * @return the ExternalNetworkBmpProperties object itself. + */ + public ExternalNetworkBmpProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkBmpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkBmpProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkBmpProperties. + */ + public static ExternalNetworkBmpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkBmpProperties deserializedExternalNetworkBmpProperties = new ExternalNetworkBmpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedExternalNetworkBmpProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkBmpProperties; + }); + } +} 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 fcbad0f6faed..e92561ff6bc6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkPatchProperties; import java.io.IOException; /** @@ -20,7 +19,7 @@ public final class ExternalNetworkPatch implements JsonSerializable { /* - * Peering option list. + * Switch configuration description. */ - private PeeringOption peeringOption; + private String annotation; /* - * option B properties object + * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. */ - private L3OptionBProperties optionBProperties; + private String networkToNetworkInterconnectId; /* - * option A properties object + * Import Route Policy either IPv4 or IPv6. */ - private ExternalNetworkPatchPropertiesOptionAProperties optionAProperties; + private ImportRoutePolicyPatch importRoutePolicy; /* - * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. + * Export Route Policy either IPv4 or IPv6. */ - private String networkToNetworkInterconnectId; + private ExportRoutePolicyPatch exportRoutePolicy; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * Peering option list. */ - private String importRoutePolicyId; + private PeeringOption peeringOption; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * option B properties object */ - private String exportRoutePolicyId; + private L3OptionBPatchProperties optionBProperties; /* - * Import Route Policy either IPv4 or IPv6. + * option A properties object */ - private ImportRoutePolicy importRoutePolicy; + private ExternalNetworkPatchPropertiesOptionAProperties optionAProperties; /* - * Export Route Policy either IPv4 or IPv6. + * Static Route Configuration. */ - private ExportRoutePolicy exportRoutePolicy; + private ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration; /** * Creates an instance of ExternalNetworkPatchProperties class. @@ -68,217 +63,183 @@ public ExternalNetworkPatchProperties() { } /** - * Get the peeringOption property: Peering option list. + * Get the annotation property: Switch configuration description. * - * @return the peeringOption value. + * @return the annotation value. */ - public PeeringOption peeringOption() { - return this.peeringOption; + public String annotation() { + return this.annotation; } /** - * Set the peeringOption property: Peering option list. + * Set the annotation property: Switch configuration description. * - * @param peeringOption the peeringOption value to set. + * @param annotation the annotation value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withPeeringOption(PeeringOption peeringOption) { - this.peeringOption = peeringOption; + public ExternalNetworkPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * Get the optionBProperties property: option B properties object. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @return the optionBProperties value. + * @return the networkToNetworkInterconnectId value. */ - public L3OptionBProperties optionBProperties() { - return this.optionBProperties; + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; } /** - * Set the optionBProperties property: option B properties object. + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @param optionBProperties the optionBProperties value to set. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withOptionBProperties(L3OptionBProperties optionBProperties) { - this.optionBProperties = optionBProperties; + public ExternalNetworkPatchProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; return this; } /** - * Get the optionAProperties property: option A properties object. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the optionAProperties value. + * @return the importRoutePolicy value. */ - public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { - return this.optionAProperties; + public ImportRoutePolicyPatch importRoutePolicy() { + return this.importRoutePolicy; } /** - * Set the optionAProperties property: option A properties object. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param optionAProperties the optionAProperties value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties - withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { - this.optionAProperties = optionAProperties; + public ExternalNetworkPatchProperties withImportRoutePolicy(ImportRoutePolicyPatch importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; return this; } /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the networkToNetworkInterconnectId value. + * @return the exportRoutePolicy value. */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; + public ExportRoutePolicyPatch exportRoutePolicy() { + return this.exportRoutePolicy; } /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + public ExternalNetworkPatchProperties withExportRoutePolicy(ExportRoutePolicyPatch exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; return this; } /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the peeringOption property: Peering option list. * - * @return the importRoutePolicyId value. + * @return the peeringOption value. */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; + public PeeringOption peeringOption() { + return this.peeringOption; } /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the peeringOption property: Peering option list. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param peeringOption the peeringOption value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; + public ExternalNetworkPatchProperties withPeeringOption(PeeringOption peeringOption) { + this.peeringOption = peeringOption; return this; } /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionBProperties property: option B properties object. * - * @return the exportRoutePolicyId value. + * @return the optionBProperties value. */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; + public L3OptionBPatchProperties optionBProperties() { + return this.optionBProperties; } /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionBProperties property: option B properties object. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; + public ExternalNetworkPatchProperties withOptionBProperties(L3OptionBPatchProperties optionBProperties) { + this.optionBProperties = optionBProperties; return this; } /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Get the optionAProperties property: option A properties object. * - * @return the importRoutePolicy value. + * @return the optionAProperties value. */ - public ImportRoutePolicy importRoutePolicy() { - return this.importRoutePolicy; + public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { + return this.optionAProperties; } /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Set the optionAProperties property: option A properties object. * - * @param importRoutePolicy the importRoutePolicy value to set. + * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - this.importRoutePolicy = importRoutePolicy; + public ExternalNetworkPatchProperties + withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { + this.optionAProperties = optionAProperties; return this; } /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the staticRouteConfiguration property: Static Route Configuration. * - * @return the exportRoutePolicy value. + * @return the staticRouteConfiguration value. */ - public ExportRoutePolicy exportRoutePolicy() { - return this.exportRoutePolicy; + public ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; } /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Set the staticRouteConfiguration property: Static Route Configuration. * - * @param exportRoutePolicy the exportRoutePolicy value to set. + * @param staticRouteConfiguration the staticRouteConfiguration 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) { - super.withAnnotation(annotation); + public ExternalNetworkPatchProperties + withStaticRouteConfiguration(ExternalNetworkStaticRoutePatchConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (optionBProperties() != null) { - optionBProperties().validate(); - } - if (optionAProperties() != null) { - optionAProperties().validate(); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("peeringOption", this.peeringOption == null ? null : this.peeringOption.toString()); - jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); - jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + jsonWriter.writeStringField("peeringOption", this.peeringOption == null ? null : this.peeringOption.toString()); + jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); + jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); return jsonWriter.writeEndObject(); } @@ -299,25 +260,27 @@ public static ExternalNetworkPatchProperties fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.withAnnotation(reader.getString()); + deserializedExternalNetworkPatchProperties.annotation = reader.getString(); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.networkToNetworkInterconnectId = reader.getString(); + } else if ("importRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.importRoutePolicy + = ImportRoutePolicyPatch.fromJson(reader); + } else if ("exportRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.exportRoutePolicy + = ExportRoutePolicyPatch.fromJson(reader); } else if ("peeringOption".equals(fieldName)) { deserializedExternalNetworkPatchProperties.peeringOption = PeeringOption.fromString(reader.getString()); } else if ("optionBProperties".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.optionBProperties = L3OptionBProperties.fromJson(reader); + deserializedExternalNetworkPatchProperties.optionBProperties + = L3OptionBPatchProperties.fromJson(reader); } else if ("optionAProperties".equals(fieldName)) { deserializedExternalNetworkPatchProperties.optionAProperties = ExternalNetworkPatchPropertiesOptionAProperties.fromJson(reader); - } else if ("networkToNetworkInterconnectId".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.networkToNetworkInterconnectId = reader.getString(); - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchProperties.exportRoutePolicy = ExportRoutePolicy.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedExternalNetworkPatchProperties.staticRouteConfiguration + = ExternalNetworkStaticRoutePatchConfiguration.fromJson(reader); } else { reader.skipChildren(); } 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 index da2135248fde..4ba2b60bcdb9 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,28 @@ * option A properties object. */ @Fluent -public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer3IpPrefixProperties { +public final class ExternalNetworkPatchPropertiesOptionAProperties + implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + /* * MTU to use for option A peering. */ @@ -28,17 +50,17 @@ public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer /* * Fabric ASN number. Example 65001 */ - private Long fabricAsn; + private Long fabricASN; /* * Peer ASN number.Example : 28 */ - private Long peerAsn; + private Long peerASN; /* * BFD configuration properties */ - private BfdConfiguration bfdConfiguration; + private BfdPatchConfiguration bfdConfiguration; /* * Ingress Acl. ARM resource ID of Access Control Lists. @@ -50,12 +72,117 @@ public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer */ private String egressAclId; + /* + * BMP Monitor Configuration. + */ + private ExternalNetworkBmpPatchProperties bmpConfiguration; + + /* + * V4OverV6 BGP Session state + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * V6OverV4 BGP Session state + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + + /* + * Native IPv4 prefix limit configuration + */ + private NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit; + + /* + * Native IPv6 prefix limit configuration + */ + private NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit; + /** * Creates an instance of ExternalNetworkPatchPropertiesOptionAProperties class. */ public ExternalNetworkPatchPropertiesOptionAProperties() { } + /** + * 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 ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties 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 ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties 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 ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties 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 ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + /** * Get the mtu property: MTU to use for option A peering. * @@ -97,31 +224,31 @@ public ExternalNetworkPatchPropertiesOptionAProperties withVlanId(Integer vlanId } /** - * Get the fabricAsn property: Fabric ASN number. Example 65001. + * Get the fabricASN property: Fabric ASN number. Example 65001. * - * @return the fabricAsn value. + * @return the fabricASN value. */ - public Long fabricAsn() { - return this.fabricAsn; + public Long fabricASN() { + return this.fabricASN; } /** - * Get the peerAsn property: Peer ASN number.Example : 28. + * Get the peerASN property: Peer ASN number.Example : 28. * - * @return the peerAsn value. + * @return the peerASN value. */ - public Long peerAsn() { - return this.peerAsn; + public Long peerASN() { + return this.peerASN; } /** - * Set the peerAsn property: Peer ASN number.Example : 28. + * Set the peerASN property: Peer ASN number.Example : 28. * - * @param peerAsn the peerAsn value to set. + * @param peerASN the peerASN value to set. * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. */ - public ExternalNetworkPatchPropertiesOptionAProperties withPeerAsn(Long peerAsn) { - this.peerAsn = peerAsn; + public ExternalNetworkPatchPropertiesOptionAProperties withPeerASN(Long peerASN) { + this.peerASN = peerASN; return this; } @@ -130,7 +257,7 @@ public ExternalNetworkPatchPropertiesOptionAProperties withPeerAsn(Long peerAsn) * * @return the bfdConfiguration value. */ - public BfdConfiguration bfdConfiguration() { + public BfdPatchConfiguration bfdConfiguration() { return this.bfdConfiguration; } @@ -140,7 +267,8 @@ public BfdConfiguration bfdConfiguration() { * @param bfdConfiguration the bfdConfiguration value to set. * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. */ - public ExternalNetworkPatchPropertiesOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + public ExternalNetworkPatchPropertiesOptionAProperties + withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { this.bfdConfiguration = bfdConfiguration; return this; } @@ -186,51 +314,108 @@ public ExternalNetworkPatchPropertiesOptionAProperties withEgressAclId(String eg } /** - * {@inheritDoc} + * Get the bmpConfiguration property: BMP Monitor Configuration. + * + * @return the bmpConfiguration value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + public ExternalNetworkBmpPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BMP Monitor Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withBmpConfiguration(ExternalNetworkBmpPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; return this; } /** - * {@inheritDoc} + * Get the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @return the v4OverV6BgpSession value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; + } + + /** + * Set the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; return this; } /** - * {@inheritDoc} + * Get the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @return the v6OverV4BgpSession value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; return this; } /** - * {@inheritDoc} + * Get the nativeIpv4PrefixLimit property: Native IPv4 prefix limit configuration. + * + * @return the nativeIpv4PrefixLimit value. */ - @Override - public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + public NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 prefix limit configuration. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; return this; } /** - * Validates the instance. + * Get the nativeIpv6PrefixLimit property: Native IPv6 prefix limit configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nativeIpv6PrefixLimit value. */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } + public NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 prefix limit configuration. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties + withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; } /** @@ -239,16 +424,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); jsonWriter.writeNumberField("mtu", this.mtu); jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); + jsonWriter.writeNumberField("peerASN", this.peerASN); jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); jsonWriter.writeStringField("egressAclId", this.egressAclId); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -269,17 +461,15 @@ public static ExternalNetworkPatchPropertiesOptionAProperties fromJson(JsonReade reader.nextToken(); if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withPrimaryIpv4Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.primaryIpv4Prefix = reader.getString(); } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withPrimaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withSecondaryIpv4Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.secondaryIpv4Prefix + = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties - .withSecondaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPatchPropertiesOptionAProperties.secondaryIpv6Prefix + = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); @@ -287,18 +477,33 @@ public static ExternalNetworkPatchPropertiesOptionAProperties fromJson(JsonReade deserializedExternalNetworkPatchPropertiesOptionAProperties.vlanId = reader.getNullable(JsonReader::getInt); } else if ("fabricASN".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties.fabricAsn + deserializedExternalNetworkPatchPropertiesOptionAProperties.fabricASN = reader.getNullable(JsonReader::getLong); } else if ("peerASN".equals(fieldName)) { - deserializedExternalNetworkPatchPropertiesOptionAProperties.peerAsn + deserializedExternalNetworkPatchPropertiesOptionAProperties.peerASN = reader.getNullable(JsonReader::getLong); } else if ("bfdConfiguration".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.bfdConfiguration - = BfdConfiguration.fromJson(reader); + = BfdPatchConfiguration.fromJson(reader); } else if ("ingressAclId".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.ingressAclId = reader.getString(); } else if ("egressAclId".equals(fieldName)) { deserializedExternalNetworkPatchPropertiesOptionAProperties.egressAclId = reader.getString(); + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.bmpConfiguration + = ExternalNetworkBmpPatchProperties.fromJson(reader); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitPatchProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPatchPropertiesOptionAProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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 deleted file mode 100644 index 317fae89bd7b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ExternalNetwork patchable properties. - */ -@Fluent -public class ExternalNetworkPatchableProperties implements JsonSerializable { - /* - * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. - */ - private String networkToNetworkInterconnectId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - - /* - * Import Route Policy either IPv4 or IPv6. - */ - private ImportRoutePolicy importRoutePolicy; - - /* - * Export Route Policy either IPv4 or IPv6. - */ - private ExportRoutePolicy exportRoutePolicy; - - /** - * Creates an instance of ExternalNetworkPatchableProperties class. - */ - public ExternalNetworkPatchableProperties() { - } - - /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @return the networkToNetworkInterconnectId value. - */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; - } - - /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. - * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties - withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * 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 ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. 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 RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - 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 ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties 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 ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - this.exportRoutePolicy = exportRoutePolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); - jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); - jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExternalNetworkPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExternalNetworkPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExternalNetworkPatchableProperties. - */ - public static ExternalNetworkPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExternalNetworkPatchableProperties deserializedExternalNetworkPatchableProperties - = new ExternalNetworkPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("networkToNetworkInterconnectId".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.networkToNetworkInterconnectId = reader.getString(); - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.importRoutePolicy - = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkPatchableProperties.exportRoutePolicy - = ExportRoutePolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedExternalNetworkPatchableProperties; - }); - } -} 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/models/ExternalNetworkProperties.java similarity index 70% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkProperties.java index bf5f26d05865..8664f3b4f6f2 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/models/ExternalNetworkProperties.java @@ -1,84 +1,80 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -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 java.io.IOException; /** * External Network Properties. */ @Fluent -public final class ExternalNetworkProperties extends AnnotationResource { +public final class ExternalNetworkProperties implements JsonSerializable { /* - * Peering option list. + * Switch configuration description. */ - private PeeringOption peeringOption; + private String annotation; /* - * option B properties object + * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. */ - private L3OptionBProperties optionBProperties; + private String networkToNetworkInterconnectId; /* - * option A properties object + * Import Route Policy either IPv4 or IPv6. */ - private ExternalNetworkPropertiesOptionAProperties optionAProperties; + private ImportRoutePolicy importRoutePolicy; /* - * Configuration state of the resource. + * Export Route Policy either IPv4 or IPv6. */ - private ConfigurationState configurationState; + private ExportRoutePolicy exportRoutePolicy; /* - * Provisioning state of the resource. + * Peering option list. */ - private ProvisioningState provisioningState; + private PeeringOption peeringOption; /* - * Administrative state of the resource. + * option B properties object */ - private AdministrativeState administrativeState; + private L3OptionBProperties optionBProperties; /* - * ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource. + * option A properties object */ - private String networkToNetworkInterconnectId; + private ExternalNetworkPropertiesOptionAProperties optionAProperties; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * Static Route Configuration. */ - private String importRoutePolicyId; + private ExternalNetworkStaticRouteConfiguration staticRouteConfiguration; /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + * Details of the last operation performed on the resource */ - private String exportRoutePolicyId; + private LastOperationProperties lastOperation; /* - * Import Route Policy either IPv4 or IPv6. + * Configuration state of the resource. */ - private ImportRoutePolicy importRoutePolicy; + private ConfigurationState configurationState; /* - * Export Route Policy either IPv4 or IPv6. + * Provisioning state of the resource. */ - private ExportRoutePolicy exportRoutePolicy; + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** * Creates an instance of ExternalNetworkProperties class. @@ -87,251 +83,219 @@ public ExternalNetworkProperties() { } /** - * Get the peeringOption property: Peering option list. + * Get the annotation property: Switch configuration description. * - * @return the peeringOption value. + * @return the annotation value. */ - public PeeringOption peeringOption() { - return this.peeringOption; + public String annotation() { + return this.annotation; } /** - * Set the peeringOption property: Peering option list. + * Set the annotation property: Switch configuration description. * - * @param peeringOption the peeringOption value to set. + * @param annotation the annotation value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withPeeringOption(PeeringOption peeringOption) { - this.peeringOption = peeringOption; + public ExternalNetworkProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * Get the optionBProperties property: option B properties object. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @return the optionBProperties value. + * @return the networkToNetworkInterconnectId value. */ - public L3OptionBProperties optionBProperties() { - return this.optionBProperties; + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; } /** - * Set the optionBProperties property: option B properties object. + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the + * ExternalNetwork resource. * - * @param optionBProperties the optionBProperties value to set. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withOptionBProperties(L3OptionBProperties optionBProperties) { - this.optionBProperties = optionBProperties; + public ExternalNetworkProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; return this; } /** - * Get the optionAProperties property: option A properties object. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the optionAProperties value. + * @return the importRoutePolicy value. */ - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.optionAProperties; + public ImportRoutePolicy importRoutePolicy() { + return this.importRoutePolicy; } /** - * Set the optionAProperties property: option A properties object. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param optionAProperties the optionAProperties value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties - withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { - this.optionAProperties = optionAProperties; + public ExternalNetworkProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; 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. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the provisioningState value. + * @return the exportRoutePolicy value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the administrativeState value. + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public ExternalNetworkProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; } /** - * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Get the peeringOption property: Peering option list. * - * @return the networkToNetworkInterconnectId value. + * @return the peeringOption value. */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; + public PeeringOption peeringOption() { + return this.peeringOption; } /** - * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the - * ExternalNetwork resource. + * Set the peeringOption property: Peering option list. * - * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @param peeringOption the peeringOption value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { - this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + public ExternalNetworkProperties withPeeringOption(PeeringOption peeringOption) { + this.peeringOption = peeringOption; return this; } /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionBProperties property: option B properties object. * - * @return the importRoutePolicyId value. + * @return the optionBProperties value. */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; + public L3OptionBProperties optionBProperties() { + return this.optionBProperties; } /** - * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionBProperties property: option B properties object. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; + public ExternalNetworkProperties withOptionBProperties(L3OptionBProperties optionBProperties) { + this.optionBProperties = optionBProperties; return this; } /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Get the optionAProperties property: option A properties object. * - * @return the exportRoutePolicyId value. + * @return the optionAProperties value. */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; + public ExternalNetworkPropertiesOptionAProperties optionAProperties() { + return this.optionAProperties; } /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. + * Set the optionAProperties property: option A properties object. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; + public ExternalNetworkProperties + withOptionAProperties(ExternalNetworkPropertiesOptionAProperties optionAProperties) { + this.optionAProperties = optionAProperties; return this; } /** - * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Get the staticRouteConfiguration property: Static Route Configuration. * - * @return the importRoutePolicy value. + * @return the staticRouteConfiguration value. */ - public ImportRoutePolicy importRoutePolicy() { - return this.importRoutePolicy; + public ExternalNetworkStaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; } /** - * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * Set the staticRouteConfiguration property: Static Route Configuration. * - * @param importRoutePolicy the importRoutePolicy value to set. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - this.importRoutePolicy = importRoutePolicy; + public ExternalNetworkProperties + withStaticRouteConfiguration(ExternalNetworkStaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; return this; } /** - * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the exportRoutePolicy value. + * @return the lastOperation value. */ - public ExportRoutePolicy exportRoutePolicy() { - return this.exportRoutePolicy; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * Get the configurationState property: Configuration state of the resource. * - * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the ExternalNetworkProperties object itself. + * @return the configurationState value. */ - public ExternalNetworkProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - this.exportRoutePolicy = exportRoutePolicy; - return this; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * {@inheritDoc} + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. */ - @Override - public ExternalNetworkProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * Validates the instance. + * Get the administrativeState property: Administrative state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the administrativeState value. */ - @Override - public void validate() { - if (peeringOption() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property peeringOption in model ExternalNetworkProperties")); - } - if (optionBProperties() != null) { - optionBProperties().validate(); - } - if (optionAProperties() != null) { - optionAProperties().validate(); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public AdministrativeState administrativeState() { + return this.administrativeState; } - private static final ClientLogger LOGGER = new ClientLogger(ExternalNetworkProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("peeringOption", this.peeringOption == null ? null : this.peeringOption.toString()); - jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); - jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + jsonWriter.writeJsonField("optionBProperties", this.optionBProperties); + jsonWriter.writeJsonField("optionAProperties", this.optionAProperties); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); return jsonWriter.writeEndObject(); } @@ -351,15 +315,26 @@ public static ExternalNetworkProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedExternalNetworkProperties.withAnnotation(reader.getString()); - } else if ("peeringOption".equals(fieldName)) { + if ("peeringOption".equals(fieldName)) { deserializedExternalNetworkProperties.peeringOption = PeeringOption.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedExternalNetworkProperties.annotation = reader.getString(); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedExternalNetworkProperties.networkToNetworkInterconnectId = reader.getString(); + } else if ("importRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); + } else if ("exportRoutePolicy".equals(fieldName)) { + deserializedExternalNetworkProperties.exportRoutePolicy = ExportRoutePolicy.fromJson(reader); } else if ("optionBProperties".equals(fieldName)) { deserializedExternalNetworkProperties.optionBProperties = L3OptionBProperties.fromJson(reader); } else if ("optionAProperties".equals(fieldName)) { deserializedExternalNetworkProperties.optionAProperties = ExternalNetworkPropertiesOptionAProperties.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedExternalNetworkProperties.staticRouteConfiguration + = ExternalNetworkStaticRouteConfiguration.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedExternalNetworkProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedExternalNetworkProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -369,16 +344,6 @@ public static ExternalNetworkProperties fromJson(JsonReader jsonReader) throws I } else if ("administrativeState".equals(fieldName)) { deserializedExternalNetworkProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("networkToNetworkInterconnectId".equals(fieldName)) { - deserializedExternalNetworkProperties.networkToNetworkInterconnectId = reader.getString(); - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedExternalNetworkProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedExternalNetworkProperties.exportRoutePolicy = ExportRoutePolicy.fromJson(reader); } else { reader.skipChildren(); } 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 644461b1e392..0e4f14dd5437 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,7 +15,28 @@ * option A properties object. */ @Fluent -public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPrefixProperties { +public final class ExternalNetworkPropertiesOptionAProperties + implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + /* * MTU to use for option A peering. */ @@ -23,17 +45,17 @@ public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPr /* * Vlan identifier. Example : 501 */ - private Integer vlanId; + private int vlanId; /* * Fabric ASN number. Example 65001 */ - private Long fabricAsn; + private Long fabricASN; /* * Peer ASN number.Example : 28 */ - private Long peerAsn; + private long peerASN; /* * BFD configuration properties @@ -45,17 +67,122 @@ public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPr */ private String ingressAclId; + /* + * BMP Monitor Configuration. + */ + private ExternalNetworkBmpProperties bmpConfiguration; + /* * Egress Acl. ARM resource ID of Access Control Lists. */ private String egressAclId; + /* + * V4OverV6 BGP Session state + */ + private V4OverV6BgpSessionState v4OverV6BgpSession; + + /* + * V6OverV4 BGP Session state + */ + private V6OverV4BgpSessionState v6OverV4BgpSession; + + /* + * Native IPv4 prefix limits configuration + */ + private NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit; + + /* + * Native IPv6 prefix limits configuration + */ + private NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit; + /** * Creates an instance of ExternalNetworkPropertiesOptionAProperties class. */ public ExternalNetworkPropertiesOptionAProperties() { } + /** + * 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 ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties 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 ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties 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 ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties 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 ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + /** * Get the mtu property: MTU to use for option A peering. * @@ -81,7 +208,7 @@ public ExternalNetworkPropertiesOptionAProperties withMtu(Integer mtu) { * * @return the vlanId value. */ - public Integer vlanId() { + public int vlanId() { return this.vlanId; } @@ -91,37 +218,37 @@ public Integer vlanId() { * @param vlanId the vlanId value to set. * @return the ExternalNetworkPropertiesOptionAProperties object itself. */ - public ExternalNetworkPropertiesOptionAProperties withVlanId(Integer vlanId) { + public ExternalNetworkPropertiesOptionAProperties withVlanId(int vlanId) { this.vlanId = vlanId; return this; } /** - * Get the fabricAsn property: Fabric ASN number. Example 65001. + * Get the fabricASN property: Fabric ASN number. Example 65001. * - * @return the fabricAsn value. + * @return the fabricASN value. */ - public Long fabricAsn() { - return this.fabricAsn; + public Long fabricASN() { + return this.fabricASN; } /** - * Get the peerAsn property: Peer ASN number.Example : 28. + * Get the peerASN property: Peer ASN number.Example : 28. * - * @return the peerAsn value. + * @return the peerASN value. */ - public Long peerAsn() { - return this.peerAsn; + public long peerASN() { + return this.peerASN; } /** - * Set the peerAsn property: Peer ASN number.Example : 28. + * Set the peerASN property: Peer ASN number.Example : 28. * - * @param peerAsn the peerAsn value to set. + * @param peerASN the peerASN value to set. * @return the ExternalNetworkPropertiesOptionAProperties object itself. */ - public ExternalNetworkPropertiesOptionAProperties withPeerAsn(Long peerAsn) { - this.peerAsn = peerAsn; + public ExternalNetworkPropertiesOptionAProperties withPeerASN(long peerASN) { + this.peerASN = peerASN; return this; } @@ -165,6 +292,27 @@ public ExternalNetworkPropertiesOptionAProperties withIngressAclId(String ingres return this; } + /** + * Get the bmpConfiguration property: BMP Monitor Configuration. + * + * @return the bmpConfiguration value. + */ + public ExternalNetworkBmpProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BMP Monitor Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withBmpConfiguration(ExternalNetworkBmpProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + /** * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. * @@ -186,51 +334,87 @@ public ExternalNetworkPropertiesOptionAProperties withEgressAclId(String egressA } /** - * {@inheritDoc} + * Get the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @return the v4OverV6BgpSession value. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); - return this; + public V4OverV6BgpSessionState v4OverV6BgpSession() { + return this.v4OverV6BgpSession; } /** - * {@inheritDoc} + * Set the v4OverV6BgpSession property: V4OverV6 BGP Session state. + * + * @param v4OverV6BgpSession the v4OverV6BgpSession value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + public ExternalNetworkPropertiesOptionAProperties + withV4OverV6BgpSession(V4OverV6BgpSessionState v4OverV6BgpSession) { + this.v4OverV6BgpSession = v4OverV6BgpSession; return this; } /** - * {@inheritDoc} + * Get the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @return the v6OverV4BgpSession value. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + public V6OverV4BgpSessionState v6OverV4BgpSession() { + return this.v6OverV4BgpSession; + } + + /** + * Set the v6OverV4BgpSession property: V6OverV4 BGP Session state. + * + * @param v6OverV4BgpSession the v6OverV4BgpSession value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withV6OverV4BgpSession(V6OverV4BgpSessionState v6OverV4BgpSession) { + this.v6OverV4BgpSession = v6OverV4BgpSession; return this; } /** - * {@inheritDoc} + * Get the nativeIpv4PrefixLimit property: Native IPv4 prefix limits configuration. + * + * @return the nativeIpv4PrefixLimit value. */ - @Override - public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + public NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 prefix limits configuration. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; return this; } /** - * Validates the instance. + * Get the nativeIpv6PrefixLimit property: Native IPv6 prefix limits configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nativeIpv6PrefixLimit value. */ - @Override - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } + public NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 prefix limits configuration. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties + withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; } /** @@ -239,16 +423,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); + jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeLongField("peerASN", this.peerASN); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); jsonWriter.writeStringField("egressAclId", this.egressAclId); + jsonWriter.writeStringField("v4OverV6BgpSession", + this.v4OverV6BgpSession == null ? null : this.v4OverV6BgpSession.toString()); + jsonWriter.writeStringField("v6OverV4BgpSession", + this.v6OverV4BgpSession == null ? null : this.v6OverV4BgpSession.toString()); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -258,6 +449,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExternalNetworkPropertiesOptionAProperties if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ExternalNetworkPropertiesOptionAProperties. */ public static ExternalNetworkPropertiesOptionAProperties fromJson(JsonReader jsonReader) throws IOException { @@ -268,32 +460,45 @@ public static ExternalNetworkPropertiesOptionAProperties fromJson(JsonReader jso String fieldName = reader.getFieldName(); reader.nextToken(); - if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withPrimaryIpv4Prefix(reader.getString()); + if ("vlanId".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.vlanId = reader.getInt(); + } else if ("peerASN".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.peerASN = reader.getLong(); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.primaryIpv4Prefix = reader.getString(); } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withPrimaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPropertiesOptionAProperties.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withSecondaryIpv4Prefix(reader.getString()); + deserializedExternalNetworkPropertiesOptionAProperties.secondaryIpv4Prefix = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.withSecondaryIpv6Prefix(reader.getString()); + deserializedExternalNetworkPropertiesOptionAProperties.secondaryIpv6Prefix = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("vlanId".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.vlanId - = reader.getNullable(JsonReader::getInt); } else if ("fabricASN".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.fabricAsn - = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedExternalNetworkPropertiesOptionAProperties.peerAsn + deserializedExternalNetworkPropertiesOptionAProperties.fabricASN = reader.getNullable(JsonReader::getLong); } else if ("bfdConfiguration".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); } else if ("ingressAclId".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.ingressAclId = reader.getString(); + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.bmpConfiguration + = ExternalNetworkBmpProperties.fromJson(reader); } else if ("egressAclId".equals(fieldName)) { deserializedExternalNetworkPropertiesOptionAProperties.egressAclId = reader.getString(); + } else if ("v4OverV6BgpSession".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.v4OverV6BgpSession + = V4OverV6BgpSessionState.fromString(reader.getString()); + } else if ("v6OverV4BgpSession".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.v6OverV4BgpSession + = V6OverV4BgpSessionState.fromString(reader.getString()); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedExternalNetworkPropertiesOptionAProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java new file mode 100644 index 000000000000..959ac90e3b8b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * External Network RouteType. + */ +public final class ExternalNetworkRouteType extends ExpandableStringEnum { + /** + * ExternalNetwork Static. + */ + public static final ExternalNetworkRouteType STATIC = fromString("Static"); + + /** + * ExternalNetwork OptionA. + */ + public static final ExternalNetworkRouteType OPTIONA = fromString("OptionA"); + + /** + * Creates a new instance of ExternalNetworkRouteType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalNetworkRouteType() { + } + + /** + * Creates or finds a ExternalNetworkRouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalNetworkRouteType. + */ + public static ExternalNetworkRouteType fromString(String name) { + return fromString(name, ExternalNetworkRouteType.class); + } + + /** + * Gets known ExternalNetworkRouteType values. + * + * @return known ExternalNetworkRouteType values. + */ + public static Collection values() { + return values(ExternalNetworkRouteType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java new file mode 100644 index 000000000000..157265e308de --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for ExternalNetwork. + */ +@Fluent +public final class ExternalNetworkStaticRouteConfiguration + implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of ExternalNetworkStaticRouteConfiguration class. + */ + public ExternalNetworkStaticRouteConfiguration() { + } + + /** + * 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 ExternalNetworkStaticRouteConfiguration object itself. + */ + public ExternalNetworkStaticRouteConfiguration 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 ExternalNetworkStaticRouteConfiguration object itself. + */ + public ExternalNetworkStaticRouteConfiguration 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 ExternalNetworkStaticRouteConfiguration object itself. + */ + public ExternalNetworkStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkStaticRouteConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkStaticRouteConfiguration if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkStaticRouteConfiguration. + */ + public static ExternalNetworkStaticRouteConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkStaticRouteConfiguration deserializedExternalNetworkStaticRouteConfiguration + = new ExternalNetworkStaticRouteConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedExternalNetworkStaticRouteConfiguration.bfdConfiguration + = BfdConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRouteConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRouteConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkStaticRouteConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java new file mode 100644 index 000000000000..1bb515b78b3d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for External Network. + */ +@Fluent +public final class ExternalNetworkStaticRoutePatchConfiguration + implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of ExternalNetworkStaticRoutePatchConfiguration class. + */ + public ExternalNetworkStaticRoutePatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the ExternalNetworkStaticRoutePatchConfiguration object itself. + */ + public ExternalNetworkStaticRoutePatchConfiguration withBfdConfiguration(BfdPatchConfiguration 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 ExternalNetworkStaticRoutePatchConfiguration object itself. + */ + public ExternalNetworkStaticRoutePatchConfiguration 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 ExternalNetworkStaticRoutePatchConfiguration object itself. + */ + public ExternalNetworkStaticRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalNetworkStaticRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalNetworkStaticRoutePatchConfiguration if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalNetworkStaticRoutePatchConfiguration. + */ + public static ExternalNetworkStaticRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalNetworkStaticRoutePatchConfiguration deserializedExternalNetworkStaticRoutePatchConfiguration + = new ExternalNetworkStaticRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedExternalNetworkStaticRoutePatchConfiguration.bfdConfiguration + = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedExternalNetworkStaticRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalNetworkStaticRoutePatchConfiguration; + }); + } +} 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 b80fd4bc88eb..b2d36d27291d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface ExternalNetworks { /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso String externalNetworkName, Context context); /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -45,8 +41,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso ExternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -59,8 +53,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +66,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -83,13 +73,11 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display External Networks within an isolation domain. - * * Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,14 +86,12 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of External Networks as paginated response with {@link PagedIterable}. + * @return the response of a ExternalNetwork list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -115,14 +101,12 @@ PagedIterable listByL3IsolationDomain(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,15 +117,13 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -150,15 +132,13 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); + ExternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body); /** - * Executes Static Route BFD state update operation to the underlying resources. - * - * Update Static Route BFD for external Network. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -168,14 +148,13 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); + ExternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String externalNetworkName, ExternalNetworkBfdAdministrativeStateRequest body, + Context context); /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param id the resource ID. @@ -187,8 +166,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S ExternalNetwork getById(String id); /** - * Retrieves details of ExternalNetwork. - * * Implements ExternalNetworks GET method. * * @param id the resource ID. @@ -201,8 +178,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S Response getByIdWithResponse(String id, Context context); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param id the resource ID. @@ -213,8 +188,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S void deleteById(String id); /** - * Deletes a ExternalNetworks. - * * Implements ExternalNetworks DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index 29b298af1db6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import java.io.IOException; -import java.util.List; - -/** - * List of External Networks. - */ -@Fluent -public final class ExternalNetworksList implements JsonSerializable { - /* - * List of External Network resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ExternalNetworksList class. - */ - public ExternalNetworksList() { - } - - /** - * Get the value property: List of External Network resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of External Network resources. - * - * @param value the value value to set. - * @return the ExternalNetworksList object itself. - */ - public ExternalNetworksList 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 ExternalNetworksList object itself. - */ - public ExternalNetworksList 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExternalNetworksList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExternalNetworksList if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ExternalNetworksList. - */ - public static ExternalNetworksList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExternalNetworksList deserializedExternalNetworksList = new ExternalNetworksList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ExternalNetworkInner.fromJson(reader1)); - deserializedExternalNetworksList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedExternalNetworksList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExternalNetworksList; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java new file mode 100644 index 000000000000..63dd106d3f85 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Fabric Lock Configuration. + */ +@Immutable +public final class FabricLockProperties implements JsonSerializable { + /* + * NetworkFabric Lock State. + */ + private LockConfigurationState lockState; + + /* + * NetworkFabric Lock Type. + */ + private NetworkFabricLockType lockType; + + /** + * Creates an instance of FabricLockProperties class. + */ + private FabricLockProperties() { + } + + /** + * Get the lockState property: NetworkFabric Lock State. + * + * @return the lockState value. + */ + public LockConfigurationState lockState() { + return this.lockState; + } + + /** + * Get the lockType property: NetworkFabric Lock Type. + * + * @return the lockType value. + */ + public NetworkFabricLockType lockType() { + return this.lockType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lockState", this.lockState == null ? null : this.lockState.toString()); + jsonWriter.writeStringField("lockType", this.lockType == null ? null : this.lockType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FabricLockProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FabricLockProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FabricLockProperties. + */ + public static FabricLockProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FabricLockProperties deserializedFabricLockProperties = new FabricLockProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lockState".equals(fieldName)) { + deserializedFabricLockProperties.lockState = LockConfigurationState.fromString(reader.getString()); + } else if ("lockType".equals(fieldName)) { + deserializedFabricLockProperties.lockType = NetworkFabricLockType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFabricLockProperties; + }); + } +} 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 index 7c56ccade0b7..b9253838c44e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class FabricSkuType extends ExpandableStringEnum { /** - * Static value SingleRack for FabricSkuType. + * FabricSkuType-SingleRack. */ public static final FabricSkuType SINGLE_RACK = fromString("SingleRack"); /** - * Static value MultiRack for FabricSkuType. + * FabricSkuType-MultiRack. */ public static final FabricSkuType MULTI_RACK = fromString("MultiRack"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java new file mode 100644 index 000000000000..c5377de25d89 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Feature flag properties. + */ +@Immutable +public final class FeatureFlagProperties implements JsonSerializable { + /* + * Feature flag name. + */ + private String featureFlagName; + + /* + * Feature flag value. + */ + private String featureFlagValue; + + /** + * Creates an instance of FeatureFlagProperties class. + */ + private FeatureFlagProperties() { + } + + /** + * Get the featureFlagName property: Feature flag name. + * + * @return the featureFlagName value. + */ + public String featureFlagName() { + return this.featureFlagName; + } + + /** + * Get the featureFlagValue property: Feature flag value. + * + * @return the featureFlagValue value. + */ + public String featureFlagValue() { + return this.featureFlagValue; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("featureFlagName", this.featureFlagName); + jsonWriter.writeStringField("featureFlagValue", this.featureFlagValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FeatureFlagProperties. + */ + public static FeatureFlagProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureFlagProperties deserializedFeatureFlagProperties = new FeatureFlagProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("featureFlagName".equals(fieldName)) { + deserializedFeatureFlagProperties.featureFlagName = reader.getString(); + } else if ("featureFlagValue".equals(fieldName)) { + deserializedFeatureFlagProperties.featureFlagValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureFlagProperties; + }); + } +} 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 index 417a6a7af156..c2d86a2cb873 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class GatewayType extends ExpandableStringEnum { /** - * Static value Infrastructure for GatewayType. + * GatewayType Infrastructure. */ public static final GatewayType INFRASTRUCTURE = fromString("Infrastructure"); /** - * Static value Workload for GatewayType. + * GatewayType Workload. */ public static final GatewayType WORKLOAD = fromString("Workload"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java new file mode 100644 index 000000000000..aaeb7f5df18b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global Access Control List actions patch properties. + */ +@Fluent +public final class GlobalAccessControlListActionPatchProperties + implements JsonSerializable { + /* + * Configuration to enable or disable ACL action count. + */ + private BooleanEnumProperty enableCount; + + /** + * Creates an instance of GlobalAccessControlListActionPatchProperties class. + */ + public GlobalAccessControlListActionPatchProperties() { + } + + /** + * Get the enableCount property: Configuration to enable or disable ACL action count. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable or disable ACL action count. + * + * @param enableCount the enableCount value to set. + * @return the GlobalAccessControlListActionPatchProperties object itself. + */ + public GlobalAccessControlListActionPatchProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalAccessControlListActionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalAccessControlListActionPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalAccessControlListActionPatchProperties. + */ + public static GlobalAccessControlListActionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalAccessControlListActionPatchProperties deserializedGlobalAccessControlListActionPatchProperties + = new GlobalAccessControlListActionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalAccessControlListActionPatchProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalAccessControlListActionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java new file mode 100644 index 000000000000..a5090faecb66 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global Access Control List actions properties. + */ +@Fluent +public final class GlobalAccessControlListActionProperties + implements JsonSerializable { + /* + * Configuration to enable or disable ACL action count. + */ + private BooleanEnumProperty enableCount; + + /** + * Creates an instance of GlobalAccessControlListActionProperties class. + */ + public GlobalAccessControlListActionProperties() { + } + + /** + * Get the enableCount property: Configuration to enable or disable ACL action count. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable or disable ACL action count. + * + * @param enableCount the enableCount value to set. + * @return the GlobalAccessControlListActionProperties object itself. + */ + public GlobalAccessControlListActionProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalAccessControlListActionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalAccessControlListActionProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalAccessControlListActionProperties. + */ + public static GlobalAccessControlListActionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalAccessControlListActionProperties deserializedGlobalAccessControlListActionProperties + = new GlobalAccessControlListActionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalAccessControlListActionProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalAccessControlListActionProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java new file mode 100644 index 000000000000..4a132ec2d8e5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global network tap rule actions patch properties. + */ +@Fluent +public final class GlobalNetworkTapRuleActionPatchProperties + implements JsonSerializable { + /* + * Configuration to enable network tap rule counter. + */ + private BooleanEnumProperty enableCount; + + /* + * Truncate. 0 indicates do not truncate. + */ + private String truncate; + + /** + * Creates an instance of GlobalNetworkTapRuleActionPatchProperties class. + */ + public GlobalNetworkTapRuleActionPatchProperties() { + } + + /** + * Get the enableCount property: Configuration to enable network tap rule counter. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable network tap rule counter. + * + * @param enableCount the enableCount value to set. + * @return the GlobalNetworkTapRuleActionPatchProperties object itself. + */ + public GlobalNetworkTapRuleActionPatchProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + 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 GlobalNetworkTapRuleActionPatchProperties object itself. + */ + public GlobalNetworkTapRuleActionPatchProperties withTruncate(String truncate) { + this.truncate = truncate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + jsonWriter.writeStringField("truncate", this.truncate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalNetworkTapRuleActionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalNetworkTapRuleActionPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalNetworkTapRuleActionPatchProperties. + */ + public static GlobalNetworkTapRuleActionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalNetworkTapRuleActionPatchProperties deserializedGlobalNetworkTapRuleActionPatchProperties + = new GlobalNetworkTapRuleActionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionPatchProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("truncate".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionPatchProperties.truncate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalNetworkTapRuleActionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java new file mode 100644 index 000000000000..4836d5446c52 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Global network tap rule actions properties. + */ +@Fluent +public final class GlobalNetworkTapRuleActionProperties + implements JsonSerializable { + /* + * Configuration to enable network tap rule counter. + */ + private BooleanEnumProperty enableCount; + + /* + * Truncate. 0 indicates do not truncate. + */ + private String truncate; + + /** + * Creates an instance of GlobalNetworkTapRuleActionProperties class. + */ + public GlobalNetworkTapRuleActionProperties() { + } + + /** + * Get the enableCount property: Configuration to enable network tap rule counter. + * + * @return the enableCount value. + */ + public BooleanEnumProperty enableCount() { + return this.enableCount; + } + + /** + * Set the enableCount property: Configuration to enable network tap rule counter. + * + * @param enableCount the enableCount value to set. + * @return the GlobalNetworkTapRuleActionProperties object itself. + */ + public GlobalNetworkTapRuleActionProperties withEnableCount(BooleanEnumProperty enableCount) { + this.enableCount = enableCount; + 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 GlobalNetworkTapRuleActionProperties object itself. + */ + public GlobalNetworkTapRuleActionProperties withTruncate(String truncate) { + this.truncate = truncate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("enableCount", this.enableCount == null ? null : this.enableCount.toString()); + jsonWriter.writeStringField("truncate", this.truncate); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalNetworkTapRuleActionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalNetworkTapRuleActionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GlobalNetworkTapRuleActionProperties. + */ + public static GlobalNetworkTapRuleActionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalNetworkTapRuleActionProperties deserializedGlobalNetworkTapRuleActionProperties + = new GlobalNetworkTapRuleActionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableCount".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionProperties.enableCount + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("truncate".equals(fieldName)) { + deserializedGlobalNetworkTapRuleActionProperties.truncate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalNetworkTapRuleActionProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java new file mode 100644 index 000000000000..d446b90f800d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Header name and source addresses associated with the header. + */ +@Fluent +public final class HeaderAddressProperties implements JsonSerializable { + /* + * Name of the header. + */ + private String headerName; + + /* + * List of source remote IP to be allowed or denied. + */ + private List addressList; + + /** + * Creates an instance of HeaderAddressProperties class. + */ + public HeaderAddressProperties() { + } + + /** + * Get the headerName property: Name of the header. + * + * @return the headerName value. + */ + public String headerName() { + return this.headerName; + } + + /** + * Set the headerName property: Name of the header. + * + * @param headerName the headerName value to set. + * @return the HeaderAddressProperties object itself. + */ + public HeaderAddressProperties withHeaderName(String headerName) { + this.headerName = headerName; + return this; + } + + /** + * Get the addressList property: List of source remote IP to be allowed or denied. + * + * @return the addressList value. + */ + public List addressList() { + return this.addressList; + } + + /** + * Set the addressList property: List of source remote IP to be allowed or denied. + * + * @param addressList the addressList value to set. + * @return the HeaderAddressProperties object itself. + */ + public HeaderAddressProperties withAddressList(List addressList) { + this.addressList = addressList; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("headerName", this.headerName); + jsonWriter.writeArrayField("addressList", this.addressList, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HeaderAddressProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HeaderAddressProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the HeaderAddressProperties. + */ + public static HeaderAddressProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HeaderAddressProperties deserializedHeaderAddressProperties = new HeaderAddressProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("headerName".equals(fieldName)) { + deserializedHeaderAddressProperties.headerName = reader.getString(); + } else if ("addressList".equals(fieldName)) { + List addressList = reader.readArray(reader1 -> reader1.getString()); + deserializedHeaderAddressProperties.addressList = addressList; + } else { + reader.skipChildren(); + } + } + + return deserializedHeaderAddressProperties; + }); + } +} 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 000000000000..ac2435a1dff2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IPAddressType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * IP Address type. + */ +public final class IPAddressType extends ExpandableStringEnum { + /** + * IPv4 IP address. + */ + public static final IPAddressType IPV4 = fromString("IPv4"); + + /** + * IPv6 IP address. + */ + 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. + */ + 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/IcmpConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java new file mode 100644 index 000000000000..8aae9929b792 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internet Control Message Protocol (ICMP) configuration patch properties. + */ +@Fluent +public final class IcmpConfigurationPatchProperties implements JsonSerializable { + /* + * Internet Control Message Protocol (ICMP) types + */ + private List icmpTypes; + + /** + * Creates an instance of IcmpConfigurationPatchProperties class. + */ + public IcmpConfigurationPatchProperties() { + } + + /** + * Get the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @return the icmpTypes value. + */ + public List icmpTypes() { + return this.icmpTypes; + } + + /** + * Set the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @param icmpTypes the icmpTypes value to set. + * @return the IcmpConfigurationPatchProperties object itself. + */ + public IcmpConfigurationPatchProperties withIcmpTypes(List icmpTypes) { + this.icmpTypes = icmpTypes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("icmpTypes", this.icmpTypes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IcmpConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IcmpConfigurationPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IcmpConfigurationPatchProperties. + */ + public static IcmpConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IcmpConfigurationPatchProperties deserializedIcmpConfigurationPatchProperties + = new IcmpConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("icmpTypes".equals(fieldName)) { + List icmpTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedIcmpConfigurationPatchProperties.icmpTypes = icmpTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedIcmpConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java new file mode 100644 index 000000000000..c6e84ba5aa2d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internet Control Message Protocol (ICMP) configuration. + */ +@Fluent +public final class IcmpConfigurationProperties implements JsonSerializable { + /* + * Internet Control Message Protocol (ICMP) types + */ + private List icmpTypes; + + /** + * Creates an instance of IcmpConfigurationProperties class. + */ + public IcmpConfigurationProperties() { + } + + /** + * Get the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @return the icmpTypes value. + */ + public List icmpTypes() { + return this.icmpTypes; + } + + /** + * Set the icmpTypes property: Internet Control Message Protocol (ICMP) types. + * + * @param icmpTypes the icmpTypes value to set. + * @return the IcmpConfigurationProperties object itself. + */ + public IcmpConfigurationProperties withIcmpTypes(List icmpTypes) { + this.icmpTypes = icmpTypes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("icmpTypes", this.icmpTypes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IcmpConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IcmpConfigurationProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IcmpConfigurationProperties. + */ + public static IcmpConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IcmpConfigurationProperties deserializedIcmpConfigurationProperties = new IcmpConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("icmpTypes".equals(fieldName)) { + List icmpTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedIcmpConfigurationProperties.icmpTypes = icmpTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedIcmpConfigurationProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java new file mode 100644 index 000000000000..32c82f0b1d94 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentitySelector represents the selection of a managed identity for use. + */ +@Fluent +public final class IdentitySelector implements JsonSerializable { + /* + * The type of managed identity that is being selected. + */ + private ManagedServiceIdentitySelectorType identityType; + + /* + * The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of IdentitySelector class. + */ + public IdentitySelector() { + } + + /** + * Get the identityType property: The type of managed identity that is being selected. + * + * @return the identityType value. + */ + public ManagedServiceIdentitySelectorType identityType() { + return this.identityType; + } + + /** + * Set the identityType property: The type of managed identity that is being selected. + * + * @param identityType the identityType value to set. + * @return the IdentitySelector object itself. + */ + public IdentitySelector withIdentityType(ManagedServiceIdentitySelectorType identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the IdentitySelector object itself. + */ + public IdentitySelector withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentitySelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentitySelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentitySelector. + */ + public static IdentitySelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentitySelector deserializedIdentitySelector = new IdentitySelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identityType".equals(fieldName)) { + deserializedIdentitySelector.identityType + = ManagedServiceIdentitySelectorType.fromString(reader.getString()); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedIdentitySelector.userAssignedIdentityResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentitySelector; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java new file mode 100644 index 000000000000..a73daa725936 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentitySelector represents the selection of a managed identity for use. + */ +@Fluent +public final class IdentitySelectorPatch implements JsonSerializable { + /* + * The type of managed identity that is being selected. + */ + private ManagedServiceIdentitySelectorType identityType; + + /* + * The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of IdentitySelectorPatch class. + */ + public IdentitySelectorPatch() { + } + + /** + * Get the identityType property: The type of managed identity that is being selected. + * + * @return the identityType value. + */ + public ManagedServiceIdentitySelectorType identityType() { + return this.identityType; + } + + /** + * Set the identityType property: The type of managed identity that is being selected. + * + * @param identityType the identityType value to set. + * @return the IdentitySelectorPatch object itself. + */ + public IdentitySelectorPatch withIdentityType(ManagedServiceIdentitySelectorType identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: The user assigned managed identity resource ID to use. Mutually + * exclusive with a system assigned identity type. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the IdentitySelectorPatch object itself. + */ + public IdentitySelectorPatch withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentitySelectorPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentitySelectorPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentitySelectorPatch. + */ + public static IdentitySelectorPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentitySelectorPatch deserializedIdentitySelectorPatch = new IdentitySelectorPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identityType".equals(fieldName)) { + deserializedIdentitySelectorPatch.identityType + = ManagedServiceIdentitySelectorType.fromString(reader.getString()); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedIdentitySelectorPatch.userAssignedIdentityResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentitySelectorPatch; + }); + } +} 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 index 20a9557fcf7a..c036aa987258 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ImportRoutePolicy withImportIpv6RoutePolicyId(String importIpv6RoutePolic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index e577ec82a2bc..a2d79a89a199 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ImportRoutePolicyInformation withImportIpv6RoutePolicyId(String importIpv return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java new file mode 100644 index 000000000000..f761a1bdb583 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Import Route Policy Configuration. + */ +@Fluent +public final class ImportRoutePolicyInformationPatch implements JsonSerializable { + /* + * Import IPv4 Route Policy Id. + */ + private String importIpv4RoutePolicyId; + + /* + * Import IPv6 Route Policy Id. + */ + private String importIpv6RoutePolicyId; + + /** + * Creates an instance of ImportRoutePolicyInformationPatch class. + */ + public ImportRoutePolicyInformationPatch() { + } + + /** + * 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 ImportRoutePolicyInformationPatch object itself. + */ + public ImportRoutePolicyInformationPatch 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 ImportRoutePolicyInformationPatch object itself. + */ + public ImportRoutePolicyInformationPatch withImportIpv6RoutePolicyId(String importIpv6RoutePolicyId) { + this.importIpv6RoutePolicyId = importIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("importIpv4RoutePolicyId", this.importIpv4RoutePolicyId); + jsonWriter.writeStringField("importIpv6RoutePolicyId", this.importIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportRoutePolicyInformationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportRoutePolicyInformationPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportRoutePolicyInformationPatch. + */ + public static ImportRoutePolicyInformationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportRoutePolicyInformationPatch deserializedImportRoutePolicyInformationPatch + = new ImportRoutePolicyInformationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importIpv4RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyInformationPatch.importIpv4RoutePolicyId = reader.getString(); + } else if ("importIpv6RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyInformationPatch.importIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportRoutePolicyInformationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java new file mode 100644 index 000000000000..1ef5c8565b41 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Import Route Policy either IPv4 or IPv6. + */ +@Fluent +public final class ImportRoutePolicyPatch implements JsonSerializable { + /* + * ARM resource ID of RoutePolicy. + */ + private String importIpv4RoutePolicyId; + + /* + * ARM resource ID of RoutePolicy. + */ + private String importIpv6RoutePolicyId; + + /** + * Creates an instance of ImportRoutePolicyPatch class. + */ + public ImportRoutePolicyPatch() { + } + + /** + * 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 ImportRoutePolicyPatch object itself. + */ + public ImportRoutePolicyPatch 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 ImportRoutePolicyPatch object itself. + */ + public ImportRoutePolicyPatch withImportIpv6RoutePolicyId(String importIpv6RoutePolicyId) { + this.importIpv6RoutePolicyId = importIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("importIpv4RoutePolicyId", this.importIpv4RoutePolicyId); + jsonWriter.writeStringField("importIpv6RoutePolicyId", this.importIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportRoutePolicyPatch. + */ + public static ImportRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportRoutePolicyPatch deserializedImportRoutePolicyPatch = new ImportRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importIpv4RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyPatch.importIpv4RoutePolicyId = reader.getString(); + } else if ("importIpv6RoutePolicyId".equals(fieldName)) { + deserializedImportRoutePolicyPatch.importIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java index dee5412bc877..d53688c48fa7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class InterfaceType extends ExpandableStringEnum { /** - * Static value Management for InterfaceType. + * InterfaceType-Management. */ public static final InterfaceType MANAGEMENT = fromString("Management"); /** - * Static value Data for InterfaceType. + * InterfaceType-Data. */ public static final InterfaceType DATA = fromString("Data"); 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 f724ba6e53e5..f5767db76aa2 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 @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import java.util.List; /** * An immutable client-side representation of InternalNetwork. @@ -35,139 +34,18 @@ public interface InternalNetwork { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the vlanId property: Vlan identifier. Example: 1001. - * - * @return the vlanId value. - */ - int vlanId(); - - /** - * Gets the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. - */ - InternalNetworkPropertiesBgpConfiguration bgpConfiguration(); - - /** - * Gets the staticRouteConfiguration property: Static Route Configuration properties. - * - * @return the staticRouteConfiguration value. - */ - InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration(); - - /** - * 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 mtu property: Maximum transmission unit. Default value is 1500. - * - * @return the mtu value. - */ - Integer mtu(); - - /** - * Gets the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @return the connectedIPv4Subnets value. - */ - List connectedIPv4Subnets(); - - /** - * Gets the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @return the connectedIPv6Subnets value. - */ - List connectedIPv6Subnets(); - - /** - * 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 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 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. + * Gets the properties property: The Internal Network Properties. * - * @return the egressAclId value. + * @return the properties value. */ - String egressAclId(); + InternalNetworkProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -187,7 +65,7 @@ public interface InternalNetwork { * The entirety of the InternalNetwork definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithVlanId, DefinitionStages.WithCreate { + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -211,33 +89,27 @@ interface WithParentResource { * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @return the next definition stage. */ - WithVlanId withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); + WithProperties withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); } /** - * The stage of the InternalNetwork definition allowing to specify vlanId. + * The stage of the InternalNetwork definition allowing to specify properties. */ - interface WithVlanId { + interface WithProperties { /** - * Specifies the vlanId property: Vlan identifier. Example: 1001.. + * Specifies the properties property: The Internal Network Properties. * - * @param vlanId Vlan identifier. Example: 1001. + * @param properties The Internal Network Properties. * @return the next definition stage. */ - WithCreate withVlanId(int vlanId); + WithCreate withProperties(InternalNetworkProperties properties); } /** * The stage of the InternalNetwork 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.WithBgpConfiguration, DefinitionStages.WithStaticRouteConfiguration, - DefinitionStages.WithMtu, DefinitionStages.WithConnectedIPv4Subnets, - DefinitionStages.WithConnectedIPv6Subnets, DefinitionStages.WithImportRoutePolicyId, - DefinitionStages.WithExportRoutePolicyId, DefinitionStages.WithImportRoutePolicy, - DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithIngressAclId, DefinitionStages.WithEgressAclId, - DefinitionStages.WithIsMonitoringEnabled, DefinitionStages.WithExtension, DefinitionStages.WithAnnotation { + interface WithCreate { /** * Executes the create request. * @@ -253,194 +125,6 @@ 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 { - /** - * Specifies the mtu property: 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); - } - - /** - * The stage of the InternalNetwork definition allowing to specify connectedIPv4Subnets. - */ - interface WithConnectedIPv4Subnets { - /** - * Specifies the connectedIPv4Subnets property: List of Connected IPv4 Subnets.. - * - * @param connectedIPv4Subnets List of Connected IPv4 Subnets. - * @return the next definition stage. - */ - WithCreate withConnectedIPv4Subnets(List connectedIPv4Subnets); - } - - /** - * The stage of the InternalNetwork definition allowing to specify connectedIPv6Subnets. - */ - interface WithConnectedIPv6Subnets { - /** - * Specifies the connectedIPv6Subnets property: List of 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 importRoutePolicyId. - */ - interface WithImportRoutePolicyId { - /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - WithCreate withImportRoutePolicyId(String importRoutePolicyId); - } - - /** - * The stage of the InternalNetwork definition allowing to specify exportRoutePolicyId. - */ - interface WithExportRoutePolicyId { - /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @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 InternalNetwork 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 InternalNetwork 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 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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -453,11 +137,7 @@ interface WithAnnotation { /** * The template for InternalNetwork update. */ - interface Update extends UpdateStages.WithBgpConfiguration, UpdateStages.WithStaticRouteConfiguration, - UpdateStages.WithMtu, UpdateStages.WithConnectedIPv4Subnets, UpdateStages.WithConnectedIPv6Subnets, - UpdateStages.WithImportRoutePolicyId, UpdateStages.WithExportRoutePolicyId, UpdateStages.WithImportRoutePolicy, - UpdateStages.WithExportRoutePolicy, UpdateStages.WithIngressAclId, UpdateStages.WithEgressAclId, - UpdateStages.WithIsMonitoringEnabled, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -479,177 +159,16 @@ interface Update extends UpdateStages.WithBgpConfiguration, UpdateStages.WithSta */ 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 { - /** - * Specifies the mtu property: 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); - } - - /** - * The stage of the InternalNetwork update allowing to specify connectedIPv4Subnets. - */ - interface WithConnectedIPv4Subnets { - /** - * Specifies the connectedIPv4Subnets property: List of Connected IPv4 Subnets.. - * - * @param connectedIPv4Subnets List of Connected IPv4 Subnets. - * @return the next definition stage. - */ - Update withConnectedIPv4Subnets(List connectedIPv4Subnets); - } - - /** - * The stage of the InternalNetwork update allowing to specify connectedIPv6Subnets. - */ - interface WithConnectedIPv6Subnets { - /** - * Specifies the connectedIPv6Subnets property: List of 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 importRoutePolicyId. - */ - interface WithImportRoutePolicyId { - /** - * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * @return the next definition stage. - */ - Update withImportRoutePolicyId(String importRoutePolicyId); - } - - /** - * The stage of the InternalNetwork update allowing to specify exportRoutePolicyId. - */ - interface WithExportRoutePolicyId { - /** - * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the - * backward compatibility.. - * - * @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 InternalNetwork 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 InternalNetwork 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 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. + * The stage of the InternalNetwork update allowing to specify properties. */ - interface WithAnnotation { + interface WithProperties { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the properties property: InternalNetwork Patch properties.. * - * @param annotation Switch configuration description. + * @param properties InternalNetwork Patch properties. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withProperties(InternalNetworkPatchProperties properties); } } @@ -669,21 +188,17 @@ interface WithAnnotation { InternalNetwork refresh(Context context); /** - * Executes the operation to the underlying resources. - * * Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * * Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param body Request payload. @@ -691,26 +206,23 @@ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge 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. - * @return common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body); + InternalNetworkBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param body Request payload. @@ -718,36 +230,33 @@ 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body, - Context context); + InternalNetworkBgpAdministrativeStateResponse + updateBgpAdministrativeState(InternalNetworkBgpAdministrativeStateRequest body, Context context); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + InternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkBfdAdministrativeStateRequest body); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, - Context context); + InternalNetworkBfdAdministrativeStateResponse + updateBfdAdministrativeState(InternalNetworkBfdAdministrativeStateRequest body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateRequest.java new file mode 100644 index 000000000000..9391250db7ca --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateRequest.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Internal Network BFD Administrative State request. + */ +@Fluent +public final class InternalNetworkBfdAdministrativeStateRequest + implements JsonSerializable { + /* + * Route Type that helps to know which bfd we are updating. + */ + private InternalNetworkRouteType routeType; + + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BFD Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of InternalNetworkBfdAdministrativeStateRequest class. + */ + public InternalNetworkBfdAdministrativeStateRequest() { + } + + /** + * Get the routeType property: Route Type that helps to know which bfd we are updating. + * + * @return the routeType value. + */ + public InternalNetworkRouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: Route Type that helps to know which bfd we are updating. + * + * @param routeType the routeType value to set. + * @return the InternalNetworkBfdAdministrativeStateRequest object itself. + */ + public InternalNetworkBfdAdministrativeStateRequest withRouteType(InternalNetworkRouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Set the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @param neighborAddress the neighborAddress value to set. + * @return the InternalNetworkBfdAdministrativeStateRequest object itself. + */ + public InternalNetworkBfdAdministrativeStateRequest withNeighborAddress(String neighborAddress) { + this.neighborAddress = neighborAddress; + return this; + } + + /** + * Get the administrativeState property: BFD Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: BFD Administrative state. + * + * @param administrativeState the administrativeState value to set. + * @return the InternalNetworkBfdAdministrativeStateRequest object itself. + */ + public InternalNetworkBfdAdministrativeStateRequest + withAdministrativeState(BfdAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBfdAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBfdAdministrativeStateRequest if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBfdAdministrativeStateRequest. + */ + public static InternalNetworkBfdAdministrativeStateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBfdAdministrativeStateRequest deserializedInternalNetworkBfdAdministrativeStateRequest + = new InternalNetworkBfdAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedInternalNetworkBfdAdministrativeStateRequest.routeType + = InternalNetworkRouteType.fromString(reader.getString()); + } else if ("neighborAddress".equals(fieldName)) { + deserializedInternalNetworkBfdAdministrativeStateRequest.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedInternalNetworkBfdAdministrativeStateRequest.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBfdAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateResponse.java new file mode 100644 index 000000000000..467560aa1bca --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBfdAdministrativeStateResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of InternalNetworkBfdAdministrativeStateResponse. + */ +public interface InternalNetworkBfdAdministrativeStateResponse { + /** + * Gets the neighborAddressAdministrativeStatus property: NeighborAddress administrative status. + * + * @return the neighborAddressAdministrativeStatus value. + */ + List neighborAddressAdministrativeStatus(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBfdAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + InternalNetworkBfdAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateRequest.java new file mode 100644 index 000000000000..d5473966d862 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateRequest.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Internal Network Administrative State Request. + */ +@Fluent +public final class InternalNetworkBgpAdministrativeStateRequest + implements JsonSerializable { + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BGP Administrative state. + */ + private BgpAdministrativeState administrativeState; + + /** + * Creates an instance of InternalNetworkBgpAdministrativeStateRequest class. + */ + public InternalNetworkBgpAdministrativeStateRequest() { + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Set the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @param neighborAddress the neighborAddress value to set. + * @return the InternalNetworkBgpAdministrativeStateRequest object itself. + */ + public InternalNetworkBgpAdministrativeStateRequest withNeighborAddress(String neighborAddress) { + this.neighborAddress = neighborAddress; + return this; + } + + /** + * Get the administrativeState property: BGP Administrative state. + * + * @return the administrativeState value. + */ + public BgpAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: BGP Administrative state. + * + * @param administrativeState the administrativeState value to set. + * @return the InternalNetworkBgpAdministrativeStateRequest object itself. + */ + public InternalNetworkBgpAdministrativeStateRequest + withAdministrativeState(BgpAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBgpAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBgpAdministrativeStateRequest if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBgpAdministrativeStateRequest. + */ + public static InternalNetworkBgpAdministrativeStateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBgpAdministrativeStateRequest deserializedInternalNetworkBgpAdministrativeStateRequest + = new InternalNetworkBgpAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddress".equals(fieldName)) { + deserializedInternalNetworkBgpAdministrativeStateRequest.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedInternalNetworkBgpAdministrativeStateRequest.administrativeState + = BgpAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBgpAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateResponse.java new file mode 100644 index 000000000000..37f01771794b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of InternalNetworkBgpAdministrativeStateResponse. + */ +public interface InternalNetworkBgpAdministrativeStateResponse { + /** + * Gets the neighborAddressAdministrativeStatus property: NeighborAddress administrative status. + * + * @return the neighborAddressAdministrativeStatus value. + */ + List neighborAddressAdministrativeStatus(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner + * object. + * + * @return the inner object. + */ + InternalNetworkBgpAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java new file mode 100644 index 000000000000..5312b7f74de8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BMP Configuration. + */ +@Fluent +public final class InternalNetworkBmpPatchProperties implements JsonSerializable { + /* + * BMP Collector Address. + */ + private List neighborIpExclusions; + + /* + * BMP Monitoring configuration state. + */ + private BmpConfigurationState bmpConfigurationState; + + /** + * Creates an instance of InternalNetworkBmpPatchProperties class. + */ + public InternalNetworkBmpPatchProperties() { + } + + /** + * Get the neighborIpExclusions property: BMP Collector Address. + * + * @return the neighborIpExclusions value. + */ + public List neighborIpExclusions() { + return this.neighborIpExclusions; + } + + /** + * Set the neighborIpExclusions property: BMP Collector Address. + * + * @param neighborIpExclusions the neighborIpExclusions value to set. + * @return the InternalNetworkBmpPatchProperties object itself. + */ + public InternalNetworkBmpPatchProperties withNeighborIpExclusions(List neighborIpExclusions) { + this.neighborIpExclusions = neighborIpExclusions; + return this; + } + + /** + * Get the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @return the bmpConfigurationState value. + */ + public BmpConfigurationState bmpConfigurationState() { + return this.bmpConfigurationState; + } + + /** + * Set the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @param bmpConfigurationState the bmpConfigurationState value to set. + * @return the InternalNetworkBmpPatchProperties object itself. + */ + public InternalNetworkBmpPatchProperties withBmpConfigurationState(BmpConfigurationState bmpConfigurationState) { + this.bmpConfigurationState = bmpConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborIpExclusions", this.neighborIpExclusions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("bmpConfigurationState", + this.bmpConfigurationState == null ? null : this.bmpConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBmpPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBmpPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBmpPatchProperties. + */ + public static InternalNetworkBmpPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBmpPatchProperties deserializedInternalNetworkBmpPatchProperties + = new InternalNetworkBmpPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborIpExclusions".equals(fieldName)) { + List neighborIpExclusions = reader.readArray(reader1 -> reader1.getString()); + deserializedInternalNetworkBmpPatchProperties.neighborIpExclusions = neighborIpExclusions; + } else if ("bmpConfigurationState".equals(fieldName)) { + deserializedInternalNetworkBmpPatchProperties.bmpConfigurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBmpPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java new file mode 100644 index 000000000000..29332586719a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Internal Network BMP Configuration. + */ +@Fluent +public final class InternalNetworkBmpProperties implements JsonSerializable { + /* + * BMP Collector Address. + */ + private List neighborIpExclusions; + + /* + * BMP Monitoring configuration state. + */ + private BmpConfigurationState bmpConfigurationState; + + /** + * Creates an instance of InternalNetworkBmpProperties class. + */ + public InternalNetworkBmpProperties() { + } + + /** + * Get the neighborIpExclusions property: BMP Collector Address. + * + * @return the neighborIpExclusions value. + */ + public List neighborIpExclusions() { + return this.neighborIpExclusions; + } + + /** + * Set the neighborIpExclusions property: BMP Collector Address. + * + * @param neighborIpExclusions the neighborIpExclusions value to set. + * @return the InternalNetworkBmpProperties object itself. + */ + public InternalNetworkBmpProperties withNeighborIpExclusions(List neighborIpExclusions) { + this.neighborIpExclusions = neighborIpExclusions; + return this; + } + + /** + * Get the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @return the bmpConfigurationState value. + */ + public BmpConfigurationState bmpConfigurationState() { + return this.bmpConfigurationState; + } + + /** + * Set the bmpConfigurationState property: BMP Monitoring configuration state. + * + * @param bmpConfigurationState the bmpConfigurationState value to set. + * @return the InternalNetworkBmpProperties object itself. + */ + public InternalNetworkBmpProperties withBmpConfigurationState(BmpConfigurationState bmpConfigurationState) { + this.bmpConfigurationState = bmpConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("neighborIpExclusions", this.neighborIpExclusions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("bmpConfigurationState", + this.bmpConfigurationState == null ? null : this.bmpConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InternalNetworkBmpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InternalNetworkBmpProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InternalNetworkBmpProperties. + */ + public static InternalNetworkBmpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InternalNetworkBmpProperties deserializedInternalNetworkBmpProperties = new InternalNetworkBmpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborIpExclusions".equals(fieldName)) { + List neighborIpExclusions = reader.readArray(reader1 -> reader1.getString()); + deserializedInternalNetworkBmpProperties.neighborIpExclusions = neighborIpExclusions; + } else if ("bmpConfigurationState".equals(fieldName)) { + deserializedInternalNetworkBmpProperties.bmpConfigurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInternalNetworkBmpProperties; + }); + } +} 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 57e64c091a36..96c82d2797de 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -9,9 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkPatchProperties; import java.io.IOException; -import java.util.List; /** * The InternalNetwork patch resource definition. @@ -21,7 +19,7 @@ public final class InternalNetworkPatch implements JsonSerializable connectedIPv4Subnets() { - return this.innerProperties() == null ? null : this.innerProperties().connectedIPv4Subnets(); - } - - /** - * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. - * @return the InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withConnectedIPv4Subnets(List connectedIPv4Subnets) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withConnectedIPv4Subnets(connectedIPv4Subnets); - return this; - } - - /** - * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @return the connectedIPv6Subnets value. - */ - public List connectedIPv6Subnets() { - return this.innerProperties() == null ? null : this.innerProperties().connectedIPv6Subnets(); - } - - /** - * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. - * @return the InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withConnectedIPv6Subnets(List connectedIPv6Subnets) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withConnectedIPv6Subnets(connectedIPv6Subnets); - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); - } - - /** - * 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 InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); - } - - /** - * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param properties the properties value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); + public InternalNetworkPatch withProperties(InternalNetworkPatchProperties properties) { + this.properties = properties; 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 InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - 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 InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - 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; - } - - /** - * 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 InternalNetworkPatch object itself. - */ - public InternalNetworkPatch withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkPatchProperties(); - } - 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(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -378,7 +73,7 @@ public static InternalNetworkPatch fromJson(JsonReader jsonReader) throws IOExce reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedInternalNetworkPatch.innerProperties = InternalNetworkPatchProperties.fromJson(reader); + deserializedInternalNetworkPatch.properties = InternalNetworkPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/InternalNetworkPatchProperties.java similarity index 71% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchProperties.java index 3a708c796ecf..18f065372b64 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/models/InternalNetworkPatchProperties.java @@ -1,20 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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 java.io.IOException; import java.util.List; @@ -22,16 +16,11 @@ * InternalNetwork Patch properties. */ @Fluent -public final class InternalNetworkPatchProperties extends AnnotationResource { +public final class InternalNetworkPatchProperties implements JsonSerializable { /* - * BGP configuration properties. - */ - private BgpConfiguration bgpConfiguration; - - /* - * Static Route Configuration properties. + * Switch configuration description. */ - private StaticRouteConfiguration staticRouteConfiguration; + private String annotation; /* * Maximum transmission unit. Default value is 1500. @@ -41,22 +30,12 @@ public final class InternalNetworkPatchProperties extends AnnotationResource { /* * List of Connected IPv4 Subnets. */ - private List connectedIPv4Subnets; + private List connectedIPv4Subnets; /* * List of connected IPv6 Subnets. */ - private List connectedIPv6Subnets; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; + private List connectedIPv6Subnets; /* * Import Route Policy either IPv4 or IPv6. @@ -83,50 +62,49 @@ public final class InternalNetworkPatchProperties extends AnnotationResource { */ private IsMonitoringEnabled isMonitoringEnabled; - /** - * Creates an instance of InternalNetworkPatchProperties class. + /* + * BGP configuration properties. */ - public InternalNetworkPatchProperties() { - } + private BgpPatchConfiguration bgpConfiguration; - /** - * Get the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. + /* + * Static Route Configuration properties. */ - public BgpConfiguration bgpConfiguration() { - return this.bgpConfiguration; - } + private StaticRoutePatchConfiguration staticRouteConfiguration; + + /* + * Native IPv4 Prefix Limit Configuration properties. + */ + private NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit; + + /* + * Native IPv6 Prefix Limit Configuration properties. + */ + private NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit; /** - * Set the bgpConfiguration property: BGP configuration properties. - * - * @param bgpConfiguration the bgpConfiguration value to set. - * @return the InternalNetworkPatchProperties object itself. + * Creates an instance of InternalNetworkPatchProperties class. */ - public InternalNetworkPatchProperties withBgpConfiguration(BgpConfiguration bgpConfiguration) { - this.bgpConfiguration = bgpConfiguration; - return this; + public InternalNetworkPatchProperties() { } /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the annotation property: Switch configuration description. * - * @return the staticRouteConfiguration value. + * @return the annotation value. */ - public StaticRouteConfiguration staticRouteConfiguration() { - return this.staticRouteConfiguration; + public String annotation() { + return this.annotation; } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the annotation property: Switch configuration description. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param annotation the annotation value to set. * @return the InternalNetworkPatchProperties object itself. */ - public InternalNetworkPatchProperties - withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { - this.staticRouteConfiguration = staticRouteConfiguration; + public InternalNetworkPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } @@ -155,7 +133,7 @@ public InternalNetworkPatchProperties withMtu(Integer mtu) { * * @return the connectedIPv4Subnets value. */ - public List connectedIPv4Subnets() { + public List connectedIPv4Subnets() { return this.connectedIPv4Subnets; } @@ -165,7 +143,7 @@ public List connectedIPv4Subnets() { * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkPatchProperties object itself. */ - public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv4Subnets) { + public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv4Subnets) { this.connectedIPv4Subnets = connectedIPv4Subnets; return this; } @@ -175,7 +153,7 @@ public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv6Subnets() { + public List connectedIPv6Subnets() { return this.connectedIPv6Subnets; } @@ -185,55 +163,11 @@ public List connectedIPv6Subnets() { * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkPatchProperties object itself. */ - public InternalNetworkPatchProperties withConnectedIPv6Subnets(List connectedIPv6Subnets) { + public InternalNetworkPatchProperties withConnectedIPv6Subnets(List connectedIPv6Subnets) { this.connectedIPv6Subnets = connectedIPv6Subnets; return this; } - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * 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 InternalNetworkPatchProperties object itself. - */ - public InternalNetworkPatchProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. 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 RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkPatchProperties object itself. - */ - public InternalNetworkPatchProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - /** * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -335,39 +269,86 @@ public InternalNetworkPatchProperties withIsMonitoringEnabled(IsMonitoringEnable } /** - * {@inheritDoc} + * Get the bgpConfiguration property: BGP configuration properties. + * + * @return the bgpConfiguration value. */ - @Override - public InternalNetworkPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public BgpPatchConfiguration 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(BgpPatchConfiguration bgpConfiguration) { + this.bgpConfiguration = bgpConfiguration; return this; } /** - * Validates the instance. + * Get the staticRouteConfiguration property: Static Route Configuration properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the staticRouteConfiguration value. */ - @Override - public void 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 (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public StaticRoutePatchConfiguration 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(StaticRoutePatchConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + + /** + * Get the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + public NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties + withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitPatchProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; + return this; + } + + /** + * Get the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + public NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties + withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitPatchProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; } /** @@ -376,22 +357,22 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); - jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeNumberField("mtu", this.mtu); jsonWriter.writeArrayField("connectedIPv4Subnets", this.connectedIPv4Subnets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("connectedIPv6Subnets", this.connectedIPv6Subnets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("isMonitoringEnabled", this.isMonitoringEnabled == null ? null : this.isMonitoringEnabled.toString()); + jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -412,26 +393,17 @@ public static InternalNetworkPatchProperties fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.withAnnotation(reader.getString()); - } else if ("bgpConfiguration".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.bgpConfiguration = BgpConfiguration.fromJson(reader); - } else if ("staticRouteConfiguration".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.staticRouteConfiguration - = StaticRouteConfiguration.fromJson(reader); + deserializedInternalNetworkPatchProperties.annotation = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedInternalNetworkPatchProperties.mtu = reader.getNullable(JsonReader::getInt); } else if ("connectedIPv4Subnets".equals(fieldName)) { - List connectedIPv4Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); + List connectedIPv4Subnets + = reader.readArray(reader1 -> ConnectedSubnetPatch.fromJson(reader1)); deserializedInternalNetworkPatchProperties.connectedIPv4Subnets = connectedIPv4Subnets; } else if ("connectedIPv6Subnets".equals(fieldName)) { - List connectedIPv6Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); + List connectedIPv6Subnets + = reader.readArray(reader1 -> ConnectedSubnetPatch.fromJson(reader1)); deserializedInternalNetworkPatchProperties.connectedIPv6Subnets = connectedIPv6Subnets; - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchProperties.exportRoutePolicyId = reader.getString(); } else if ("importRoutePolicy".equals(fieldName)) { deserializedInternalNetworkPatchProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); } else if ("exportRoutePolicy".equals(fieldName)) { @@ -443,6 +415,18 @@ public static InternalNetworkPatchProperties fromJson(JsonReader jsonReader) thr } else if ("isMonitoringEnabled".equals(fieldName)) { deserializedInternalNetworkPatchProperties.isMonitoringEnabled = IsMonitoringEnabled.fromString(reader.getString()); + } else if ("bgpConfiguration".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.bgpConfiguration + = BgpPatchConfiguration.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.staticRouteConfiguration + = StaticRoutePatchConfiguration.fromJson(reader); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitPatchProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkPatchProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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 deleted file mode 100644 index 854a1f6cec90..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The InternalNetwork patchable properties. - */ -@Fluent -public class InternalNetworkPatchableProperties implements JsonSerializable { - /* - * Maximum transmission unit. Default value is 1500. - */ - private Integer mtu; - - /* - * List of Connected IPv4 Subnets. - */ - private List connectedIPv4Subnets; - - /* - * List of connected IPv6 Subnets. - */ - private List connectedIPv6Subnets; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - - /* - * Import Route Policy either IPv4 or IPv6. - */ - private ImportRoutePolicy importRoutePolicy; - - /* - * Export Route Policy either IPv4 or IPv6. - */ - private ExportRoutePolicy exportRoutePolicy; - - /* - * Ingress Acl. ARM resource ID of Access Control Lists. - */ - private String ingressAclId; - - /* - * Egress Acl. ARM resource ID of Access Control Lists. - */ - private String egressAclId; - - /* - * To check whether monitoring of internal network is enabled or not. - */ - private IsMonitoringEnabled isMonitoringEnabled; - - /** - * Creates an instance of InternalNetworkPatchableProperties class. - */ - public InternalNetworkPatchableProperties() { - } - - /** - * Get the mtu property: Maximum transmission unit. Default value is 1500. - * - * @return the mtu value. - */ - public Integer mtu() { - return this.mtu; - } - - /** - * Set the mtu property: Maximum transmission unit. Default value is 1500. - * - * @param mtu the mtu value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withMtu(Integer mtu) { - this.mtu = mtu; - return this; - } - - /** - * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @return the connectedIPv4Subnets value. - */ - public List connectedIPv4Subnets() { - return this.connectedIPv4Subnets; - } - - /** - * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. - * - * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withConnectedIPv4Subnets(List connectedIPv4Subnets) { - this.connectedIPv4Subnets = connectedIPv4Subnets; - return this; - } - - /** - * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @return the connectedIPv6Subnets value. - */ - public List connectedIPv6Subnets() { - return this.connectedIPv6Subnets; - } - - /** - * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. - * - * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withConnectedIPv6Subnets(List connectedIPv6Subnets) { - this.connectedIPv6Subnets = connectedIPv6Subnets; - return this; - } - - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * 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 InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. 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 RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - 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 InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties 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 InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties 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 InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties 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 InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties 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 InternalNetworkPatchableProperties object itself. - */ - public InternalNetworkPatchableProperties withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled) { - this.isMonitoringEnabled = isMonitoringEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectedIPv4Subnets() != null) { - connectedIPv4Subnets().forEach(e -> e.validate()); - } - if (connectedIPv6Subnets() != null) { - connectedIPv6Subnets().forEach(e -> e.validate()); - } - if (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeArrayField("connectedIPv4Subnets", this.connectedIPv4Subnets, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("connectedIPv6Subnets", this.connectedIPv6Subnets, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); - jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); - jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); - jsonWriter.writeStringField("ingressAclId", this.ingressAclId); - jsonWriter.writeStringField("egressAclId", this.egressAclId); - jsonWriter.writeStringField("isMonitoringEnabled", - this.isMonitoringEnabled == null ? null : this.isMonitoringEnabled.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworkPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworkPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworkPatchableProperties. - */ - public static InternalNetworkPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworkPatchableProperties deserializedInternalNetworkPatchableProperties - = new InternalNetworkPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("connectedIPv4Subnets".equals(fieldName)) { - List connectedIPv4Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); - deserializedInternalNetworkPatchableProperties.connectedIPv4Subnets = connectedIPv4Subnets; - } else if ("connectedIPv6Subnets".equals(fieldName)) { - List connectedIPv6Subnets - = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); - deserializedInternalNetworkPatchableProperties.connectedIPv6Subnets = connectedIPv6Subnets; - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.exportRoutePolicyId = reader.getString(); - } else if ("importRoutePolicy".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.importRoutePolicy - = ImportRoutePolicy.fromJson(reader); - } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.exportRoutePolicy - = ExportRoutePolicy.fromJson(reader); - } else if ("ingressAclId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.ingressAclId = reader.getString(); - } else if ("egressAclId".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.egressAclId = reader.getString(); - } else if ("isMonitoringEnabled".equals(fieldName)) { - deserializedInternalNetworkPatchableProperties.isMonitoringEnabled - = IsMonitoringEnabled.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworkPatchableProperties; - }); - } -} 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/models/InternalNetworkProperties.java similarity index 75% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkProperties.java index d2efc613cbc0..bb05bed6a446 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/models/InternalNetworkProperties.java @@ -1,24 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.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.ProvisioningState; import java.io.IOException; import java.util.List; @@ -26,36 +16,11 @@ * Internal Network Properties defines the properties of the resource. */ @Fluent -public final class InternalNetworkProperties extends AnnotationResource { +public final class InternalNetworkProperties implements JsonSerializable { /* - * Vlan identifier. Example: 1001. - */ - private int vlanId; - - /* - * BGP configuration properties. - */ - private InternalNetworkPropertiesBgpConfiguration bgpConfiguration; - - /* - * Static Route Configuration properties. + * Switch configuration description. */ - private InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration; - - /* - * Configuration state of the resource. - */ - private ConfigurationState configurationState; - - /* - * Provisioning state of the resource. - */ - private ProvisioningState provisioningState; - - /* - * Administrative state of the resource. - */ - private AdministrativeState administrativeState; + private String annotation; /* * Maximum transmission unit. Default value is 1500. @@ -72,16 +37,6 @@ public final class InternalNetworkProperties extends AnnotationResource { */ private List connectedIPv6Subnets; - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String importRoutePolicyId; - - /* - * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. - */ - private String exportRoutePolicyId; - /* * Import Route Policy either IPv4 or IPv6. */ @@ -112,98 +67,75 @@ public final class InternalNetworkProperties extends AnnotationResource { */ private Extension extension; - /** - * Creates an instance of InternalNetworkProperties class. + /* + * Vlan identifier. Example: 1001. */ - public InternalNetworkProperties() { - } + private int vlanId; - /** - * Get the vlanId property: Vlan identifier. Example: 1001. - * - * @return the vlanId value. + /* + * BGP configuration properties. */ - public int vlanId() { - return this.vlanId; - } + private BgpConfiguration bgpConfiguration; - /** - * Set the vlanId property: Vlan identifier. Example: 1001. - * - * @param vlanId the vlanId value to set. - * @return the InternalNetworkProperties object itself. + /* + * Static Route Configuration properties. */ - public InternalNetworkProperties withVlanId(int vlanId) { - this.vlanId = vlanId; - return this; - } + private StaticRouteConfiguration staticRouteConfiguration; - /** - * Get the bgpConfiguration property: BGP configuration properties. - * - * @return the bgpConfiguration value. + /* + * Native IPv4 Prefix Limit Configuration properties. */ - public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { - return this.bgpConfiguration; - } + private NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit; - /** - * Set the bgpConfiguration property: BGP configuration properties. - * - * @param bgpConfiguration the bgpConfiguration value to set. - * @return the InternalNetworkProperties object itself. + /* + * Native IPv6 Prefix Limit Configuration properties. */ - public InternalNetworkProperties withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { - this.bgpConfiguration = bgpConfiguration; - return this; - } + private NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit; - /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. - * - * @return the staticRouteConfiguration value. + /* + * Details of the last operation performed on the resource */ - public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { - return this.staticRouteConfiguration; - } + private LastOperationProperties lastOperation; - /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. - * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. - * @return the InternalNetworkProperties object itself. + /* + * Configuration state of the resource. */ - public InternalNetworkProperties - withStaticRouteConfiguration(InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { - this.staticRouteConfiguration = staticRouteConfiguration; - return this; - } + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of InternalNetworkProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public InternalNetworkProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the InternalNetworkProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public InternalNetworkProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -266,50 +198,6 @@ public InternalNetworkProperties withConnectedIPv6Subnets(List return this; } - /** - * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward - * compatibility. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * 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 InternalNetworkProperties object itself. - */ - public InternalNetworkProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. 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 RoutePolicy. This is used for the backward - * compatibility. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the InternalNetworkProperties object itself. - */ - public InternalNetworkProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - /** * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * @@ -431,39 +319,139 @@ public InternalNetworkProperties withExtension(Extension extension) { } /** - * {@inheritDoc} + * Get the vlanId property: Vlan identifier. Example: 1001. + * + * @return the vlanId value. */ - @Override - public InternalNetworkProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public int vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan identifier. Example: 1001. + * + * @param vlanId the vlanId value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withVlanId(int vlanId) { + this.vlanId = vlanId; return this; } /** - * Validates the instance. + * Get the bgpConfiguration property: BGP configuration properties. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the bgpConfiguration value. */ - @Override - public void 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 (importRoutePolicy() != null) { - importRoutePolicy().validate(); - } - if (exportRoutePolicy() != null) { - exportRoutePolicy().validate(); - } + public BgpConfiguration bgpConfiguration() { + return this.bgpConfiguration; + } + + /** + * Set the bgpConfiguration property: BGP configuration properties. + * + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties 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 InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + + /** + * Get the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @return the nativeIpv4PrefixLimit value. + */ + public NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit() { + return this.nativeIpv4PrefixLimit; + } + + /** + * Set the nativeIpv4PrefixLimit property: Native IPv4 Prefix Limit Configuration properties. + * + * @param nativeIpv4PrefixLimit the nativeIpv4PrefixLimit value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withNativeIpv4PrefixLimit(NativeIpv4PrefixLimitProperties nativeIpv4PrefixLimit) { + this.nativeIpv4PrefixLimit = nativeIpv4PrefixLimit; + return this; + } + + /** + * Get the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @return the nativeIpv6PrefixLimit value. + */ + public NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit() { + return this.nativeIpv6PrefixLimit; + } + + /** + * Set the nativeIpv6PrefixLimit property: Native IPv6 Prefix Limit Configuration properties. + * + * @param nativeIpv6PrefixLimit the nativeIpv6PrefixLimit value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withNativeIpv6PrefixLimit(NativeIpv6PrefixLimitProperties nativeIpv6PrefixLimit) { + this.nativeIpv6PrefixLimit = nativeIpv6PrefixLimit; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * 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; } /** @@ -472,17 +460,13 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeIntField("vlanId", this.vlanId); - jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); - jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeNumberField("mtu", this.mtu); jsonWriter.writeArrayField("connectedIPv4Subnets", this.connectedIPv4Subnets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("connectedIPv6Subnets", this.connectedIPv6Subnets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("importRoutePolicyId", this.importRoutePolicyId); - jsonWriter.writeStringField("exportRoutePolicyId", this.exportRoutePolicyId); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); @@ -490,6 +474,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("isMonitoringEnabled", this.isMonitoringEnabled == null ? null : this.isMonitoringEnabled.toString()); jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); + jsonWriter.writeJsonField("bgpConfiguration", this.bgpConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); + jsonWriter.writeJsonField("nativeIpv4PrefixLimit", this.nativeIpv4PrefixLimit); + jsonWriter.writeJsonField("nativeIpv6PrefixLimit", this.nativeIpv6PrefixLimit); return jsonWriter.writeEndObject(); } @@ -509,25 +497,10 @@ public static InternalNetworkProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedInternalNetworkProperties.withAnnotation(reader.getString()); - } else if ("vlanId".equals(fieldName)) { + if ("vlanId".equals(fieldName)) { deserializedInternalNetworkProperties.vlanId = reader.getInt(); - } else if ("bgpConfiguration".equals(fieldName)) { - deserializedInternalNetworkProperties.bgpConfiguration - = InternalNetworkPropertiesBgpConfiguration.fromJson(reader); - } else if ("staticRouteConfiguration".equals(fieldName)) { - deserializedInternalNetworkProperties.staticRouteConfiguration - = InternalNetworkPropertiesStaticRouteConfiguration.fromJson(reader); - } else if ("configurationState".equals(fieldName)) { - deserializedInternalNetworkProperties.configurationState - = ConfigurationState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedInternalNetworkProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("administrativeState".equals(fieldName)) { - deserializedInternalNetworkProperties.administrativeState - = AdministrativeState.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedInternalNetworkProperties.annotation = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedInternalNetworkProperties.mtu = reader.getNullable(JsonReader::getInt); } else if ("connectedIPv4Subnets".equals(fieldName)) { @@ -538,10 +511,6 @@ public static InternalNetworkProperties fromJson(JsonReader jsonReader) throws I List connectedIPv6Subnets = reader.readArray(reader1 -> ConnectedSubnet.fromJson(reader1)); deserializedInternalNetworkProperties.connectedIPv6Subnets = connectedIPv6Subnets; - } else if ("importRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkProperties.importRoutePolicyId = reader.getString(); - } else if ("exportRoutePolicyId".equals(fieldName)) { - deserializedInternalNetworkProperties.exportRoutePolicyId = reader.getString(); } else if ("importRoutePolicy".equals(fieldName)) { deserializedInternalNetworkProperties.importRoutePolicy = ImportRoutePolicy.fromJson(reader); } else if ("exportRoutePolicy".equals(fieldName)) { @@ -555,6 +524,28 @@ public static InternalNetworkProperties fromJson(JsonReader jsonReader) throws I = IsMonitoringEnabled.fromString(reader.getString()); } else if ("extension".equals(fieldName)) { deserializedInternalNetworkProperties.extension = Extension.fromString(reader.getString()); + } else if ("bgpConfiguration".equals(fieldName)) { + deserializedInternalNetworkProperties.bgpConfiguration = BgpConfiguration.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedInternalNetworkProperties.staticRouteConfiguration + = StaticRouteConfiguration.fromJson(reader); + } else if ("nativeIpv4PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkProperties.nativeIpv4PrefixLimit + = NativeIpv4PrefixLimitProperties.fromJson(reader); + } else if ("nativeIpv6PrefixLimit".equals(fieldName)) { + deserializedInternalNetworkProperties.nativeIpv6PrefixLimit + = NativeIpv6PrefixLimitProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedInternalNetworkProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedInternalNetworkProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedInternalNetworkProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedInternalNetworkProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); } else { reader.skipChildren(); } 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 deleted file mode 100644 index ae9359eb3363..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * BGP configuration properties. - */ -@Fluent -public final class InternalNetworkPropertiesBgpConfiguration extends BgpConfiguration { - /* - * ASN of Network Fabric. Example: 65048. - */ - private Long fabricAsn; - - /** - * Creates an instance of InternalNetworkPropertiesBgpConfiguration class. - */ - public InternalNetworkPropertiesBgpConfiguration() { - } - - /** - * Get the fabricAsn property: ASN of Network Fabric. Example: 65048. - * - * @return the fabricAsn value. - */ - @Override - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * {@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() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4NeighborAddress() != null) { - ipv4NeighborAddress().forEach(e -> e.validate()); - } - if (ipv6NeighborAddress() != null) { - ipv6NeighborAddress().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeJsonField("bfdConfiguration", bfdConfiguration()); - jsonWriter.writeStringField("defaultRouteOriginate", - defaultRouteOriginate() == null ? null : defaultRouteOriginate().toString()); - jsonWriter.writeNumberField("allowAS", allowAS()); - jsonWriter.writeStringField("allowASOverride", allowASOverride() == null ? null : allowASOverride().toString()); - jsonWriter.writeNumberField("peerASN", peerAsn()); - jsonWriter.writeArrayField("ipv4ListenRangePrefixes", ipv4ListenRangePrefixes(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("ipv6ListenRangePrefixes", ipv6ListenRangePrefixes(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("ipv4NeighborAddress", ipv4NeighborAddress(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("ipv6NeighborAddress", ipv6NeighborAddress(), - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworkPropertiesBgpConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworkPropertiesBgpConfiguration if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworkPropertiesBgpConfiguration. - */ - public static InternalNetworkPropertiesBgpConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworkPropertiesBgpConfiguration deserializedInternalNetworkPropertiesBgpConfiguration - = new InternalNetworkPropertiesBgpConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("annotation".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration.withAnnotation(reader.getString()); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("defaultRouteOriginate".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withDefaultRouteOriginate(BooleanEnumProperty.fromString(reader.getString())); - } else if ("allowAS".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withAllowAS(reader.getNullable(JsonReader::getInt)); - } else if ("allowASOverride".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withAllowASOverride(AllowASOverride.fromString(reader.getString())); - } else if ("fabricASN".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration.fabricAsn - = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedInternalNetworkPropertiesBgpConfiguration - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("ipv4ListenRangePrefixes".equals(fieldName)) { - List ipv4ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedInternalNetworkPropertiesBgpConfiguration - .withIpv4ListenRangePrefixes(ipv4ListenRangePrefixes); - } else if ("ipv6ListenRangePrefixes".equals(fieldName)) { - List ipv6ListenRangePrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedInternalNetworkPropertiesBgpConfiguration - .withIpv6ListenRangePrefixes(ipv6ListenRangePrefixes); - } else if ("ipv4NeighborAddress".equals(fieldName)) { - List ipv4NeighborAddress - = reader.readArray(reader1 -> NeighborAddress.fromJson(reader1)); - deserializedInternalNetworkPropertiesBgpConfiguration.withIpv4NeighborAddress(ipv4NeighborAddress); - } else if ("ipv6NeighborAddress".equals(fieldName)) { - List ipv6NeighborAddress - = reader.readArray(reader1 -> NeighborAddress.fromJson(reader1)); - deserializedInternalNetworkPropertiesBgpConfiguration.withIpv6NeighborAddress(ipv6NeighborAddress); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworkPropertiesBgpConfiguration; - }); - } -} 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 deleted file mode 100644 index 2839b8f3fca8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Static Route Configuration properties. - */ -@Fluent -public final class InternalNetworkPropertiesStaticRouteConfiguration extends StaticRouteConfiguration { - /* - * Extension. Example: NoExtension | NPB. - */ - 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() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("bfdConfiguration", bfdConfiguration()); - jsonWriter.writeArrayField("ipv4Routes", ipv4Routes(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("ipv6Routes", ipv6Routes(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworkPropertiesStaticRouteConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworkPropertiesStaticRouteConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworkPropertiesStaticRouteConfiguration. - */ - public static InternalNetworkPropertiesStaticRouteConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworkPropertiesStaticRouteConfiguration deserializedInternalNetworkPropertiesStaticRouteConfiguration - = new InternalNetworkPropertiesStaticRouteConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bfdConfiguration".equals(fieldName)) { - deserializedInternalNetworkPropertiesStaticRouteConfiguration - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("ipv4Routes".equals(fieldName)) { - List ipv4Routes - = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); - deserializedInternalNetworkPropertiesStaticRouteConfiguration.withIpv4Routes(ipv4Routes); - } else if ("ipv6Routes".equals(fieldName)) { - List ipv6Routes - = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); - deserializedInternalNetworkPropertiesStaticRouteConfiguration.withIpv6Routes(ipv6Routes); - } else if ("extension".equals(fieldName)) { - deserializedInternalNetworkPropertiesStaticRouteConfiguration.extension - = Extension.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworkPropertiesStaticRouteConfiguration; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java new file mode 100644 index 000000000000..a1a48af141bf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Internal Network RouteType. + */ +public final class InternalNetworkRouteType extends ExpandableStringEnum { + /** + * InternalNetwork Static. + */ + public static final InternalNetworkRouteType STATIC = fromString("Static"); + + /** + * InternalNetwork Bgp. + */ + public static final InternalNetworkRouteType BGP = fromString("Bgp"); + + /** + * Creates a new instance of InternalNetworkRouteType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InternalNetworkRouteType() { + } + + /** + * Creates or finds a InternalNetworkRouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InternalNetworkRouteType. + */ + public static InternalNetworkRouteType fromString(String name) { + return fromString(name, InternalNetworkRouteType.class); + } + + /** + * Gets known InternalNetworkRouteType values. + * + * @return known InternalNetworkRouteType values. + */ + public static Collection values() { + return values(InternalNetworkRouteType.class); + } +} 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 557083c49124..67d1c9d648ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface InternalNetworks { /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso String internalNetworkName, Context context); /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -45,8 +41,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso InternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -59,8 +53,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +66,6 @@ Response getWithResponse(String resourceGroupName, String l3Iso void delete(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, Context context); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -83,13 +73,11 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** - * Executes list operation to display list of all internal networks - * * Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,14 +86,12 @@ Response getWithResponse(String resourceGroupName, String l3Iso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Internal Networks as paginated response with {@link PagedIterable}. + * @return the response of a InternalNetwork list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Executes the operation to the underlying resources. - * * 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. @@ -115,14 +101,12 @@ PagedIterable listByL3IsolationDomain(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); /** - * Executes the operation to the underlying resources. - * * 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. @@ -133,14 +117,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -150,14 +132,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + InternalNetworkBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body); /** - * Executes the operation to the underlying resources for updating BGP state on edge devices. - * * Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -168,15 +148,14 @@ CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + InternalNetworkBgpAdministrativeStateResponse updateBgpAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBgpAdministrativeStateRequest body, + Context context); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -185,15 +164,13 @@ CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body); + InternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body); /** - * Implements the operation to the underlying resources. - * - * Update Static Route BFD administrative state for internalNetwork. + * BFD administrative state for either static or bgp for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param l3IsolationDomainName Name of the L3 Isolation Domain. @@ -203,14 +180,13 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(String resourceGroupName, - String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context); + InternalNetworkBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, + String l3IsolationDomainName, String internalNetworkName, InternalNetworkBfdAdministrativeStateRequest body, + Context context); /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param id the resource ID. @@ -222,8 +198,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S InternalNetwork getById(String id); /** - * Retrieves details of InternalNetworks using GET method. - * * Gets a InternalNetworks. * * @param id the resource ID. @@ -236,8 +210,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S Response getByIdWithResponse(String id, Context context); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param id the resource ID. @@ -248,8 +220,6 @@ CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(S void deleteById(String id); /** - * Deletes a InternalNetworks. - * * Implements InternalNetworks DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index 568d980598ce..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Internal Networks. - */ -@Fluent -public final class InternalNetworksList implements JsonSerializable { - /* - * List of Internal Network resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of InternalNetworksList class. - */ - public InternalNetworksList() { - } - - /** - * Get the value property: List of Internal Network resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Internal Network resources. - * - * @param value the value value to set. - * @return the InternalNetworksList object itself. - */ - public InternalNetworksList 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 InternalNetworksList object itself. - */ - public InternalNetworksList 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternalNetworksList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternalNetworksList if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternalNetworksList. - */ - public static InternalNetworksList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternalNetworksList deserializedInternalNetworksList = new InternalNetworksList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> InternalNetworkInner.fromJson(reader1)); - deserializedInternalNetworksList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedInternalNetworksList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInternalNetworksList; - }); - } -} 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 index 78988eac2c74..a32d0e4abc80 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,60 +50,18 @@ public interface InternetGateway { 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. + * Gets the properties property: The Internet Gateway Properties. * - * @return the provisioningState value. + * @return the properties value. */ - ProvisioningState provisioningState(); + InternetGatewayProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -137,8 +95,7 @@ public interface InternetGateway { * The entirety of the InternetGateway definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithTypePropertiesType, - DefinitionStages.WithNetworkFabricControllerId, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -182,41 +139,27 @@ interface WithResourceGroup { * @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); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the InternetGateway definition allowing to specify networkFabricControllerId. + * The stage of the InternetGateway definition allowing to specify properties. */ - interface WithNetworkFabricControllerId { + interface WithProperties { /** - * Specifies the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller.. + * Specifies the properties property: The Internet Gateway Properties. * - * @param networkFabricControllerId ARM Resource ID of the Network Fabric Controller. + * @param properties The Internet Gateway Properties. * @return the next definition stage. */ - WithCreate withNetworkFabricControllerId(String networkFabricControllerId); + WithCreate withProperties(InternetGatewayProperties properties); } /** * 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 { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -245,32 +188,6 @@ interface WithTags { */ 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); - } } /** @@ -283,7 +200,7 @@ interface WithAnnotation { /** * The template for InternetGateway update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithInternetGatewayRuleId { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -309,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -318,16 +235,16 @@ interface WithTags { } /** - * The stage of the InternetGateway update allowing to specify internetGatewayRuleId. + * The stage of the InternetGateway update allowing to specify properties. */ - interface WithInternetGatewayRuleId { + interface WithProperties { /** - * Specifies the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule.. + * Specifies the properties property: Resource properties.. * - * @param internetGatewayRuleId ARM Resource ID of the Internet Gateway Rule. + * @param properties Resource properties. * @return the next definition stage. */ - Update withInternetGatewayRuleId(String internetGatewayRuleId); + Update withProperties(InternetGatewayPatchProperties properties); } } 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 index 3ef32bb95f25..5fa0bc90f155 100644 --- 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchableProperties; import java.io.IOException; import java.util.Map; @@ -16,11 +16,16 @@ * The Internet Gateway patch resource definition. */ @Fluent -public final class InternetGatewayPatch extends TagsUpdate { +public final class InternetGatewayPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Resource properties. */ - private InternetGatewayPatchableProperties innerProperties; + private InternetGatewayPatchProperties properties; /** * Creates an instance of InternetGatewayPatch class. @@ -29,66 +34,53 @@ public InternetGatewayPatch() { } /** - * Get the innerProperties property: Resource properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. + * @return the tags value. */ - private InternetGatewayPatchableProperties innerProperties() { - return this.innerProperties; + public Map tags() { + return this.tags; } /** - * {@inheritDoc} + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the InternetGatewayPatch object itself. */ - @Override public InternetGatewayPatch withTags(Map tags) { - super.withTags(tags); + this.tags = tags; return this; } /** - * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Get the properties property: Resource properties. * - * @return the internetGatewayRuleId value. + * @return the properties value. */ - public String internetGatewayRuleId() { - return this.innerProperties() == null ? null : this.innerProperties().internetGatewayRuleId(); + public InternetGatewayPatchProperties properties() { + return this.properties; } /** - * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Set the properties property: Resource properties. * - * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @param properties the properties 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); + public InternetGatewayPatch withProperties(InternetGatewayPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -109,10 +101,9 @@ public static InternetGatewayPatch fromJson(JsonReader jsonReader) throws IOExce if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedInternetGatewayPatch.withTags(tags); + deserializedInternetGatewayPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedInternetGatewayPatch.innerProperties - = InternetGatewayPatchableProperties.fromJson(reader); + deserializedInternetGatewayPatch.properties = InternetGatewayPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/InternetGatewayPatchProperties.java similarity index 56% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatchProperties.java index 17223d29e284..aca786734a08 100644 --- 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/models/InternetGatewayPatchProperties.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; @@ -12,19 +12,19 @@ import java.io.IOException; /** - * Internet Gateway Patchable Properties defines the patchable properties of the resource. + * PatchProperties for InternetGateway. */ @Fluent -public class InternetGatewayPatchableProperties implements JsonSerializable { +public final class InternetGatewayPatchProperties implements JsonSerializable { /* * ARM Resource ID of the Internet Gateway Rule. */ private String internetGatewayRuleId; /** - * Creates an instance of InternetGatewayPatchableProperties class. + * Creates an instance of InternetGatewayPatchProperties class. */ - public InternetGatewayPatchableProperties() { + public InternetGatewayPatchProperties() { } /** @@ -40,21 +40,13 @@ public String 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. + * @return the InternetGatewayPatchProperties object itself. */ - public InternetGatewayPatchableProperties withInternetGatewayRuleId(String internetGatewayRuleId) { + public InternetGatewayPatchProperties withInternetGatewayRuleId(String internetGatewayRuleId) { this.internetGatewayRuleId = internetGatewayRuleId; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -66,29 +58,29 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of InternetGatewayPatchableProperties from the JsonReader. + * Reads an instance of InternetGatewayPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of InternetGatewayPatchableProperties if the JsonReader was pointing to an instance of it, or + * @return An instance of InternetGatewayPatchProperties if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternetGatewayPatchableProperties. + * @throws IOException If an error occurs while reading the InternetGatewayPatchProperties. */ - public static InternetGatewayPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static InternetGatewayPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - InternetGatewayPatchableProperties deserializedInternetGatewayPatchableProperties - = new InternetGatewayPatchableProperties(); + InternetGatewayPatchProperties deserializedInternetGatewayPatchProperties + = new InternetGatewayPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("internetGatewayRuleId".equals(fieldName)) { - deserializedInternetGatewayPatchableProperties.internetGatewayRuleId = reader.getString(); + deserializedInternetGatewayPatchProperties.internetGatewayRuleId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedInternetGatewayPatchableProperties; + return deserializedInternetGatewayPatchProperties; }); } } 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/models/InternetGatewayProperties.java similarity index 69% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayProperties.java index becd5c745750..828ec4ee1d00 100644 --- 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/models/InternetGatewayProperties.java @@ -1,24 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; /** * Internet Gateway Properties defines the properties of the resource. */ @Fluent -public final class InternetGatewayProperties extends AnnotationResource { +public final class InternetGatewayProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Internet Gateway Rule. + */ + private String internetGatewayRuleId; + /* * IPv4 Address of Internet Gateway. */ @@ -34,20 +41,25 @@ public final class InternetGatewayProperties extends AnnotationResource { */ private GatewayType type; + /* + * Gateway Type of the resource. + */ + private GatewayType internetGatewayType; + /* * ARM Resource ID of the Network Fabric Controller. */ private String networkFabricControllerId; /* - * Provisioning state of resource. + * Details of the last operation performed on the resource */ - private ProvisioningState provisioningState; + private LastOperationProperties lastOperation; /* - * ARM Resource ID of the Internet Gateway Rule. + * Provisioning state of resource. */ - private String internetGatewayRuleId; + private ProvisioningState provisioningState; /** * Creates an instance of InternetGatewayProperties class. @@ -55,6 +67,46 @@ public final class InternetGatewayProperties extends AnnotationResource { public InternetGatewayProperties() { } + /** + * 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 InternetGatewayProperties object itself. + */ + public InternetGatewayProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * 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; + } + /** * Get the ipv4Address property: IPv4 Address of Internet Gateway. * @@ -94,93 +146,75 @@ public InternetGatewayProperties withType(GatewayType type) { } /** - * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Get the internetGatewayType property: Gateway Type of the resource. * - * @return the networkFabricControllerId value. + * @return the internetGatewayType value. */ - public String networkFabricControllerId() { - return this.networkFabricControllerId; + public GatewayType internetGatewayType() { + return this.internetGatewayType; } /** - * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * Set the internetGatewayType property: Gateway Type of the resource. * - * @param networkFabricControllerId the networkFabricControllerId value to set. + * @param internetGatewayType the internetGatewayType value to set. * @return the InternetGatewayProperties object itself. */ - public InternetGatewayProperties withNetworkFabricControllerId(String networkFabricControllerId) { - this.networkFabricControllerId = networkFabricControllerId; + public InternetGatewayProperties withInternetGatewayType(GatewayType internetGatewayType) { + this.internetGatewayType = internetGatewayType; 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. + * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @return the internetGatewayRuleId value. + * @return the networkFabricControllerId value. */ - public String internetGatewayRuleId() { - return this.internetGatewayRuleId; + public String networkFabricControllerId() { + return this.networkFabricControllerId; } /** - * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. * - * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @param networkFabricControllerId the networkFabricControllerId value to set. * @return the InternetGatewayProperties object itself. */ - public InternetGatewayProperties withInternetGatewayRuleId(String internetGatewayRuleId) { - this.internetGatewayRuleId = internetGatewayRuleId; + public InternetGatewayProperties withNetworkFabricControllerId(String networkFabricControllerId) { + this.networkFabricControllerId = networkFabricControllerId; return this; } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public InternetGatewayProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - @Override - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model InternetGatewayProperties")); - } - if (networkFabricControllerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricControllerId in model InternetGatewayProperties")); - } + public ProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("networkFabricControllerId", this.networkFabricControllerId); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("internetGatewayRuleId", this.internetGatewayRuleId); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("internetGatewayType", + this.internetGatewayType == null ? null : this.internetGatewayType.toString()); return jsonWriter.writeEndObject(); } @@ -200,21 +234,26 @@ public static InternetGatewayProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedInternetGatewayProperties.withAnnotation(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedInternetGatewayProperties.type = GatewayType.fromString(reader.getString()); - } else if ("networkFabricControllerId".equals(fieldName)) { + if ("networkFabricControllerId".equals(fieldName)) { deserializedInternetGatewayProperties.networkFabricControllerId = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedInternetGatewayProperties.annotation = reader.getString(); + } else if ("internetGatewayRuleId".equals(fieldName)) { + deserializedInternetGatewayProperties.internetGatewayRuleId = reader.getString(); } else if ("ipv4Address".equals(fieldName)) { deserializedInternetGatewayProperties.ipv4Address = reader.getString(); } else if ("port".equals(fieldName)) { deserializedInternetGatewayProperties.port = reader.getNullable(JsonReader::getInt); + } else if ("type".equals(fieldName)) { + deserializedInternetGatewayProperties.type = GatewayType.fromString(reader.getString()); + } else if ("internetGatewayType".equals(fieldName)) { + deserializedInternetGatewayProperties.internetGatewayType + = GatewayType.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedInternetGatewayProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedInternetGatewayProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("internetGatewayRuleId".equals(fieldName)) { - deserializedInternetGatewayProperties.internetGatewayRuleId = reader.getString(); } else { reader.skipChildren(); } 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 index 31eccf6b4433..e87a062bc755 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ 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; /** @@ -51,39 +50,18 @@ public interface InternetGatewayRule { 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. + * Gets the properties property: The Internet Gateway Rule properties. * - * @return the ruleProperties value. + * @return the properties value. */ - RuleProperties ruleProperties(); + InternetGatewayRuleProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -117,7 +95,7 @@ public interface InternetGatewayRule { * The entirety of the InternetGatewayRule definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithRuleProperties, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -161,27 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithRuleProperties withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the InternetGatewayRule definition allowing to specify ruleProperties. + * The stage of the InternetGatewayRule definition allowing to specify properties. */ - interface WithRuleProperties { + interface WithProperties { /** - * Specifies the ruleProperties property: Rules for the InternetGateways. + * Specifies the properties property: The Internet Gateway Rule properties. * - * @param ruleProperties Rules for the InternetGateways. + * @param properties The Internet Gateway Rule properties. * @return the next definition stage. */ - WithCreate withRuleProperties(RuleProperties ruleProperties); + WithCreate withProperties(InternetGatewayRuleProperties properties); } /** * 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 { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -210,19 +188,6 @@ interface WithTags { */ 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); - } } /** @@ -261,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. 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 index ab102b25d8cb..f6e83e7bd78e 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,12 @@ * The Internet Gateway Rules patch resource definition. */ @Fluent -public final class InternetGatewayRulePatch extends TagsUpdate { +public final class InternetGatewayRulePatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /** * Creates an instance of InternetGatewayRulePatch class. */ @@ -23,21 +29,23 @@ public InternetGatewayRulePatch() { } /** - * {@inheritDoc} + * Get the tags property: Resource tags. + * + * @return the tags value. */ - @Override - public InternetGatewayRulePatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Validates the instance. + * Set the tags property: Resource tags. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param tags the tags value to set. + * @return the InternetGatewayRulePatch object itself. */ - @Override - public void validate() { + public InternetGatewayRulePatch withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -46,7 +54,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -67,7 +75,7 @@ public static InternetGatewayRulePatch fromJson(JsonReader jsonReader) throws IO if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedInternetGatewayRulePatch.withTags(tags); + deserializedInternetGatewayRulePatch.tags = tags; } else { reader.skipChildren(); } 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/models/InternetGatewayRuleProperties.java similarity index 71% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRuleProperties.java index c7908dbaa9ec..03589b6ff30a 100644 --- 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/models/InternetGatewayRuleProperties.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.io.IOException; import java.util.List; @@ -19,12 +16,22 @@ * Internet Gateway Rule Properties defines the resource properties. */ @Fluent -public final class InternetGatewayRuleProperties extends AnnotationResource { +public final class InternetGatewayRuleProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Rules for the InternetGateways */ private RuleProperties ruleProperties; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ @@ -41,6 +48,26 @@ public final class InternetGatewayRuleProperties extends AnnotationResource { public InternetGatewayRuleProperties() { } + /** + * 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 InternetGatewayRuleProperties object itself. + */ + public InternetGatewayRuleProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the ruleProperties property: Rules for the InternetGateways. * @@ -61,6 +88,15 @@ public InternetGatewayRuleProperties withRuleProperties(RuleProperties rulePrope return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -79,41 +115,14 @@ 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() { - if (ruleProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ruleProperties in model InternetGatewayRuleProperties")); - } else { - ruleProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRuleProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeJsonField("ruleProperties", this.ruleProperties); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -134,10 +143,12 @@ public static InternetGatewayRuleProperties fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedInternetGatewayRuleProperties.withAnnotation(reader.getString()); - } else if ("ruleProperties".equals(fieldName)) { + if ("ruleProperties".equals(fieldName)) { deserializedInternetGatewayRuleProperties.ruleProperties = RuleProperties.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedInternetGatewayRuleProperties.annotation = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedInternetGatewayRuleProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedInternetGatewayRuleProperties.provisioningState = ProvisioningState.fromString(reader.getString()); 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 index 612149bf3c65..80ddd80f6621 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ 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. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGrou 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. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGrou 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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou 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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGrou 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}. + * @return the response of a InternetGatewayRule list operation 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a InternetGatewayRule list operation 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}. + * @return the response of a InternetGatewayRule list operation 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}. + * @return the response of a InternetGatewayRule list operation 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. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGrou InternetGatewayRule getById(String id); /** - * Gets an Internet Gateway Rule. - * * Gets an Internet Gateway Rule resource. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Response getByIdWithResponse(String id, Context context); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteById(String id); /** - * Deletes an Internet Gateway Rule. - * * Implements Internet Gateway Rules DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index 316cd6ef05db..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Internet Gateway Rules. - */ -@Fluent -public final class InternetGatewayRulesListResult implements JsonSerializable { - /* - * List of Internet Gateway Rule resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternetGatewayRulesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternetGatewayRulesListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternetGatewayRulesListResult. - */ - public static InternetGatewayRulesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternetGatewayRulesListResult deserializedInternetGatewayRulesListResult - = new InternetGatewayRulesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> InternetGatewayRuleInner.fromJson(reader1)); - deserializedInternetGatewayRulesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedInternetGatewayRulesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInternetGatewayRulesListResult; - }); - } -} 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 index 6e55430b8fdc..d52a4f16b0f8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ 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. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam 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. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam 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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam 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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupNam 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}. + * @return the response of a InternetGateway list operation 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a InternetGateway list operation 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}. + * @return the response of a InternetGateway list operation 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}. + * @return the response of a InternetGateway list operation 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. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam InternetGateway getById(String id); /** - * Retrieves details of Network Fabric Service Internet Gateway. - * * Implements Gateway GET method. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam 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. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupNam 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. 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 deleted file mode 100644 index 73e53efb122d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; -import java.io.IOException; -import java.util.List; - -/** - * List of InternetGateways. - */ -@Fluent -public final class InternetGatewaysListResult implements JsonSerializable { - /* - * Displays list of Internet Gateway resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InternetGatewaysListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InternetGatewaysListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the InternetGatewaysListResult. - */ - public static InternetGatewaysListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InternetGatewaysListResult deserializedInternetGatewaysListResult = new InternetGatewaysListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> InternetGatewayInner.fromJson(reader1)); - deserializedInternetGatewaysListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedInternetGatewaysListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInternetGatewaysListResult; - }); - } -} 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 deleted file mode 100644 index 5e3ac10f5e0a..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.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 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. - */ - 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 1dbe02612e66..d53a608ce2b6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface IpCommunities { /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Context context); /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S IpCommunity getByResourceGroup(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteByResourceGroup(String resourceGroupName, String ipCommunityName); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String ipCommunityName, Context context); /** - * List IP Communities by resource group. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IP Communities by resource group. - * * Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IP Communities by subscription. - * * 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 IP Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S IpCommunity getById(String id); /** - * Gets an IP Community. - * * Implements an IP Community GET method. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Response getByIdWithResponse(String id, Context context); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteById(String id); /** - * Deletes an IP Community. - * * Implements IP Community DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index 1fd982657815..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import java.io.IOException; -import java.util.List; - -/** - * List of IP Communities. - */ -@Fluent -public final class IpCommunitiesListResult implements JsonSerializable { - /* - * List of IP Community resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of IpCommunitiesListResult class. - */ - public IpCommunitiesListResult() { - } - - /** - * Get the value property: List of IP Community resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of IP Community resources. - * - * @param value the value value to set. - * @return the IpCommunitiesListResult object itself. - */ - public IpCommunitiesListResult 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 IpCommunitiesListResult object itself. - */ - public IpCommunitiesListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunitiesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunitiesListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunitiesListResult. - */ - public static IpCommunitiesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunitiesListResult deserializedIpCommunitiesListResult = new IpCommunitiesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> IpCommunityInner.fromJson(reader1)); - deserializedIpCommunitiesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedIpCommunitiesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunitiesListResult; - }); - } -} 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 993c926c0e71..c85ed3c2b9f0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import java.util.List; import java.util.Map; /** @@ -51,46 +50,18 @@ public interface IpCommunity { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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 ipCommunityRules property: List of IP Community Rules. + * Gets the properties property: The IP Community Properties. * - * @return the ipCommunityRules value. + * @return the properties value. */ - List ipCommunityRules(); + IpCommunityProperties properties(); /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -124,7 +95,7 @@ public interface IpCommunity { * The entirety of the IpCommunity definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -168,15 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the IpCommunity definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The IP Community Properties. + * + * @param properties The IP Community Properties. + * @return the next definition stage. + */ + WithCreate withProperties(IpCommunityProperties properties); } /** * The stage of the IpCommunity 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.WithIpCommunityRules, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -205,32 +188,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - - /** - * The stage of the IpCommunity definition 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. - */ - WithCreate withIpCommunityRules(List ipCommunityRules); - } - - /** - * The stage of the IpCommunity 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); - } } /** @@ -243,7 +200,7 @@ interface WithAnnotation { /** * The template for IpCommunity update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIpCommunityRules { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -269,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -278,16 +235,16 @@ interface WithTags { } /** - * The stage of the IpCommunity update allowing to specify ipCommunityRules. + * The stage of the IpCommunity update allowing to specify properties. */ - interface WithIpCommunityRules { + interface WithProperties { /** - * Specifies the ipCommunityRules property: List of IP Community Rules.. + * Specifies the properties property: IP Community patchable properties.. * - * @param ipCommunityRules List of IP Community Rules. + * @param properties IP Community patchable properties. * @return the next definition stage. */ - Update withIpCommunityRules(List ipCommunityRules); + Update withProperties(IpCommunityPatchableProperties properties); } } 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 deleted file mode 100644 index 94ee21090775..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Community add operation properties. - */ -@Fluent -public class IpCommunityAddOperationProperties implements JsonSerializable { - /* - * List of IP Community IDs. - */ - private IpCommunityIdList add; - - /** - * Creates an instance of IpCommunityAddOperationProperties class. - */ - public IpCommunityAddOperationProperties() { - } - - /** - * Get the add property: List of IP Community IDs. - * - * @return the add value. - */ - public IpCommunityIdList add() { - return this.add; - } - - /** - * Set the add property: List of IP Community IDs. - * - * @param add the add value to set. - * @return the IpCommunityAddOperationProperties object itself. - */ - public IpCommunityAddOperationProperties withAdd(IpCommunityIdList add) { - this.add = add; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (add() != null) { - add().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", this.add); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunityAddOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunityAddOperationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunityAddOperationProperties. - */ - public static IpCommunityAddOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunityAddOperationProperties deserializedIpCommunityAddOperationProperties - = new IpCommunityAddOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("add".equals(fieldName)) { - deserializedIpCommunityAddOperationProperties.add = IpCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunityAddOperationProperties; - }); - } -} 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 deleted file mode 100644 index df4f8b1203db..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Community delete operation properties. - */ -@Fluent -public class IpCommunityDeleteOperationProperties implements JsonSerializable { - /* - * List of IP Community IDs. - */ - private IpCommunityIdList delete; - - /** - * Creates an instance of IpCommunityDeleteOperationProperties class. - */ - public IpCommunityDeleteOperationProperties() { - } - - /** - * Get the delete property: List of IP Community IDs. - * - * @return the delete value. - */ - public IpCommunityIdList delete() { - return this.delete; - } - - /** - * Set the delete property: List of IP Community IDs. - * - * @param delete the delete value to set. - * @return the IpCommunityDeleteOperationProperties object itself. - */ - public IpCommunityDeleteOperationProperties withDelete(IpCommunityIdList delete) { - this.delete = delete; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delete() != null) { - delete().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("delete", this.delete); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunityDeleteOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunityDeleteOperationProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunityDeleteOperationProperties. - */ - public static IpCommunityDeleteOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunityDeleteOperationProperties deserializedIpCommunityDeleteOperationProperties - = new IpCommunityDeleteOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("delete".equals(fieldName)) { - deserializedIpCommunityDeleteOperationProperties.delete = IpCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunityDeleteOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java index c07ed87faf07..15e9ad2f7107 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * IP Community ID list properties. */ @Fluent -public class IpCommunityIdList implements JsonSerializable { +public final class IpCommunityIdList implements JsonSerializable { /* * List of IP Community resource IDs. */ @@ -48,14 +48,6 @@ public IpCommunityIdList withIpCommunityIds(List ipCommunityIds) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 f1a643970f28..16e66ac47fd3 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityPatchableProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The IP Community patch resource definition. */ @Fluent -public final class IpCommunityPatch extends TagsUpdate { +public final class IpCommunityPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * IP Community patchable properties. */ - private IpCommunityPatchableProperties innerProperties; + private IpCommunityPatchableProperties properties; /** * Creates an instance of IpCommunityPatch class. @@ -30,66 +34,53 @@ public IpCommunityPatch() { } /** - * Get the innerProperties property: IP Community patchable properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. + * @return the tags value. */ - private IpCommunityPatchableProperties innerProperties() { - return this.innerProperties; + public Map tags() { + return this.tags; } /** - * {@inheritDoc} + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the IpCommunityPatch object itself. */ - @Override public IpCommunityPatch withTags(Map tags) { - super.withTags(tags); + this.tags = tags; return this; } /** - * Get the ipCommunityRules property: List of IP Community Rules. + * Get the properties property: IP Community patchable properties. * - * @return the ipCommunityRules value. + * @return the properties value. */ - public List ipCommunityRules() { - return this.innerProperties() == null ? null : this.innerProperties().ipCommunityRules(); + public IpCommunityPatchableProperties properties() { + return this.properties; } /** - * Set the ipCommunityRules property: List of IP Community Rules. + * Set the properties property: IP Community patchable properties. * - * @param ipCommunityRules the ipCommunityRules value to set. + * @param properties the properties value to set. * @return the IpCommunityPatch object itself. */ - public IpCommunityPatch withIpCommunityRules(List ipCommunityRules) { - if (this.innerProperties() == null) { - this.innerProperties = new IpCommunityPatchableProperties(); - } - this.innerProperties().withIpCommunityRules(ipCommunityRules); + public IpCommunityPatch withProperties(IpCommunityPatchableProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -110,9 +101,9 @@ public static IpCommunityPatch fromJson(JsonReader jsonReader) throws IOExceptio if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedIpCommunityPatch.withTags(tags); + deserializedIpCommunityPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedIpCommunityPatch.innerProperties = IpCommunityPatchableProperties.fromJson(reader); + deserializedIpCommunityPatch.properties = IpCommunityPatchableProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/IpCommunityPatchableProperties.java similarity index 83% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatchableProperties.java index e81bd5ea4635..696742733021 100644 --- 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/models/IpCommunityPatchableProperties.java @@ -1,15 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import java.io.IOException; import java.util.List; @@ -17,7 +16,7 @@ * IP Community patchable properties. */ @Fluent -public class IpCommunityPatchableProperties implements JsonSerializable { +public final class IpCommunityPatchableProperties implements JsonSerializable { /* * List of IP Community Rules. */ @@ -49,17 +48,6 @@ public IpCommunityPatchableProperties withIpCommunityRules(List 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()); - } - } - /** * {@inheritDoc} */ 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/models/IpCommunityProperties.java similarity index 68% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityProperties.java index f526bbd2c167..0253beaa9293 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/models/IpCommunityProperties.java @@ -1,18 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.IpCommunityRule; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -20,7 +16,27 @@ * IP Community Properties defines the resource properties. */ @Fluent -public final class IpCommunityProperties extends AnnotationResource { +public final class IpCommunityProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Network Fabric. + */ + private String networkFabricId; + + /* + * List of IP Community Rules. + */ + private List ipCommunityRules; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -36,11 +52,6 @@ public final class IpCommunityProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * List of IP Community Rules. - */ - private List ipCommunityRules; - /** * Creates an instance of IpCommunityProperties class. */ @@ -48,30 +59,32 @@ public IpCommunityProperties() { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpCommunityProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public IpCommunityProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public String networkFabricId() { + return this.networkFabricId; } /** @@ -95,24 +108,39 @@ public IpCommunityProperties withIpCommunityRules(List ipCommun } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public IpCommunityProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - @Override - public void validate() { - if (ipCommunityRules() != null) { - ipCommunityRules().forEach(e -> e.validate()); - } + 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; } /** @@ -121,9 +149,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeArrayField("ipCommunityRules", this.ipCommunityRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -133,6 +161,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpCommunityProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpCommunityProperties. */ public static IpCommunityProperties fromJson(JsonReader jsonReader) throws IOException { @@ -142,8 +171,16 @@ public static IpCommunityProperties fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedIpCommunityProperties.withAnnotation(reader.getString()); + if ("ipCommunityRules".equals(fieldName)) { + List ipCommunityRules + = reader.readArray(reader1 -> IpCommunityRule.fromJson(reader1)); + deserializedIpCommunityProperties.ipCommunityRules = ipCommunityRules; + } else if ("annotation".equals(fieldName)) { + deserializedIpCommunityProperties.annotation = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedIpCommunityProperties.networkFabricId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedIpCommunityProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedIpCommunityProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -153,10 +190,6 @@ public static IpCommunityProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("administrativeState".equals(fieldName)) { deserializedIpCommunityProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("ipCommunityRules".equals(fieldName)) { - List ipCommunityRules - = reader.readArray(reader1 -> IpCommunityRule.fromJson(reader1)); - deserializedIpCommunityProperties.ipCommunityRules = ipCommunityRules; } else { reader.skipChildren(); } 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 index ca86f70b5935..9f2ac40d4d7d 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -130,25 +129,6 @@ public IpCommunityRule withCommunityMembers(List communityMembers) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model IpCommunityRule")); - } - if (communityMembers() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property communityMembers in model IpCommunityRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpCommunityRule.class); - /** * {@inheritDoc} */ 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 deleted file mode 100644 index 11d66e2105e0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Community set operation properties. - */ -@Fluent -public class IpCommunitySetOperationProperties implements JsonSerializable { - /* - * List of IP Community IDs. - */ - private IpCommunityIdList set; - - /** - * Creates an instance of IpCommunitySetOperationProperties class. - */ - public IpCommunitySetOperationProperties() { - } - - /** - * Get the set property: List of IP Community IDs. - * - * @return the set value. - */ - public IpCommunityIdList set() { - return this.set; - } - - /** - * Set the set property: List of IP Community IDs. - * - * @param set the set value to set. - * @return the IpCommunitySetOperationProperties object itself. - */ - public IpCommunitySetOperationProperties withSet(IpCommunityIdList set) { - this.set = set; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (set() != null) { - set().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("set", this.set); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpCommunitySetOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpCommunitySetOperationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpCommunitySetOperationProperties. - */ - public static IpCommunitySetOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpCommunitySetOperationProperties deserializedIpCommunitySetOperationProperties - = new IpCommunitySetOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("set".equals(fieldName)) { - deserializedIpCommunitySetOperationProperties.set = IpCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpCommunitySetOperationProperties; - }); - } -} 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 6e4d36b57bb8..f5e6bedd0a47 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface IpExtendedCommunities { /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGrou String ipExtendedCommunityName, Context context); /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGrou IpExtendedCommunity getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGrou void delete(String resourceGroupName, String ipExtendedCommunityName, Context context); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpExtendedCommunities by resource group. - * * Implements IpExtendedCommunities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IpExtendedCommunities by subscription. - * * Implements IpExtendedCommunities 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 IP Extended Communities as paginated response with {@link PagedIterable}. + * @return the response of a IpExtendedCommunity list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGrou IpExtendedCommunity getById(String id); /** - * Gets an IP Extended Community. - * * Implements IP Extended Community GET method. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Response getByIdWithResponse(String id, Context context); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteById(String id); /** - * Deletes the IP Extended Community. - * * Implements IP Extended Community DELETE method. * * @param id the resource ID. 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 21990b53dc6a..f36ab8666a63 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; -import java.util.List; import java.util.Map; /** @@ -51,46 +50,18 @@ public interface IpExtendedCommunity { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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. + * Gets the properties property: The IpExtendedCommunity properties. * - * @return the administrativeState value. + * @return the properties value. */ - AdministrativeState administrativeState(); + IpExtendedCommunityProperties properties(); /** - * Gets the ipExtendedCommunityRules property: List of IP Extended Community Rules. - * - * @return the ipExtendedCommunityRules value. - */ - List ipExtendedCommunityRules(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -124,7 +95,7 @@ public interface IpExtendedCommunity { * The entirety of the IpExtendedCommunity definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithIpExtendedCommunityRules, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -168,27 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithIpExtendedCommunityRules withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the IpExtendedCommunity definition allowing to specify ipExtendedCommunityRules. + * The stage of the IpExtendedCommunity definition allowing to specify properties. */ - interface WithIpExtendedCommunityRules { + interface WithProperties { /** - * Specifies the ipExtendedCommunityRules property: List of IP Extended Community Rules.. + * Specifies the properties property: The IpExtendedCommunity properties. * - * @param ipExtendedCommunityRules List of IP Extended Community Rules. + * @param properties The IpExtendedCommunity properties. * @return the next definition stage. */ - WithCreate withIpExtendedCommunityRules(List ipExtendedCommunityRules); + WithCreate withProperties(IpExtendedCommunityProperties properties); } /** * 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.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -217,19 +188,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - - /** - * The stage of the IpExtendedCommunity 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); - } } /** @@ -242,8 +200,7 @@ interface WithAnnotation { /** * The template for IpExtendedCommunity update. */ - interface Update - extends UpdateStages.WithTags, UpdateStages.WithAnnotation, UpdateStages.WithIpExtendedCommunityRules { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -269,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -278,29 +235,16 @@ interface WithTags { } /** - * 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. + * The stage of the IpExtendedCommunity update allowing to specify properties. */ - interface WithIpExtendedCommunityRules { + interface WithProperties { /** - * Specifies the ipExtendedCommunityRules property: List of IP Extended Community Rules.. + * Specifies the properties property: IP Extended Community patchable properties.. * - * @param ipExtendedCommunityRules List of IP Extended Community Rules. + * @param properties IP Extended Community patchable properties. * @return the next definition stage. */ - Update withIpExtendedCommunityRules(List ipExtendedCommunityRules); + Update withProperties(IpExtendedCommunityPatchProperties properties); } } 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 deleted file mode 100644 index 0505ca808086..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Extended Community add operation properties. - */ -@Fluent -public class IpExtendedCommunityAddOperationProperties - implements JsonSerializable { - /* - * List of IP Extended Community IDs. - */ - private IpExtendedCommunityIdList add; - - /** - * Creates an instance of IpExtendedCommunityAddOperationProperties class. - */ - public IpExtendedCommunityAddOperationProperties() { - } - - /** - * Get the add property: List of IP Extended Community IDs. - * - * @return the add value. - */ - public IpExtendedCommunityIdList add() { - return this.add; - } - - /** - * Set the add property: List of IP Extended Community IDs. - * - * @param add the add value to set. - * @return the IpExtendedCommunityAddOperationProperties object itself. - */ - public IpExtendedCommunityAddOperationProperties withAdd(IpExtendedCommunityIdList add) { - this.add = add; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (add() != null) { - add().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("add", this.add); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunityAddOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunityAddOperationProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpExtendedCommunityAddOperationProperties. - */ - public static IpExtendedCommunityAddOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunityAddOperationProperties deserializedIpExtendedCommunityAddOperationProperties - = new IpExtendedCommunityAddOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("add".equals(fieldName)) { - deserializedIpExtendedCommunityAddOperationProperties.add - = IpExtendedCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunityAddOperationProperties; - }); - } -} 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 deleted file mode 100644 index a4aeafbb1c20..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Extended Community delete operation properties. - */ -@Fluent -public class IpExtendedCommunityDeleteOperationProperties - implements JsonSerializable { - /* - * List of IP Extended Community IDs. - */ - private IpExtendedCommunityIdList delete; - - /** - * Creates an instance of IpExtendedCommunityDeleteOperationProperties class. - */ - public IpExtendedCommunityDeleteOperationProperties() { - } - - /** - * Get the delete property: List of IP Extended Community IDs. - * - * @return the delete value. - */ - public IpExtendedCommunityIdList delete() { - return this.delete; - } - - /** - * Set the delete property: List of IP Extended Community IDs. - * - * @param delete the delete value to set. - * @return the IpExtendedCommunityDeleteOperationProperties object itself. - */ - public IpExtendedCommunityDeleteOperationProperties withDelete(IpExtendedCommunityIdList delete) { - this.delete = delete; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delete() != null) { - delete().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("delete", this.delete); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunityDeleteOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunityDeleteOperationProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpExtendedCommunityDeleteOperationProperties. - */ - public static IpExtendedCommunityDeleteOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunityDeleteOperationProperties deserializedIpExtendedCommunityDeleteOperationProperties - = new IpExtendedCommunityDeleteOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("delete".equals(fieldName)) { - deserializedIpExtendedCommunityDeleteOperationProperties.delete - = IpExtendedCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunityDeleteOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java index 8c836870deba..3b3ccf457b70 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * IP Extended Community Id list properties. */ @Fluent -public class IpExtendedCommunityIdList implements JsonSerializable { +public final class IpExtendedCommunityIdList implements JsonSerializable { /* * List of IP Extended Community resource IDs. */ @@ -48,14 +48,6 @@ public IpExtendedCommunityIdList withIpExtendedCommunityIds(List ipExten return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 19cc4f9d799c..05b548223b9b 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityPatchProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The IP Extended Communities patch resource definition. */ @Fluent -public final class IpExtendedCommunityPatch extends TagsUpdate { +public final class IpExtendedCommunityPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * IP Extended Community patchable properties. */ - private IpExtendedCommunityPatchProperties innerProperties; + private IpExtendedCommunityPatchProperties properties; /** * Creates an instance of IpExtendedCommunityPatch class. @@ -30,90 +34,53 @@ public IpExtendedCommunityPatch() { } /** - * Get the innerProperties property: IP Extended Community patchable properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. - */ - private IpExtendedCommunityPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} + * @return the tags value. */ - @Override - public IpExtendedCommunityPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Get the annotation property: Switch configuration description. + * Set the tags property: Resource tags. * - * @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. + * @param tags the tags value to set. * @return the IpExtendedCommunityPatch object itself. */ - public IpExtendedCommunityPatch withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new IpExtendedCommunityPatchProperties(); - } - this.innerProperties().withAnnotation(annotation); + public IpExtendedCommunityPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * Get the properties property: IP Extended Community patchable properties. * - * @return the ipExtendedCommunityRules value. + * @return the properties value. */ - public List ipExtendedCommunityRules() { - return this.innerProperties() == null ? null : this.innerProperties().ipExtendedCommunityRules(); + public IpExtendedCommunityPatchProperties properties() { + return this.properties; } /** - * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * Set the properties property: IP Extended Community patchable properties. * - * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @param properties the properties 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); + public IpExtendedCommunityPatch withProperties(IpExtendedCommunityPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -134,9 +101,9 @@ public static IpExtendedCommunityPatch fromJson(JsonReader jsonReader) throws IO if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedIpExtendedCommunityPatch.withTags(tags); + deserializedIpExtendedCommunityPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedIpExtendedCommunityPatch.innerProperties + deserializedIpExtendedCommunityPatch.properties = IpExtendedCommunityPatchProperties.fromJson(reader); } else { reader.skipChildren(); 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/models/IpExtendedCommunityPatchProperties.java similarity index 66% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchProperties.java index 3f2697f41e48..5eef407b209b 100644 --- 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/models/IpExtendedCommunityPatchProperties.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.io.IOException; import java.util.List; @@ -18,12 +16,17 @@ * IP Extended Community patchable properties. */ @Fluent -public final class IpExtendedCommunityPatchProperties extends IpExtendedCommunityPatchableProperties { +public final class IpExtendedCommunityPatchProperties implements JsonSerializable { /* * Switch configuration description. */ private String annotation; + /* + * List of IP Extended Community Rules. + */ + private List ipExtendedCommunityRules; + /** * Creates an instance of IpExtendedCommunityPatchProperties class. */ @@ -51,42 +54,35 @@ public IpExtendedCommunityPatchProperties withAnnotation(String annotation) { } /** - * {@inheritDoc} + * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @return the ipExtendedCommunityRules value. */ - @Override - public IpExtendedCommunityPatchProperties - withIpExtendedCommunityRules(List ipExtendedCommunityRules) { - super.withIpExtendedCommunityRules(ipExtendedCommunityRules); - return this; + public List ipExtendedCommunityRules() { + return this.ipExtendedCommunityRules; } /** - * Validates the instance. + * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @return the IpExtendedCommunityPatchProperties object itself. */ - @Override - public void validate() { - if (ipExtendedCommunityRules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityPatchProperties")); - } else { - ipExtendedCommunityRules().forEach(e -> e.validate()); - } + public IpExtendedCommunityPatchProperties + withIpExtendedCommunityRules(List ipExtendedCommunityRules) { + this.ipExtendedCommunityRules = ipExtendedCommunityRules; + return this; } - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityPatchProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipExtendedCommunityRules", ipExtendedCommunityRules(), - (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeArrayField("ipExtendedCommunityRules", this.ipExtendedCommunityRules, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -96,7 +92,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpExtendedCommunityPatchProperties if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpExtendedCommunityPatchProperties. */ public static IpExtendedCommunityPatchProperties fromJson(JsonReader jsonReader) throws IOException { @@ -107,13 +102,12 @@ public static IpExtendedCommunityPatchProperties fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("ipExtendedCommunityRules".equals(fieldName)) { + if ("annotation".equals(fieldName)) { + deserializedIpExtendedCommunityPatchProperties.annotation = reader.getString(); + } else if ("ipExtendedCommunityRules".equals(fieldName)) { List ipExtendedCommunityRules = reader.readArray(reader1 -> IpExtendedCommunityRule.fromJson(reader1)); - deserializedIpExtendedCommunityPatchProperties - .withIpExtendedCommunityRules(ipExtendedCommunityRules); - } else if ("annotation".equals(fieldName)) { - deserializedIpExtendedCommunityPatchProperties.annotation = reader.getString(); + deserializedIpExtendedCommunityPatchProperties.ipExtendedCommunityRules = ipExtendedCommunityRules; } else { reader.skipChildren(); } 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 deleted file mode 100644 index d75a2895016c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (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.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * IP Extended Community patchable properties. - */ -@Fluent -public class IpExtendedCommunityPatchableProperties - implements JsonSerializable { - /* - * List of IP Extended Community Rules. - */ - 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.atError() - .log(new IllegalArgumentException( - "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityPatchableProperties")); - } else { - ipExtendedCommunityRules().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityPatchableProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipExtendedCommunityRules", this.ipExtendedCommunityRules, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunityPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunityPatchableProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IpExtendedCommunityPatchableProperties. - */ - public static IpExtendedCommunityPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunityPatchableProperties deserializedIpExtendedCommunityPatchableProperties - = new IpExtendedCommunityPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipExtendedCommunityRules".equals(fieldName)) { - List ipExtendedCommunityRules - = reader.readArray(reader1 -> IpExtendedCommunityRule.fromJson(reader1)); - deserializedIpExtendedCommunityPatchableProperties.ipExtendedCommunityRules - = ipExtendedCommunityRules; - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunityPatchableProperties; - }); - } -} 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/models/IpExtendedCommunityProperties.java similarity index 70% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityProperties.java index 913ff4125ed3..00edc156bd2d 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/models/IpExtendedCommunityProperties.java @@ -1,19 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.IpExtendedCommunityRule; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -21,7 +16,27 @@ * IP Extended Community Properties defines the resource properties. */ @Fluent -public final class IpExtendedCommunityProperties extends AnnotationResource { +public final class IpExtendedCommunityProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Network Fabric. + */ + private String networkFabricId; + + /* + * List of IP Extended Community Rules. + */ + private List ipExtendedCommunityRules; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -37,11 +52,6 @@ public final class IpExtendedCommunityProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * List of IP Extended Community Rules. - */ - private List ipExtendedCommunityRules; - /** * Creates an instance of IpExtendedCommunityProperties class. */ @@ -49,30 +59,32 @@ public IpExtendedCommunityProperties() { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpExtendedCommunityProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public IpExtendedCommunityProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public String networkFabricId() { + return this.networkFabricId; } /** @@ -97,31 +109,40 @@ public List ipExtendedCommunityRules() { } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public IpExtendedCommunityProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - @Override - public void validate() { - if (ipExtendedCommunityRules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityProperties")); - } else { - ipExtendedCommunityRules().forEach(e -> e.validate()); - } + 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; } - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityProperties.class); + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } /** * {@inheritDoc} @@ -129,9 +150,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeArrayField("ipExtendedCommunityRules", this.ipExtendedCommunityRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -152,12 +173,16 @@ public static IpExtendedCommunityProperties fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedIpExtendedCommunityProperties.withAnnotation(reader.getString()); - } else if ("ipExtendedCommunityRules".equals(fieldName)) { + if ("ipExtendedCommunityRules".equals(fieldName)) { List ipExtendedCommunityRules = reader.readArray(reader1 -> IpExtendedCommunityRule.fromJson(reader1)); deserializedIpExtendedCommunityProperties.ipExtendedCommunityRules = ipExtendedCommunityRules; + } else if ("annotation".equals(fieldName)) { + deserializedIpExtendedCommunityProperties.annotation = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedIpExtendedCommunityProperties.networkFabricId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedIpExtendedCommunityProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedIpExtendedCommunityProperties.configurationState = ConfigurationState.fromString(reader.getString()); 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 index f157e486efe9..23231315c22f 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -111,25 +110,6 @@ public IpExtendedCommunityRule withRouteTargets(List routeTargets) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model IpExtendedCommunityRule")); - } - if (routeTargets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property routeTargets in model IpExtendedCommunityRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityRule.class); - /** * {@inheritDoc} */ 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 deleted file mode 100644 index 8f29e1acbb9a..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IP Extended Community set operation properties. - */ -@Fluent -public class IpExtendedCommunitySetOperationProperties - implements JsonSerializable { - /* - * List of IP Extended Community IDs. - */ - private IpExtendedCommunityIdList set; - - /** - * Creates an instance of IpExtendedCommunitySetOperationProperties class. - */ - public IpExtendedCommunitySetOperationProperties() { - } - - /** - * Get the set property: List of IP Extended Community IDs. - * - * @return the set value. - */ - public IpExtendedCommunityIdList set() { - return this.set; - } - - /** - * Set the set property: List of IP Extended Community IDs. - * - * @param set the set value to set. - * @return the IpExtendedCommunitySetOperationProperties object itself. - */ - public IpExtendedCommunitySetOperationProperties withSet(IpExtendedCommunityIdList set) { - this.set = set; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (set() != null) { - set().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("set", this.set); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpExtendedCommunitySetOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpExtendedCommunitySetOperationProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpExtendedCommunitySetOperationProperties. - */ - public static IpExtendedCommunitySetOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpExtendedCommunitySetOperationProperties deserializedIpExtendedCommunitySetOperationProperties - = new IpExtendedCommunitySetOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("set".equals(fieldName)) { - deserializedIpExtendedCommunitySetOperationProperties.set - = IpExtendedCommunityIdList.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIpExtendedCommunitySetOperationProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java new file mode 100644 index 000000000000..0bde2d168179 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * IP Group properties. + */ +@Fluent +public final class IpGroupPatchProperties implements JsonSerializable { + /* + * IP Group name. + */ + private String name; + + /* + * IP Address type. + */ + private IPAddressType ipAddressType; + + /* + * List of IP Prefixes. + */ + private List ipPrefixes; + + /** + * Creates an instance of IpGroupPatchProperties class. + */ + public IpGroupPatchProperties() { + } + + /** + * 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 IpGroupPatchProperties object itself. + */ + public IpGroupPatchProperties 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 IpGroupPatchProperties object itself. + */ + public IpGroupPatchProperties 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 IpGroupPatchProperties object itself. + */ + public IpGroupPatchProperties withIpPrefixes(List ipPrefixes) { + this.ipPrefixes = ipPrefixes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("ipPrefixes", this.ipPrefixes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpGroupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpGroupPatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IpGroupPatchProperties. + */ + public static IpGroupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpGroupPatchProperties deserializedIpGroupPatchProperties = new IpGroupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedIpGroupPatchProperties.name = reader.getString(); + } else if ("ipAddressType".equals(fieldName)) { + deserializedIpGroupPatchProperties.ipAddressType = IPAddressType.fromString(reader.getString()); + } else if ("ipPrefixes".equals(fieldName)) { + List ipPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedIpGroupPatchProperties.ipPrefixes = ipPrefixes; + } else { + reader.skipChildren(); + } + } + + return deserializedIpGroupPatchProperties; + }); + } +} 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 index 129230ab77c7..18366631df83 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -25,7 +25,7 @@ public final class IpGroupProperties implements JsonSerializable ipPrefixes) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -136,7 +128,7 @@ public static IpGroupProperties fromJson(JsonReader jsonReader) throws IOExcepti if ("name".equals(fieldName)) { deserializedIpGroupProperties.name = reader.getString(); } else if ("ipAddressType".equals(fieldName)) { - deserializedIpGroupProperties.ipAddressType = IpAddressType.fromString(reader.getString()); + deserializedIpGroupProperties.ipAddressType = IPAddressType.fromString(reader.getString()); } else if ("ipPrefixes".equals(fieldName)) { List ipPrefixes = reader.readArray(reader1 -> reader1.getString()); deserializedIpGroupProperties.ipPrefixes = ipPrefixes; 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 index fd1e5a465346..595df8683e23 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -123,14 +123,6 @@ public IpMatchCondition withIpGroupNames(List ipGroupNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java new file mode 100644 index 000000000000..a37dbcdc5840 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the condition that can be filtered using the selected IPs. + */ +@Fluent +public final class IpMatchConditionPatch implements JsonSerializable { + /* + * IP Address type that needs to be matched. + */ + private SourceDestinationType type; + + /* + * IP Prefix Type that needs to be matched. + */ + private PrefixType prefixType; + + /* + * The list of IP Prefixes that need to be matched. + */ + private List ipPrefixValues; + + /* + * The List of IP Group Names that need to be matched. + */ + private List ipGroupNames; + + /** + * Creates an instance of IpMatchConditionPatch class. + */ + public IpMatchConditionPatch() { + } + + /** + * Get the type property: IP Address type that needs to be matched. + * + * @return the type value. + */ + public SourceDestinationType type() { + return this.type; + } + + /** + * Set the type property: IP Address type that needs to be matched. + * + * @param type the type value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withType(SourceDestinationType type) { + this.type = type; + return this; + } + + /** + * Get the prefixType property: IP Prefix Type that needs to be matched. + * + * @return the prefixType value. + */ + public PrefixType prefixType() { + return this.prefixType; + } + + /** + * Set the prefixType property: IP Prefix Type that needs to be matched. + * + * @param prefixType the prefixType value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withPrefixType(PrefixType prefixType) { + this.prefixType = prefixType; + return this; + } + + /** + * Get the ipPrefixValues property: The list of IP Prefixes that need to be matched. + * + * @return the ipPrefixValues value. + */ + public List ipPrefixValues() { + return this.ipPrefixValues; + } + + /** + * Set the ipPrefixValues property: The list of IP Prefixes that need to be matched. + * + * @param ipPrefixValues the ipPrefixValues value to set. + * @return the IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch 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 IpMatchConditionPatch object itself. + */ + public IpMatchConditionPatch withIpGroupNames(List ipGroupNames) { + this.ipGroupNames = ipGroupNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("prefixType", this.prefixType == null ? null : this.prefixType.toString()); + jsonWriter.writeArrayField("ipPrefixValues", this.ipPrefixValues, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipGroupNames", this.ipGroupNames, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpMatchConditionPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the IpMatchConditionPatch. + */ + public static IpMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpMatchConditionPatch deserializedIpMatchConditionPatch = new IpMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedIpMatchConditionPatch.type = SourceDestinationType.fromString(reader.getString()); + } else if ("prefixType".equals(fieldName)) { + deserializedIpMatchConditionPatch.prefixType = PrefixType.fromString(reader.getString()); + } else if ("ipPrefixValues".equals(fieldName)) { + List ipPrefixValues = reader.readArray(reader1 -> reader1.getString()); + deserializedIpMatchConditionPatch.ipPrefixValues = ipPrefixValues; + } else if ("ipGroupNames".equals(fieldName)) { + List ipGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedIpMatchConditionPatch.ipGroupNames = ipGroupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedIpMatchConditionPatch; + }); + } +} 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 326c6a37d933..1b5047b8b2ca 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; -import java.util.List; import java.util.Map; /** @@ -51,46 +50,18 @@ public interface IpPrefix { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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. + * Gets the properties property: The IP Prefix properties. * - * @return the administrativeState value. + * @return the properties value. */ - AdministrativeState administrativeState(); + IpPrefixProperties properties(); /** - * Gets the ipPrefixRules property: The list of IP Prefix Rules. - * - * @return the ipPrefixRules value. - */ - List ipPrefixRules(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -124,7 +95,7 @@ public interface IpPrefix { * The entirety of the IpPrefix definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -168,15 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the IpPrefix definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The IP Prefix properties. + * + * @param properties The IP Prefix properties. + * @return the next definition stage. + */ + WithCreate withProperties(IpPrefixProperties properties); } /** * 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.WithIpPrefixRules, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -205,32 +188,6 @@ 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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -243,7 +200,7 @@ interface WithAnnotation { /** * The template for IpPrefix update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIpPrefixRules, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -269,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -278,29 +235,16 @@ interface WithTags { } /** - * 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. + * The stage of the IpPrefix update allowing to specify properties. */ - interface WithAnnotation { + interface WithProperties { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the properties property: IP Prefix patchable properties.. * - * @param annotation Switch configuration description. + * @param properties IP Prefix patchable properties. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withProperties(IpPrefixPatchProperties properties); } } 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 598da134c713..1d57ebdd5379 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixPatchProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The IP Prefix patch resource definition. */ @Fluent -public final class IpPrefixPatch extends TagsUpdate { +public final class IpPrefixPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * IP Prefix patchable properties. */ - private IpPrefixPatchProperties innerProperties; + private IpPrefixPatchProperties properties; /** * Creates an instance of IpPrefixPatch class. @@ -30,89 +34,53 @@ public IpPrefixPatch() { } /** - * Get the innerProperties property: IP Prefix patchable properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. - */ - private IpPrefixPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} + * @return the tags value. */ - @Override - public IpPrefixPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Get the ipPrefixRules property: The list of IP Prefix Rules. + * Set the tags property: Resource tags. * - * @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. + * @param tags the tags value to set. * @return the IpPrefixPatch object itself. */ - public IpPrefixPatch withIpPrefixRules(List ipPrefixRules) { - if (this.innerProperties() == null) { - this.innerProperties = new IpPrefixPatchProperties(); - } - this.innerProperties().withIpPrefixRules(ipPrefixRules); + public IpPrefixPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: IP Prefix patchable properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public IpPrefixPatchProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: IP Prefix patchable properties. * - * @param annotation the annotation value to set. + * @param properties the properties 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); + public IpPrefixPatch withProperties(IpPrefixPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -133,9 +101,9 @@ public static IpPrefixPatch fromJson(JsonReader jsonReader) throws IOException { if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedIpPrefixPatch.withTags(tags); + deserializedIpPrefixPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedIpPrefixPatch.innerProperties = IpPrefixPatchProperties.fromJson(reader); + deserializedIpPrefixPatch.properties = IpPrefixPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/IpPrefixPatchProperties.java similarity index 76% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchProperties.java index d71d589d51f0..faa6725f4291 100644 --- 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/models/IpPrefixPatchProperties.java @@ -1,15 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.io.IOException; import java.util.List; @@ -17,7 +16,12 @@ * IP Prefix patchable properties. */ @Fluent -public final class IpPrefixPatchProperties extends AnnotationResource { +public final class IpPrefixPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * The list of IP Prefix Rules. */ @@ -30,44 +34,43 @@ public IpPrefixPatchProperties() { } /** - * Get the ipPrefixRules property: The list of IP Prefix Rules. + * Get the annotation property: Switch configuration description. * - * @return the ipPrefixRules value. + * @return the annotation value. */ - public List ipPrefixRules() { - return this.ipPrefixRules; + public String annotation() { + return this.annotation; } /** - * Set the ipPrefixRules property: The list of IP Prefix Rules. + * Set the annotation property: Switch configuration description. * - * @param ipPrefixRules the ipPrefixRules value to set. + * @param annotation the annotation value to set. * @return the IpPrefixPatchProperties object itself. */ - public IpPrefixPatchProperties withIpPrefixRules(List ipPrefixRules) { - this.ipPrefixRules = ipPrefixRules; + public IpPrefixPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * {@inheritDoc} + * Get the ipPrefixRules property: The list of IP Prefix Rules. + * + * @return the ipPrefixRules value. */ - @Override - public IpPrefixPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public List ipPrefixRules() { + return this.ipPrefixRules; } /** - * Validates the instance. + * Set the ipPrefixRules property: The list of IP Prefix Rules. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param ipPrefixRules the ipPrefixRules value to set. + * @return the IpPrefixPatchProperties object itself. */ - @Override - public void validate() { - if (ipPrefixRules() != null) { - ipPrefixRules().forEach(e -> e.validate()); - } + public IpPrefixPatchProperties withIpPrefixRules(List ipPrefixRules) { + this.ipPrefixRules = ipPrefixRules; + return this; } /** @@ -76,7 +79,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeArrayField("ipPrefixRules", this.ipPrefixRules, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -97,7 +100,7 @@ public static IpPrefixPatchProperties fromJson(JsonReader jsonReader) throws IOE reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedIpPrefixPatchProperties.withAnnotation(reader.getString()); + deserializedIpPrefixPatchProperties.annotation = reader.getString(); } else if ("ipPrefixRules".equals(fieldName)) { List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); deserializedIpPrefixPatchProperties.ipPrefixRules = ipPrefixRules; 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 deleted file mode 100644 index d1f24e27f5cc..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * IP Prefix patchable properties. - */ -@Fluent -public class IpPrefixPatchableProperties implements JsonSerializable { - /* - * The list of IP Prefix Rules. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipPrefixRules", this.ipPrefixRules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpPrefixPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpPrefixPatchableProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpPrefixPatchableProperties. - */ - public static IpPrefixPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpPrefixPatchableProperties deserializedIpPrefixPatchableProperties = new IpPrefixPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipPrefixRules".equals(fieldName)) { - List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); - deserializedIpPrefixPatchableProperties.ipPrefixRules = ipPrefixRules; - } else { - reader.skipChildren(); - } - } - - return deserializedIpPrefixPatchableProperties; - }); - } -} 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/models/IpPrefixProperties.java similarity index 67% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixProperties.java index 9e8a0527165a..3b37364305c7 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/models/IpPrefixProperties.java @@ -1,18 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.IpPrefixRule; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -20,7 +16,27 @@ * IP Prefix Properties defines the properties of the resource. */ @Fluent -public final class IpPrefixProperties extends AnnotationResource { +public final class IpPrefixProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * ARM Resource ID of the Network Fabric. + */ + private String networkFabricId; + + /* + * The list of IP Prefix Rules. + */ + private List ipPrefixRules; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -36,11 +52,6 @@ public final class IpPrefixProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * The list of IP Prefix Rules. - */ - private List ipPrefixRules; - /** * Creates an instance of IpPrefixProperties class. */ @@ -48,30 +59,32 @@ public IpPrefixProperties() { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the configurationState value. + * @return the annotation value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: Provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the IpPrefixProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public IpPrefixProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** - * Get the administrativeState property: Administrative state of the resource. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * - * @return the administrativeState value. + * @return the networkFabricId value. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public String networkFabricId() { + return this.networkFabricId; } /** @@ -95,24 +108,39 @@ public IpPrefixProperties withIpPrefixRules(List ipPrefixRules) { } /** - * {@inheritDoc} + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. */ - @Override - public IpPrefixProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the configurationState property: Configuration state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the configurationState value. */ - @Override - public void validate() { - if (ipPrefixRules() != null) { - ipPrefixRules().forEach(e -> e.validate()); - } + 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; } /** @@ -121,8 +149,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeArrayField("ipPrefixRules", this.ipPrefixRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -132,6 +160,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IpPrefixProperties if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the IpPrefixProperties. */ public static IpPrefixProperties fromJson(JsonReader jsonReader) throws IOException { @@ -141,8 +170,15 @@ public static IpPrefixProperties fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedIpPrefixProperties.withAnnotation(reader.getString()); + if ("ipPrefixRules".equals(fieldName)) { + List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); + deserializedIpPrefixProperties.ipPrefixRules = ipPrefixRules; + } else if ("annotation".equals(fieldName)) { + deserializedIpPrefixProperties.annotation = reader.getString(); + } else if ("networkFabricId".equals(fieldName)) { + deserializedIpPrefixProperties.networkFabricId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedIpPrefixProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedIpPrefixProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -151,9 +187,6 @@ public static IpPrefixProperties fromJson(JsonReader jsonReader) throws IOExcept } else if ("administrativeState".equals(fieldName)) { deserializedIpPrefixProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("ipPrefixRules".equals(fieldName)) { - List ipPrefixRules = reader.readArray(reader1 -> IpPrefixRule.fromJson(reader1)); - deserializedIpPrefixProperties.ipPrefixRules = ipPrefixRules; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java index e61b46ecb6a9..b01d31e5938d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -160,24 +159,6 @@ public IpPrefixRule withSubnetMaskLength(String subnetMaskLength) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model IpPrefixRule")); - } - if (networkPrefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property networkPrefix in model IpPrefixRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpPrefixRule.class); - /** * {@inheritDoc} */ 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 4e0ebab2d77e..1c495b34ddd5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface IpPrefixes { /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -28,8 +26,6 @@ public interface IpPrefixes { Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, Context context); /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -42,8 +38,6 @@ public interface IpPrefixes { IpPrefix getByResourceGroup(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -55,8 +49,6 @@ public interface IpPrefixes { void deleteByResourceGroup(String resourceGroupName, String ipPrefixName); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -69,21 +61,17 @@ public interface IpPrefixes { void delete(String resourceGroupName, String ipPrefixName, Context context); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpPrefixes by resource group. - * * Implements IpPrefixes list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -91,37 +79,31 @@ 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IpPrefixes by subscription. - * * Implements IpPrefixes 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 IP Prefixes as paginated response with {@link PagedIterable}. + * @return the response of a IpPrefix list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param id the resource ID. @@ -133,8 +115,6 @@ public interface IpPrefixes { IpPrefix getById(String id); /** - * Gets an IP Prefix. - * * Implements IP Prefix GET method. * * @param id the resource ID. @@ -147,8 +127,6 @@ public interface IpPrefixes { Response getByIdWithResponse(String id, Context context); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param id the resource ID. @@ -159,8 +137,6 @@ public interface IpPrefixes { void deleteById(String id); /** - * Deletes the IP Prefix. - * * Implements IP Prefix DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index a55b13a645ef..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; -import java.io.IOException; -import java.util.List; - -/** - * List of IP Prefixes. - */ -@Fluent -public final class IpPrefixesListResult implements JsonSerializable { - /* - * List of IP Prefix resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of IpPrefixesListResult class. - */ - public IpPrefixesListResult() { - } - - /** - * Get the value property: List of IP Prefix resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of IP Prefix resources. - * - * @param value the value value to set. - * @return the IpPrefixesListResult object itself. - */ - public IpPrefixesListResult 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 IpPrefixesListResult object itself. - */ - public IpPrefixesListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpPrefixesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpPrefixesListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IpPrefixesListResult. - */ - public static IpPrefixesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpPrefixesListResult deserializedIpPrefixesListResult = new IpPrefixesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> IpPrefixInner.fromJson(reader1)); - deserializedIpPrefixesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedIpPrefixesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIpPrefixesListResult; - }); - } -} 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 index 81fbef7c726f..7973a6663a0a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class IsManagementType extends ExpandableStringEnum { /** - * Static value True for IsManagementType. + * IsManagementType-True. */ public static final IsManagementType TRUE = fromString("True"); /** - * Static value False for IsManagementType. + * IsManagementType-False. */ public static final IsManagementType FALSE = fromString("False"); 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 index ec69389b774e..e79ad7b54e0f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class IsMonitoringEnabled extends ExpandableStringEnum { /** - * Static value True for IsMonitoringEnabled. + * IsMonitoringEnabled-True. */ public static final IsMonitoringEnabled TRUE = fromString("True"); /** - * Static value False for IsMonitoringEnabled. + * IsMonitoringEnabled-False. */ public static final IsMonitoringEnabled FALSE = fromString("False"); 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 index 67e2c36c77ca..bdfe22a30130 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,12 +13,12 @@ */ public final class IsWorkloadManagementNetworkEnabled extends ExpandableStringEnum { /** - * Static value True for IsWorkloadManagementNetworkEnabled. + * IsWorkloadManagementNetworkEnabled-True. */ public static final IsWorkloadManagementNetworkEnabled TRUE = fromString("True"); /** - * Static value False for IsWorkloadManagementNetworkEnabled. + * IsWorkloadManagementNetworkEnabled-False. */ public static final IsWorkloadManagementNetworkEnabled FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java new file mode 100644 index 000000000000..85852b3ecd16 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Isolation Domain Properties. + */ +@Fluent +public final class IsolationDomainPatchProperties implements JsonSerializable { + /* + * Type of encapsulation. + */ + private Encapsulation encapsulation; + + /* + * List of Neighbor Group IDs. + */ + private List neighborGroupIds; + + /** + * Creates an instance of IsolationDomainPatchProperties class. + */ + public IsolationDomainPatchProperties() { + } + + /** + * 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 IsolationDomainPatchProperties object itself. + */ + public IsolationDomainPatchProperties 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 IsolationDomainPatchProperties object itself. + */ + public IsolationDomainPatchProperties withNeighborGroupIds(List neighborGroupIds) { + this.neighborGroupIds = neighborGroupIds; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("encapsulation", this.encapsulation == null ? null : this.encapsulation.toString()); + jsonWriter.writeArrayField("neighborGroupIds", this.neighborGroupIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IsolationDomainPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IsolationDomainPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IsolationDomainPatchProperties. + */ + public static IsolationDomainPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IsolationDomainPatchProperties deserializedIsolationDomainPatchProperties + = new IsolationDomainPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("encapsulation".equals(fieldName)) { + deserializedIsolationDomainPatchProperties.encapsulation + = Encapsulation.fromString(reader.getString()); + } else if ("neighborGroupIds".equals(fieldName)) { + List neighborGroupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedIsolationDomainPatchProperties.neighborGroupIds = neighborGroupIds; + } else { + reader.skipChildren(); + } + } + + return deserializedIsolationDomainPatchProperties; + }); + } +} 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 index 553f0a1fac29..baf6f356004d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public IsolationDomainProperties withNeighborGroupIds(List neighborGroup return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 15caa84bb8bc..ce6cda46fc7e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,60 +50,18 @@ public interface L2IsolationDomain { 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 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. - * - * @return the mtu value. - */ - Integer mtu(); - - /** - * Gets the configurationState property: Configuration state of the resource. + * Gets the properties property: The L2IsolationDomain properties. * - * @return the configurationState value. + * @return the properties value. */ - ConfigurationState configurationState(); + L2IsolationDomainProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -136,9 +94,8 @@ public interface L2IsolationDomain { /** * The entirety of the L2IsolationDomain definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithNetworkFabricId, DefinitionStages.WithVlanId, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -182,41 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the L2IsolationDomain definition allowing to specify networkFabricId. + * The stage of the L2IsolationDomain definition allowing to specify properties. */ - interface WithNetworkFabricId { + interface WithProperties { /** - * Specifies the networkFabricId property: ARM Resource ID of the Network Fabric.. + * Specifies the properties property: The L2IsolationDomain properties. * - * @param networkFabricId ARM Resource ID of the Network Fabric. + * @param properties The L2IsolationDomain properties. * @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); + WithCreate withProperties(L2IsolationDomainProperties properties); } /** * 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.WithMtu, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -245,32 +188,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - - /** - * The stage of the L2IsolationDomain definition allowing to specify mtu. - */ - interface WithMtu { - /** - * Specifies the mtu property: 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); - } - - /** - * The stage of the L2IsolationDomain 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); - } } /** @@ -283,7 +200,7 @@ interface WithAnnotation { /** * The template for L2IsolationDomain update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithMtu, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -309,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -318,29 +235,16 @@ 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.. - * - * @param mtu Maximum transmission unit. Default value is 1500. - * @return the next definition stage. - */ - Update withMtu(Integer mtu); - } - - /** - * The stage of the L2IsolationDomain update allowing to specify annotation. + * The stage of the L2IsolationDomain update allowing to specify properties. */ - interface WithAnnotation { + interface WithProperties { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the properties property: Resource properties.. * - * @param annotation Switch configuration description. + * @param properties Resource properties. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withProperties(L2IsolationDomainPatchProperties properties); } } @@ -360,21 +264,17 @@ interface WithAnnotation { L2IsolationDomain refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Enables isolation domain across the fabric or on specified racks. * * @param body Request payload. @@ -382,7 +282,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 device updates. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); @@ -391,7 +291,7 @@ 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 the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); @@ -402,31 +302,27 @@ 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 the response of the action validate configuration. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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 6985afb40cc1..b608e1dd06fd 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainPatchProperties; import java.io.IOException; import java.util.Map; @@ -16,11 +16,16 @@ * The L2 Isolation Domain patch resource definition. */ @Fluent -public final class L2IsolationDomainPatch extends TagsUpdate { +public final class L2IsolationDomainPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Resource properties. */ - private L2IsolationDomainPatchProperties innerProperties; + private L2IsolationDomainPatchProperties properties; /** * Creates an instance of L2IsolationDomainPatch class. @@ -29,89 +34,53 @@ public L2IsolationDomainPatch() { } /** - * Get the innerProperties property: Resource properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. - */ - private L2IsolationDomainPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} + * @return the tags value. */ - @Override - public L2IsolationDomainPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Get the mtu property: Maximum transmission unit. Default value is 1500. + * Set the tags property: Resource tags. * - * @return the mtu value. - */ - public Integer mtu() { - return this.innerProperties() == null ? null : this.innerProperties().mtu(); - } - - /** - * Set the mtu property: Maximum transmission unit. Default value is 1500. - * - * @param mtu the mtu value to set. + * @param tags the tags value to set. * @return the L2IsolationDomainPatch object itself. */ - public L2IsolationDomainPatch withMtu(Integer mtu) { - if (this.innerProperties() == null) { - this.innerProperties = new L2IsolationDomainPatchProperties(); - } - this.innerProperties().withMtu(mtu); + public L2IsolationDomainPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: Resource properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public L2IsolationDomainPatchProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: Resource properties. * - * @param annotation the annotation value to set. + * @param properties the properties value to set. * @return the L2IsolationDomainPatch object itself. */ - public L2IsolationDomainPatch withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new L2IsolationDomainPatchProperties(); - } - this.innerProperties().withAnnotation(annotation); + public L2IsolationDomainPatch withProperties(L2IsolationDomainPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -132,10 +101,9 @@ public static L2IsolationDomainPatch fromJson(JsonReader jsonReader) throws IOEx if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedL2IsolationDomainPatch.withTags(tags); + deserializedL2IsolationDomainPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedL2IsolationDomainPatch.innerProperties - = L2IsolationDomainPatchProperties.fromJson(reader); + deserializedL2IsolationDomainPatch.properties = L2IsolationDomainPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatchProperties.java new file mode 100644 index 000000000000..74972fd8dabb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatchProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * L2 Isolation Domain Patch Properties defines the patchable properties of the resource. + */ +@Fluent +public final class L2IsolationDomainPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Maximum transmission unit. Default value is 1500. + */ + private Integer mtu; + + /* + * Extended VLAN status. + */ + private ExtendedVlan extendedVlan; + + /* + * ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource. + */ + private String networkToNetworkInterconnectId; + + /** + * Creates an instance of L2IsolationDomainPatchProperties class. + */ + public L2IsolationDomainPatchProperties() { + } + + /** + * 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 L2IsolationDomainPatchProperties object itself. + */ + public L2IsolationDomainPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the mtu property: Maximum transmission unit. Default value is 1500. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: Maximum transmission unit. Default value is 1500. + * + * @param mtu the mtu value to set. + * @return the L2IsolationDomainPatchProperties object itself. + */ + public L2IsolationDomainPatchProperties withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the extendedVlan property: Extended VLAN status. + * + * @return the extendedVlan value. + */ + public ExtendedVlan extendedVlan() { + return this.extendedVlan; + } + + /** + * Set the extendedVlan property: Extended VLAN status. + * + * @param extendedVlan the extendedVlan value to set. + * @return the L2IsolationDomainPatchProperties object itself. + */ + public L2IsolationDomainPatchProperties withExtendedVlan(ExtendedVlan extendedVlan) { + this.extendedVlan = extendedVlan; + return this; + } + + /** + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the L2IsolationDomainPatchProperties object itself. + */ + public L2IsolationDomainPatchProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeStringField("extendedVlan", this.extendedVlan == null ? null : this.extendedVlan.toString()); + jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L2IsolationDomainPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L2IsolationDomainPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L2IsolationDomainPatchProperties. + */ + public static L2IsolationDomainPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L2IsolationDomainPatchProperties deserializedL2IsolationDomainPatchProperties + = new L2IsolationDomainPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedL2IsolationDomainPatchProperties.annotation = reader.getString(); + } else if ("mtu".equals(fieldName)) { + deserializedL2IsolationDomainPatchProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("extendedVlan".equals(fieldName)) { + deserializedL2IsolationDomainPatchProperties.extendedVlan + = ExtendedVlan.fromString(reader.getString()); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedL2IsolationDomainPatchProperties.networkToNetworkInterconnectId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedL2IsolationDomainPatchProperties; + }); + } +} 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/models/L2IsolationDomainProperties.java similarity index 61% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainProperties.java index 40cadabd1eb1..df1395da227a 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/models/L2IsolationDomainProperties.java @@ -1,25 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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 java.io.IOException; /** * L2Isolation Domain Properties defines the properties of the resource. */ @Fluent -public final class L2IsolationDomainProperties extends AnnotationResource { +public final class L2IsolationDomainProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * ARM Resource ID of the Network Fabric. */ @@ -35,6 +36,21 @@ public final class L2IsolationDomainProperties extends AnnotationResource { */ private Integer mtu; + /* + * Extended VLAN status, default value is Disabled. + */ + private ExtendedVlan extendedVlan; + + /* + * ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource. + */ + private String networkToNetworkInterconnectId; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -56,6 +72,26 @@ public final class L2IsolationDomainProperties extends AnnotationResource { public L2IsolationDomainProperties() { } + /** + * 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 L2IsolationDomainProperties object itself. + */ + public L2IsolationDomainProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * @@ -116,6 +152,57 @@ public L2IsolationDomainProperties withMtu(Integer mtu) { return this; } + /** + * Get the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @return the extendedVlan value. + */ + public ExtendedVlan extendedVlan() { + return this.extendedVlan; + } + + /** + * Set the extendedVlan property: Extended VLAN status, default value is Disabled. + * + * @param extendedVlan the extendedVlan value to set. + * @return the L2IsolationDomainProperties object itself. + */ + public L2IsolationDomainProperties withExtendedVlan(ExtendedVlan extendedVlan) { + this.extendedVlan = extendedVlan; + return this; + } + + /** + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the networkToNetworkInterconnectId of the L2 + * ISD resource. + * + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the L2IsolationDomainProperties object itself. + */ + public L2IsolationDomainProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -143,41 +230,18 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * {@inheritDoc} - */ - @Override - public L2IsolationDomainProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model L2IsolationDomainProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(L2IsolationDomainProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("networkFabricId", this.networkFabricId); jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeStringField("extendedVlan", this.extendedVlan == null ? null : this.extendedVlan.toString()); + jsonWriter.writeStringField("networkToNetworkInterconnectId", this.networkToNetworkInterconnectId); return jsonWriter.writeEndObject(); } @@ -197,14 +261,20 @@ public static L2IsolationDomainProperties fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedL2IsolationDomainProperties.withAnnotation(reader.getString()); - } else if ("networkFabricId".equals(fieldName)) { + if ("networkFabricId".equals(fieldName)) { deserializedL2IsolationDomainProperties.networkFabricId = reader.getString(); } else if ("vlanId".equals(fieldName)) { deserializedL2IsolationDomainProperties.vlanId = reader.getInt(); + } else if ("annotation".equals(fieldName)) { + deserializedL2IsolationDomainProperties.annotation = reader.getString(); } else if ("mtu".equals(fieldName)) { deserializedL2IsolationDomainProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("extendedVlan".equals(fieldName)) { + deserializedL2IsolationDomainProperties.extendedVlan = ExtendedVlan.fromString(reader.getString()); + } else if ("networkToNetworkInterconnectId".equals(fieldName)) { + deserializedL2IsolationDomainProperties.networkToNetworkInterconnectId = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedL2IsolationDomainProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedL2IsolationDomainProperties.configurationState = ConfigurationState.fromString(reader.getString()); 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 1941c06cbb05..92080bc51395 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface L2IsolationDomains { /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN Context context); /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN L2IsolationDomain getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN void deleteByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,148 +62,130 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * - * Enables isolation domain across the fabric or on specified racks. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. + * @return the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Implements the operation to the underlying resources. - * - * Enables isolation domain across the fabric or on specified racks. + * Displays L2IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. + * @return the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, - String l2IsolationDomainName, UpdateAdministrativeState body, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Validates the configuration of the resources. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. + * @return the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName); + PagedIterable list(); /** - * Validates the configuration of the resources. + * Displays L2IsolationDomains list by subscription GET method. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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. + * @return the response of a L2IsolationDomain list operation as paginated response with {@link PagedIterable}. */ - ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName, - Context context); + PagedIterable list(Context context); /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. + * 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 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 the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName); + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body); /** - * Execute the commit on the resources. - * - * Commits the configuration of the given resources. + * 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 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 the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName, - Context context); + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String l2IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable listByResourceGroup(String resourceGroupName); + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * List L2IsolationDomains by resource group. - * - * Displays L2IsolationDomains list by resource group GET method. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName, + Context context); /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. + * 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 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 list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable list(); + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * List L2IsolationDomains by subscription. - * - * Displays L2IsolationDomains list by subscription GET method. + * 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 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 list of L2 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response. */ - PagedIterable list(Context context); + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName, + Context context); /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param id the resource ID. @@ -223,8 +197,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN L2IsolationDomain getById(String id); /** - * Retrieves details of this L2 Isolation Domain. - * * Implements L2 Isolation Domain GET method. * * @param id the resource ID. @@ -237,8 +209,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param id the resource ID. @@ -249,8 +219,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes the L2 Isolation Domain. - * * Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * * @param id the resource ID. 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 deleted file mode 100644 index 86965bf23ec8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import java.io.IOException; -import java.util.List; - -/** - * List of L2 Isolation Domains. - */ -@Fluent -public final class L2IsolationDomainsListResult implements JsonSerializable { - /* - * Displays list of L2 Isolation Domain resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of L2IsolationDomainsListResult class. - */ - public L2IsolationDomainsListResult() { - } - - /** - * Get the value property: Displays list of L2 Isolation Domain resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Displays list of L2 Isolation Domain resources. - * - * @param value the value value to set. - * @return the L2IsolationDomainsListResult object itself. - */ - public L2IsolationDomainsListResult 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 L2IsolationDomainsListResult object itself. - */ - public L2IsolationDomainsListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L2IsolationDomainsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L2IsolationDomainsListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the L2IsolationDomainsListResult. - */ - public static L2IsolationDomainsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L2IsolationDomainsListResult deserializedL2IsolationDomainsListResult = new L2IsolationDomainsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> L2IsolationDomainInner.fromJson(reader1)); - deserializedL2IsolationDomainsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedL2IsolationDomainsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedL2IsolationDomainsListResult; - }); - } -} 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 index b1f83c39eeca..351cb0d9bb5b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public L3ExportRoutePolicy withExportIpv6RoutePolicyId(String exportIpv6RoutePol return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java new file mode 100644 index 000000000000..6a842ecc4c11 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Array of ARM Resource ID of the RoutePolicies. + */ +@Fluent +public final class L3ExportRoutePolicyPatch implements JsonSerializable { + /* + * ARM Resource ID of the RoutePolicy. + */ + private String exportIpv4RoutePolicyId; + + /* + * ARM Resource ID of the RoutePolicy. + */ + private String exportIpv6RoutePolicyId; + + /** + * Creates an instance of L3ExportRoutePolicyPatch class. + */ + public L3ExportRoutePolicyPatch() { + } + + /** + * 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 L3ExportRoutePolicyPatch object itself. + */ + public L3ExportRoutePolicyPatch 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 L3ExportRoutePolicyPatch object itself. + */ + public L3ExportRoutePolicyPatch withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("exportIpv4RoutePolicyId", this.exportIpv4RoutePolicyId); + jsonWriter.writeStringField("exportIpv6RoutePolicyId", this.exportIpv6RoutePolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3ExportRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3ExportRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L3ExportRoutePolicyPatch. + */ + public static L3ExportRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3ExportRoutePolicyPatch deserializedL3ExportRoutePolicyPatch = new L3ExportRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportIpv4RoutePolicyId".equals(fieldName)) { + deserializedL3ExportRoutePolicyPatch.exportIpv4RoutePolicyId = reader.getString(); + } else if ("exportIpv6RoutePolicyId".equals(fieldName)) { + deserializedL3ExportRoutePolicyPatch.exportIpv6RoutePolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedL3ExportRoutePolicyPatch; + }); + } +} 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 7f080e8687ac..130601cbcd45 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,74 +50,18 @@ public interface L3IsolationDomain { 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 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 redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". - * - * @return the redistributeConnectedSubnets value. - */ - RedistributeConnectedSubnets redistributeConnectedSubnets(); - - /** - * Gets the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @return the redistributeStaticRoutes value. - */ - RedistributeStaticRoutes redistributeStaticRoutes(); - - /** - * Gets the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @return the aggregateRouteConfiguration value. - */ - AggregateRouteConfiguration aggregateRouteConfiguration(); - - /** - * Gets the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * Gets the properties property: The L3 Isolation Domain Properties. * - * @return the connectedSubnetRoutePolicy value. + * @return the properties value. */ - ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy(); + L3IsolationDomainProperties properties(); /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -151,7 +95,7 @@ public interface L3IsolationDomain { * The entirety of the L3IsolationDomain definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -195,29 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the L3IsolationDomain definition allowing to specify networkFabricId. + * The stage of the L3IsolationDomain definition allowing to specify properties. */ - interface WithNetworkFabricId { + interface WithProperties { /** - * Specifies the networkFabricId property: ARM Resource ID of the Network Fabric.. + * Specifies the properties property: The L3 Isolation Domain Properties. * - * @param networkFabricId ARM Resource ID of the Network Fabric. + * @param properties The L3 Isolation Domain Properties. * @return the next definition stage. */ - WithCreate withNetworkFabricId(String networkFabricId); + WithCreate withProperties(L3IsolationDomainProperties properties); } /** * The stage of the L3IsolationDomain 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.WithRedistributeConnectedSubnets, - DefinitionStages.WithRedistributeStaticRoutes, DefinitionStages.WithAggregateRouteConfiguration, - DefinitionStages.WithConnectedSubnetRoutePolicy, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -246,71 +188,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - - /** - * The stage of the L3IsolationDomain definition allowing to specify redistributeConnectedSubnets. - */ - interface WithRedistributeConnectedSubnets { - /** - * Specifies the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False".. - * - * @param redistributeConnectedSubnets Advertise Connected Subnets. Ex: "True" | "False". - * @return the next definition stage. - */ - WithCreate withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets); - } - - /** - * The stage of the L3IsolationDomain definition allowing to specify redistributeStaticRoutes. - */ - interface WithRedistributeStaticRoutes { - /** - * Specifies the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False".. - * - * @param redistributeStaticRoutes Advertise Static Routes. Ex: "True" | "False". - * @return the next definition stage. - */ - WithCreate withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes); - } - - /** - * The stage of the L3IsolationDomain definition allowing to specify aggregateRouteConfiguration. - */ - interface WithAggregateRouteConfiguration { - /** - * Specifies the aggregateRouteConfiguration property: Aggregate 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 connectedSubnetRoutePolicy. - */ - interface WithConnectedSubnetRoutePolicy { - /** - * Specifies the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @param connectedSubnetRoutePolicy Connected Subnet RoutePolicy. - * @return the next definition stage. - */ - WithCreate withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); - } - - /** - * The stage of the L3IsolationDomain 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); - } } /** @@ -323,9 +200,7 @@ interface WithAnnotation { /** * The template for L3IsolationDomain update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithRedistributeConnectedSubnets, - UpdateStages.WithRedistributeStaticRoutes, UpdateStages.WithAggregateRouteConfiguration, - UpdateStages.WithConnectedSubnetRoutePolicy, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -351,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -360,68 +235,16 @@ interface WithTags { } /** - * The stage of the L3IsolationDomain update allowing to specify redistributeConnectedSubnets. - */ - interface WithRedistributeConnectedSubnets { - /** - * Specifies the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False".. - * - * @param redistributeConnectedSubnets Advertise Connected Subnets. Ex: "True" | "False". - * @return the next definition stage. - */ - Update withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets); - } - - /** - * The stage of the L3IsolationDomain update allowing to specify redistributeStaticRoutes. + * The stage of the L3IsolationDomain update allowing to specify properties. */ - interface WithRedistributeStaticRoutes { + interface WithProperties { /** - * Specifies the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False".. + * Specifies the properties property: Resource properties.. * - * @param redistributeStaticRoutes Advertise Static Routes. Ex: "True" | "False". + * @param properties Resource properties. * @return the next definition stage. */ - Update withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes); - } - - /** - * The stage of the L3IsolationDomain update allowing to specify aggregateRouteConfiguration. - */ - interface WithAggregateRouteConfiguration { - /** - * Specifies the aggregateRouteConfiguration property: Aggregate 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 connectedSubnetRoutePolicy. - */ - interface WithConnectedSubnetRoutePolicy { - /** - * Specifies the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @param connectedSubnetRoutePolicy Connected Subnet RoutePolicy. - * @return the next definition stage. - */ - Update withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); - } - - /** - * The stage of the L3IsolationDomain 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); + Update withProperties(L3IsolationDomainPatchProperties properties); } } @@ -441,21 +264,17 @@ interface WithAnnotation { L3IsolationDomain refresh(Context context); /** - * executes enable operation to the underlying resources. - * * Enables racks for this 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param body Request payload. @@ -463,7 +282,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 device updates. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); @@ -472,7 +291,7 @@ 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 the response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); @@ -483,31 +302,27 @@ 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 the response of the action validate configuration. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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 b532a0a74f5e..c0420c8d8369 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainPatchProperties; import java.io.IOException; import java.util.Map; @@ -16,11 +16,16 @@ * The L3 Isolation Domain patch resource definition. */ @Fluent -public final class L3IsolationDomainPatch extends TagsUpdate { +public final class L3IsolationDomainPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Resource properties. */ - private L3IsolationDomainPatchProperties innerProperties; + private L3IsolationDomainPatchProperties properties; /** * Creates an instance of L3IsolationDomainPatch class. @@ -29,161 +34,53 @@ public L3IsolationDomainPatch() { } /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private L3IsolationDomainPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public L3IsolationDomainPatch withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". + * Get the tags property: Resource tags. * - * @return the redistributeConnectedSubnets value. + * @return the tags value. */ - public RedistributeConnectedSubnets redistributeConnectedSubnets() { - return this.innerProperties() == null ? null : this.innerProperties().redistributeConnectedSubnets(); + public Map tags() { + return this.tags; } /** - * Set the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". + * Set the tags property: Resource tags. * - * @param redistributeConnectedSubnets the redistributeConnectedSubnets value to set. + * @param tags the tags value to set. * @return the L3IsolationDomainPatch object itself. */ - public L3IsolationDomainPatch - withRedistributeConnectedSubnets(RedistributeConnectedSubnets redistributeConnectedSubnets) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainPatchProperties(); - } - this.innerProperties().withRedistributeConnectedSubnets(redistributeConnectedSubnets); - return this; - } - - /** - * Get the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @return the redistributeStaticRoutes value. - */ - public RedistributeStaticRoutes redistributeStaticRoutes() { - return this.innerProperties() == null ? null : this.innerProperties().redistributeStaticRoutes(); - } - - /** - * Set the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". - * - * @param redistributeStaticRoutes the redistributeStaticRoutes value to set. - * @return the L3IsolationDomainPatch object itself. - */ - public L3IsolationDomainPatch withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainPatchProperties(); - } - this.innerProperties().withRedistributeStaticRoutes(redistributeStaticRoutes); - return this; - } - - /** - * Get the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @return the aggregateRouteConfiguration value. - */ - public AggregateRouteConfiguration aggregateRouteConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().aggregateRouteConfiguration(); - } - - /** - * Set the aggregateRouteConfiguration property: Aggregate route configurations. - * - * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. - * @return the L3IsolationDomainPatch object itself. - */ - public L3IsolationDomainPatch - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainPatchProperties(); - } - this.innerProperties().withAggregateRouteConfiguration(aggregateRouteConfiguration); - return this; - } - - /** - * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @return the connectedSubnetRoutePolicy value. - */ - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy(); - } - - /** - * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. - * - * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set. - * @return the L3IsolationDomainPatch object itself. - */ - public L3IsolationDomainPatch - withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainPatchProperties(); - } - this.innerProperties().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); + public L3IsolationDomainPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: Resource properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public L3IsolationDomainPatchProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: Resource properties. * - * @param annotation the annotation value to set. + * @param properties the properties value to set. * @return the L3IsolationDomainPatch object itself. */ - public L3IsolationDomainPatch withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainPatchProperties(); - } - this.innerProperties().withAnnotation(annotation); + public L3IsolationDomainPatch withProperties(L3IsolationDomainPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -204,10 +101,9 @@ public static L3IsolationDomainPatch fromJson(JsonReader jsonReader) throws IOEx if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedL3IsolationDomainPatch.withTags(tags); + deserializedL3IsolationDomainPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedL3IsolationDomainPatch.innerProperties - = L3IsolationDomainPatchProperties.fromJson(reader); + deserializedL3IsolationDomainPatch.properties = L3IsolationDomainPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/L3IsolationDomainPatchProperties.java similarity index 63% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchProperties.java index 414036b8b194..2f9fbef9efb4 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/models/L3IsolationDomainPatchProperties.java @@ -1,25 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -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 java.io.IOException; /** * Resource properties. */ @Fluent -public final class L3IsolationDomainPatchProperties extends AnnotationResource { +public final class L3IsolationDomainPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Advertise Connected Subnets. Ex: "True" | "False". */ @@ -33,12 +34,22 @@ public final class L3IsolationDomainPatchProperties extends AnnotationResource { /* * Aggregate route configurations. */ - private AggregateRouteConfiguration aggregateRouteConfiguration; + private AggregateRoutePatchConfiguration aggregateRouteConfiguration; /* * Connected Subnet RoutePolicy */ - private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + private ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy; + + /* + * Static Route - route policy. + */ + private StaticRouteRoutePolicyPatch staticRouteRoutePolicy; + + /* + * Virtual Routing and Forwarding (VRF) Limit configuration. + */ + private RoutePrefixLimitPatchProperties routePrefixLimit; /** * Creates an instance of L3IsolationDomainPatchProperties class. @@ -46,6 +57,26 @@ public final class L3IsolationDomainPatchProperties extends AnnotationResource { public L3IsolationDomainPatchProperties() { } + /** + * 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 L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". * @@ -93,7 +124,7 @@ public RedistributeStaticRoutes redistributeStaticRoutes() { * * @return the aggregateRouteConfiguration value. */ - public AggregateRouteConfiguration aggregateRouteConfiguration() { + public AggregateRoutePatchConfiguration aggregateRouteConfiguration() { return this.aggregateRouteConfiguration; } @@ -104,7 +135,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { * @return the L3IsolationDomainPatchProperties object itself. */ public L3IsolationDomainPatchProperties - withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration) { + withAggregateRouteConfiguration(AggregateRoutePatchConfiguration aggregateRouteConfiguration) { this.aggregateRouteConfiguration = aggregateRouteConfiguration; return this; } @@ -114,7 +145,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { * * @return the connectedSubnetRoutePolicy value. */ - public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy() { return this.connectedSubnetRoutePolicy; } @@ -125,33 +156,50 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { * @return the L3IsolationDomainPatchProperties object itself. */ public L3IsolationDomainPatchProperties - withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicyPatch connectedSubnetRoutePolicy) { this.connectedSubnetRoutePolicy = connectedSubnetRoutePolicy; return this; } /** - * {@inheritDoc} + * Get the staticRouteRoutePolicy property: Static Route - route policy. + * + * @return the staticRouteRoutePolicy value. */ - @Override - public L3IsolationDomainPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public StaticRouteRoutePolicyPatch staticRouteRoutePolicy() { + return this.staticRouteRoutePolicy; + } + + /** + * Set the staticRouteRoutePolicy property: Static Route - route policy. + * + * @param staticRouteRoutePolicy the staticRouteRoutePolicy value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties + withStaticRouteRoutePolicy(StaticRouteRoutePolicyPatch staticRouteRoutePolicy) { + this.staticRouteRoutePolicy = staticRouteRoutePolicy; return this; } /** - * Validates the instance. + * Get the routePrefixLimit property: Virtual Routing and Forwarding (VRF) Limit configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the routePrefixLimit value. */ - @Override - public void validate() { - if (aggregateRouteConfiguration() != null) { - aggregateRouteConfiguration().validate(); - } - if (connectedSubnetRoutePolicy() != null) { - connectedSubnetRoutePolicy().validate(); - } + public RoutePrefixLimitPatchProperties routePrefixLimit() { + return this.routePrefixLimit; + } + + /** + * Set the routePrefixLimit property: Virtual Routing and Forwarding (VRF) Limit configuration. + * + * @param routePrefixLimit the routePrefixLimit value to set. + * @return the L3IsolationDomainPatchProperties object itself. + */ + public L3IsolationDomainPatchProperties withRoutePrefixLimit(RoutePrefixLimitPatchProperties routePrefixLimit) { + this.routePrefixLimit = routePrefixLimit; + return this; } /** @@ -160,13 +208,15 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("redistributeConnectedSubnets", this.redistributeConnectedSubnets == null ? null : this.redistributeConnectedSubnets.toString()); jsonWriter.writeStringField("redistributeStaticRoutes", this.redistributeStaticRoutes == null ? null : this.redistributeStaticRoutes.toString()); jsonWriter.writeJsonField("aggregateRouteConfiguration", this.aggregateRouteConfiguration); jsonWriter.writeJsonField("connectedSubnetRoutePolicy", this.connectedSubnetRoutePolicy); + jsonWriter.writeJsonField("staticRouteRoutePolicy", this.staticRouteRoutePolicy); + jsonWriter.writeJsonField("routePrefixLimit", this.routePrefixLimit); return jsonWriter.writeEndObject(); } @@ -187,7 +237,7 @@ public static L3IsolationDomainPatchProperties fromJson(JsonReader jsonReader) t reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedL3IsolationDomainPatchProperties.withAnnotation(reader.getString()); + deserializedL3IsolationDomainPatchProperties.annotation = reader.getString(); } else if ("redistributeConnectedSubnets".equals(fieldName)) { deserializedL3IsolationDomainPatchProperties.redistributeConnectedSubnets = RedistributeConnectedSubnets.fromString(reader.getString()); @@ -196,10 +246,16 @@ public static L3IsolationDomainPatchProperties fromJson(JsonReader jsonReader) t = RedistributeStaticRoutes.fromString(reader.getString()); } else if ("aggregateRouteConfiguration".equals(fieldName)) { deserializedL3IsolationDomainPatchProperties.aggregateRouteConfiguration - = AggregateRouteConfiguration.fromJson(reader); + = AggregateRoutePatchConfiguration.fromJson(reader); } else if ("connectedSubnetRoutePolicy".equals(fieldName)) { deserializedL3IsolationDomainPatchProperties.connectedSubnetRoutePolicy - = ConnectedSubnetRoutePolicy.fromJson(reader); + = ConnectedSubnetRoutePolicyPatch.fromJson(reader); + } else if ("staticRouteRoutePolicy".equals(fieldName)) { + deserializedL3IsolationDomainPatchProperties.staticRouteRoutePolicy + = StaticRouteRoutePolicyPatch.fromJson(reader); + } else if ("routePrefixLimit".equals(fieldName)) { + deserializedL3IsolationDomainPatchProperties.routePrefixLimit + = RoutePrefixLimitPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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 deleted file mode 100644 index 0946501ddfc1..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * L3 Isolation Domain Patch Properties defines the patchable properties of the resource. - */ -@Fluent -public class L3IsolationDomainPatchableProperties implements JsonSerializable { - /* - * Advertise Connected Subnets. Ex: "True" | "False". - */ - private RedistributeConnectedSubnets redistributeConnectedSubnets; - - /* - * Advertise Static Routes. Ex: "True" | "False". - */ - private RedistributeStaticRoutes redistributeStaticRoutes; - - /* - * Aggregate route configurations. - */ - private AggregateRouteConfiguration aggregateRouteConfiguration; - - /* - * Connected Subnet RoutePolicy - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("redistributeConnectedSubnets", - this.redistributeConnectedSubnets == null ? null : this.redistributeConnectedSubnets.toString()); - jsonWriter.writeStringField("redistributeStaticRoutes", - this.redistributeStaticRoutes == null ? null : this.redistributeStaticRoutes.toString()); - jsonWriter.writeJsonField("aggregateRouteConfiguration", this.aggregateRouteConfiguration); - jsonWriter.writeJsonField("connectedSubnetRoutePolicy", this.connectedSubnetRoutePolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L3IsolationDomainPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L3IsolationDomainPatchableProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the L3IsolationDomainPatchableProperties. - */ - public static L3IsolationDomainPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L3IsolationDomainPatchableProperties deserializedL3IsolationDomainPatchableProperties - = new L3IsolationDomainPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("redistributeConnectedSubnets".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.redistributeConnectedSubnets - = RedistributeConnectedSubnets.fromString(reader.getString()); - } else if ("redistributeStaticRoutes".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.redistributeStaticRoutes - = RedistributeStaticRoutes.fromString(reader.getString()); - } else if ("aggregateRouteConfiguration".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.aggregateRouteConfiguration - = AggregateRouteConfiguration.fromJson(reader); - } else if ("connectedSubnetRoutePolicy".equals(fieldName)) { - deserializedL3IsolationDomainPatchableProperties.connectedSubnetRoutePolicy - = ConnectedSubnetRoutePolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedL3IsolationDomainPatchableProperties; - }); - } -} 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/models/L3IsolationDomainProperties.java similarity index 66% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainProperties.java index d21c9f95ff50..288d5c4ba769 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/models/L3IsolationDomainProperties.java @@ -1,120 +1,110 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.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 java.io.IOException; /** * L3 Isolation Domain Properties defines the properties of the resource. */ @Fluent -public final class L3IsolationDomainProperties extends AnnotationResource { +public final class L3IsolationDomainProperties implements JsonSerializable { /* - * ARM Resource ID of the Network Fabric. + * Switch configuration description. */ - private String networkFabricId; + private String annotation; /* - * Configuration state of the resource. + * Advertise Connected Subnets. Ex: "True" | "False". */ - private ConfigurationState configurationState; + private RedistributeConnectedSubnets redistributeConnectedSubnets; /* - * Provisioning state of the resource. + * Advertise Static Routes. Ex: "True" | "False". */ - private ProvisioningState provisioningState; + private RedistributeStaticRoutes redistributeStaticRoutes; /* - * Administrative state of the resource. + * Aggregate route configurations. */ - private AdministrativeState administrativeState; + private AggregateRouteConfiguration aggregateRouteConfiguration; /* - * Advertise Connected Subnets. Ex: "True" | "False". + * Connected Subnet RoutePolicy */ - private RedistributeConnectedSubnets redistributeConnectedSubnets; + private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; /* - * Advertise Static Routes. Ex: "True" | "False". + * ARM Resource ID of the Network Fabric. */ - private RedistributeStaticRoutes redistributeStaticRoutes; + private String networkFabricId; /* - * Aggregate route configurations. + * Static Route - route policy. */ - private AggregateRouteConfiguration aggregateRouteConfiguration; + private StaticRouteRoutePolicy staticRouteRoutePolicy; /* - * Connected Subnet RoutePolicy + * Unique Route Distinguisher configuration */ - private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + private L3UniqueRouteDistinguisherProperties uniqueRdConfiguration; - /** - * Creates an instance of L3IsolationDomainProperties class. + /* + * VRF Limit configuration. */ - public L3IsolationDomainProperties() { - } + private RoutePrefixLimitProperties routePrefixLimit; - /** - * Get the networkFabricId property: ARM Resource ID of the Network Fabric. - * - * @return the networkFabricId value. + /* + * Details of the last operation performed on the resource */ - public String networkFabricId() { - return this.networkFabricId; - } + private LastOperationProperties lastOperation; - /** - * Set the networkFabricId property: ARM Resource ID of the Network Fabric. - * - * @param networkFabricId the networkFabricId value to set. - * @return the L3IsolationDomainProperties object itself. + /* + * Configuration state of the resource. */ - public L3IsolationDomainProperties withNetworkFabricId(String networkFabricId) { - this.networkFabricId = networkFabricId; - return this; - } + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of L3IsolationDomainProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public L3IsolationDomainProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the L3IsolationDomainProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public L3IsolationDomainProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -201,35 +191,121 @@ public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { } /** - * {@inheritDoc} + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. + * + * @return the networkFabricId value. */ - @Override - public L3IsolationDomainProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + 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 L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withNetworkFabricId(String networkFabricId) { + this.networkFabricId = networkFabricId; return this; } /** - * Validates the instance. + * Get the staticRouteRoutePolicy property: Static Route - route policy. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the staticRouteRoutePolicy value. */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model L3IsolationDomainProperties")); - } - if (aggregateRouteConfiguration() != null) { - aggregateRouteConfiguration().validate(); - } - if (connectedSubnetRoutePolicy() != null) { - connectedSubnetRoutePolicy().validate(); - } + public StaticRouteRoutePolicy staticRouteRoutePolicy() { + return this.staticRouteRoutePolicy; } - private static final ClientLogger LOGGER = new ClientLogger(L3IsolationDomainProperties.class); + /** + * Set the staticRouteRoutePolicy property: Static Route - route policy. + * + * @param staticRouteRoutePolicy the staticRouteRoutePolicy value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withStaticRouteRoutePolicy(StaticRouteRoutePolicy staticRouteRoutePolicy) { + this.staticRouteRoutePolicy = staticRouteRoutePolicy; + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public L3UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.uniqueRdConfiguration; + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties + withUniqueRdConfiguration(L3UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + this.uniqueRdConfiguration = uniqueRdConfiguration; + return this; + } + + /** + * Get the routePrefixLimit property: VRF Limit configuration. + * + * @return the routePrefixLimit value. + */ + public RoutePrefixLimitProperties routePrefixLimit() { + return this.routePrefixLimit; + } + + /** + * Set the routePrefixLimit property: VRF Limit configuration. + * + * @param routePrefixLimit the routePrefixLimit value to set. + * @return the L3IsolationDomainProperties object itself. + */ + public L3IsolationDomainProperties withRoutePrefixLimit(RoutePrefixLimitProperties routePrefixLimit) { + this.routePrefixLimit = routePrefixLimit; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * 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; + } /** * {@inheritDoc} @@ -237,14 +313,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("networkFabricId", this.networkFabricId); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("redistributeConnectedSubnets", this.redistributeConnectedSubnets == null ? null : this.redistributeConnectedSubnets.toString()); jsonWriter.writeStringField("redistributeStaticRoutes", this.redistributeStaticRoutes == null ? null : this.redistributeStaticRoutes.toString()); jsonWriter.writeJsonField("aggregateRouteConfiguration", this.aggregateRouteConfiguration); jsonWriter.writeJsonField("connectedSubnetRoutePolicy", this.connectedSubnetRoutePolicy); + jsonWriter.writeJsonField("staticRouteRoutePolicy", this.staticRouteRoutePolicy); + jsonWriter.writeJsonField("uniqueRdConfiguration", this.uniqueRdConfiguration); + jsonWriter.writeJsonField("routePrefixLimit", this.routePrefixLimit); return jsonWriter.writeEndObject(); } @@ -264,19 +343,10 @@ public static L3IsolationDomainProperties fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedL3IsolationDomainProperties.withAnnotation(reader.getString()); - } else if ("networkFabricId".equals(fieldName)) { + if ("networkFabricId".equals(fieldName)) { deserializedL3IsolationDomainProperties.networkFabricId = reader.getString(); - } else if ("configurationState".equals(fieldName)) { - deserializedL3IsolationDomainProperties.configurationState - = ConfigurationState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedL3IsolationDomainProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("administrativeState".equals(fieldName)) { - deserializedL3IsolationDomainProperties.administrativeState - = AdministrativeState.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedL3IsolationDomainProperties.annotation = reader.getString(); } else if ("redistributeConnectedSubnets".equals(fieldName)) { deserializedL3IsolationDomainProperties.redistributeConnectedSubnets = RedistributeConnectedSubnets.fromString(reader.getString()); @@ -289,6 +359,26 @@ public static L3IsolationDomainProperties fromJson(JsonReader jsonReader) throws } else if ("connectedSubnetRoutePolicy".equals(fieldName)) { deserializedL3IsolationDomainProperties.connectedSubnetRoutePolicy = ConnectedSubnetRoutePolicy.fromJson(reader); + } else if ("staticRouteRoutePolicy".equals(fieldName)) { + deserializedL3IsolationDomainProperties.staticRouteRoutePolicy + = StaticRouteRoutePolicy.fromJson(reader); + } else if ("uniqueRdConfiguration".equals(fieldName)) { + deserializedL3IsolationDomainProperties.uniqueRdConfiguration + = L3UniqueRouteDistinguisherProperties.fromJson(reader); + } else if ("routePrefixLimit".equals(fieldName)) { + deserializedL3IsolationDomainProperties.routePrefixLimit + = RoutePrefixLimitProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedL3IsolationDomainProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedL3IsolationDomainProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedL3IsolationDomainProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedL3IsolationDomainProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); } else { reader.skipChildren(); } 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 18ecbc36f417..cd7bcb7f60a5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface L3IsolationDomains { /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN Context context); /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN L3IsolationDomain getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupN void deleteByResourceGroup(String resourceGroupName, String l3IsolationDomainName); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupN void delete(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List L3IsolationDomains by resource group. - * * Displays L3IsolationDomains list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List L3IsolationDomains by subscription. - * * Displays L3IsolationDomains 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 L3 Isolation Domains as paginated response with {@link PagedIterable}. + * @return the response of a L3IsolationDomain list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** - * executes enable operation to the underlying resources. - * * Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,7 +128,7 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); @@ -161,7 +141,7 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l3IsolationDomainName); @@ -174,14 +154,12 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l3IsolationDomainName, 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. @@ -189,13 +167,11 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * 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. @@ -204,14 +180,12 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param id the resource ID. @@ -223,8 +197,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN L3IsolationDomain getById(String id); /** - * Gets a L3 Isolation Domain. - * * Retrieves details of this L3 Isolation Domain. * * @param id the resource ID. @@ -237,8 +209,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param id the resource ID. @@ -249,8 +219,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes a L3 Isolation Domain. - * * Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. * * @param id the resource ID. 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 deleted file mode 100644 index 395e2da83e65..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import java.io.IOException; -import java.util.List; - -/** - * List of L3 Isolation Domains. - */ -@Fluent -public final class L3IsolationDomainsListResult implements JsonSerializable { - /* - * List of L3 Isolation Domain resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of L3IsolationDomainsListResult class. - */ - public L3IsolationDomainsListResult() { - } - - /** - * Get the value property: List of L3 Isolation Domain resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of L3 Isolation Domain resources. - * - * @param value the value value to set. - * @return the L3IsolationDomainsListResult object itself. - */ - public L3IsolationDomainsListResult 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 L3IsolationDomainsListResult object itself. - */ - public L3IsolationDomainsListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L3IsolationDomainsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L3IsolationDomainsListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the L3IsolationDomainsListResult. - */ - public static L3IsolationDomainsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L3IsolationDomainsListResult deserializedL3IsolationDomainsListResult = new L3IsolationDomainsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> L3IsolationDomainInner.fromJson(reader1)); - deserializedL3IsolationDomainsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedL3IsolationDomainsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedL3IsolationDomainsListResult; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java deleted file mode 100644 index a092489da55e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peering optionA properties. - */ -@Fluent -public class L3OptionAProperties implements JsonSerializable { - /* - * MTU to use for option A peering. - */ - private Integer mtu; - - /* - * Vlan identifier. Example : 501 - */ - private Integer vlanId; - - /* - * Fabric ASN number. Example 65001 - */ - private Long fabricAsn; - - /* - * Peer ASN number.Example : 28 - */ - private Long peerAsn; - - /* - * BFD configuration properties - */ - private BfdConfiguration bfdConfiguration; - - /* - * Ingress Acl. ARM resource ID of Access Control Lists. - */ - private String ingressAclId; - - /* - * Egress Acl. ARM resource ID of Access Control Lists. - */ - private String egressAclId; - - /** - * Creates an instance of L3OptionAProperties class. - */ - public L3OptionAProperties() { - } - - /** - * 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 L3OptionAProperties object itself. - */ - public L3OptionAProperties 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 L3OptionAProperties object itself. - */ - public L3OptionAProperties 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; - } - - /** - * Set the fabricAsn property: Fabric ASN number. Example 65001. - * - * @param fabricAsn the fabricAsn value to set. - * @return the L3OptionAProperties object itself. - */ - L3OptionAProperties withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; - return this; - } - - /** - * 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 L3OptionAProperties object itself. - */ - public L3OptionAProperties 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 L3OptionAProperties object itself. - */ - public L3OptionAProperties 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 L3OptionAProperties object itself. - */ - public L3OptionAProperties 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 L3OptionAProperties object itself. - */ - public L3OptionAProperties withEgressAclId(String egressAclId) { - this.egressAclId = egressAclId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); - jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); - jsonWriter.writeStringField("ingressAclId", this.ingressAclId); - jsonWriter.writeStringField("egressAclId", this.egressAclId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of L3OptionAProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of L3OptionAProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the L3OptionAProperties. - */ - public static L3OptionAProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - L3OptionAProperties deserializedL3OptionAProperties = new L3OptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedL3OptionAProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("vlanId".equals(fieldName)) { - deserializedL3OptionAProperties.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("fabricASN".equals(fieldName)) { - deserializedL3OptionAProperties.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("peerASN".equals(fieldName)) { - deserializedL3OptionAProperties.peerAsn = reader.getNullable(JsonReader::getLong); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedL3OptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); - } else if ("ingressAclId".equals(fieldName)) { - deserializedL3OptionAProperties.ingressAclId = reader.getString(); - } else if ("egressAclId".equals(fieldName)) { - deserializedL3OptionAProperties.egressAclId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedL3OptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java new file mode 100644 index 000000000000..78f9f2731369 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Option B configuration. + */ +@Fluent +public final class L3OptionBPatchProperties implements JsonSerializable { + /* + * RouteTargets to be applied. This is used for the backward compatibility. + */ + private List importRouteTargets; + + /* + * RouteTargets to be applied. This is used for the backward compatibility. + */ + private List exportRouteTargets; + + /* + * RouteTargets to be applied. + */ + private RouteTargetPatchInformation routeTargets; + + /** + * Creates an instance of L3OptionBPatchProperties class. + */ + public L3OptionBPatchProperties() { + } + + /** + * 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 L3OptionBPatchProperties object itself. + */ + public L3OptionBPatchProperties 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 L3OptionBPatchProperties object itself. + */ + public L3OptionBPatchProperties withExportRouteTargets(List exportRouteTargets) { + this.exportRouteTargets = exportRouteTargets; + return this; + } + + /** + * Get the routeTargets property: RouteTargets to be applied. + * + * @return the routeTargets value. + */ + public RouteTargetPatchInformation routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: RouteTargets to be applied. + * + * @param routeTargets the routeTargets value to set. + * @return the L3OptionBPatchProperties object itself. + */ + public L3OptionBPatchProperties withRouteTargets(RouteTargetPatchInformation routeTargets) { + this.routeTargets = routeTargets; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("importRouteTargets", this.importRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportRouteTargets", this.exportRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("routeTargets", this.routeTargets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3OptionBPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3OptionBPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L3OptionBPatchProperties. + */ + public static L3OptionBPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3OptionBPatchProperties deserializedL3OptionBPatchProperties = new L3OptionBPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importRouteTargets".equals(fieldName)) { + List importRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedL3OptionBPatchProperties.importRouteTargets = importRouteTargets; + } else if ("exportRouteTargets".equals(fieldName)) { + List exportRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedL3OptionBPatchProperties.exportRouteTargets = exportRouteTargets; + } else if ("routeTargets".equals(fieldName)) { + deserializedL3OptionBPatchProperties.routeTargets = RouteTargetPatchInformation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedL3OptionBPatchProperties; + }); + } +} 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 index fe5f57f0fe4e..f671d692a03a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,17 +98,6 @@ public L3OptionBProperties withRouteTargets(RouteTargetInformation routeTargets) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routeTargets() != null) { - routeTargets().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java new file mode 100644 index 000000000000..92fce4edd79b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Unique Route Distinguisher properties. + */ +@Immutable +public final class L3UniqueRouteDistinguisherProperties + implements JsonSerializable { + /* + * List of Unique Route Distinguisher addresses. + */ + private List uniqueRds; + + /** + * Creates an instance of L3UniqueRouteDistinguisherProperties class. + */ + public L3UniqueRouteDistinguisherProperties() { + } + + /** + * Get the uniqueRds property: List of Unique Route Distinguisher addresses. + * + * @return the uniqueRds value. + */ + public List uniqueRds() { + return this.uniqueRds; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of L3UniqueRouteDistinguisherProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of L3UniqueRouteDistinguisherProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the L3UniqueRouteDistinguisherProperties. + */ + public static L3UniqueRouteDistinguisherProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + L3UniqueRouteDistinguisherProperties deserializedL3UniqueRouteDistinguisherProperties + = new L3UniqueRouteDistinguisherProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uniqueRds".equals(fieldName)) { + List uniqueRds = reader.readArray(reader1 -> reader1.getString()); + deserializedL3UniqueRouteDistinguisherProperties.uniqueRds = uniqueRds; + } else { + reader.skipChildren(); + } + } + + return deserializedL3UniqueRouteDistinguisherProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java new file mode 100644 index 000000000000..6f19597a24c5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Details of the last operations performed on the resource. + */ +@Immutable +public final class LastOperationProperties implements JsonSerializable { + /* + * Details status of the last operation performed on the resource. + */ + private String details; + + /** + * Creates an instance of LastOperationProperties class. + */ + private LastOperationProperties() { + } + + /** + * Get the details property: Details status of the last operation performed on the resource. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LastOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LastOperationProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LastOperationProperties. + */ + public static LastOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LastOperationProperties deserializedLastOperationProperties = new LastOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("details".equals(fieldName)) { + deserializedLastOperationProperties.details = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLastOperationProperties; + }); + } +} 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 7db697b7a766..b18339df7c85 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public Layer2Configuration withInterfaces(List interfaces) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java new file mode 100644 index 000000000000..413c049e1885 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Common properties for Layer2 Configuration. + */ +@Fluent +public final class Layer2ConfigurationPatch implements JsonSerializable { + /* + * MTU of the packets between PE & CE. + */ + private Integer mtu; + + /* + * List of network device interfaces resource IDs. + */ + private List interfaces; + + /** + * Creates an instance of Layer2ConfigurationPatch class. + */ + public Layer2ConfigurationPatch() { + } + + /** + * Get the mtu property: MTU of the packets between PE & CE. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: MTU of the packets between PE & CE. + * + * @param mtu the mtu value to set. + * @return the Layer2ConfigurationPatch object itself. + */ + public Layer2ConfigurationPatch withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the interfaces property: List of network device interfaces resource IDs. + * + * @return the interfaces value. + */ + 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 Layer2ConfigurationPatch object itself. + */ + public Layer2ConfigurationPatch withInterfaces(List interfaces) { + this.interfaces = interfaces; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeArrayField("interfaces", this.interfaces, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Layer2ConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Layer2ConfigurationPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the Layer2ConfigurationPatch. + */ + public static Layer2ConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Layer2ConfigurationPatch deserializedLayer2ConfigurationPatch = new Layer2ConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mtu".equals(fieldName)) { + deserializedLayer2ConfigurationPatch.mtu = reader.getNullable(JsonReader::getInt); + } else if ("interfaces".equals(fieldName)) { + List interfaces = reader.readArray(reader1 -> reader1.getString()); + deserializedLayer2ConfigurationPatch.interfaces = interfaces; + } else { + reader.skipChildren(); + } + } + + return deserializedLayer2ConfigurationPatch; + }); + } +} 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 deleted file mode 100644 index 06533f4f0ad1..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Layer 3 primary and secondary IP Address prefixes. - */ -@Fluent -public class Layer3IpPrefixProperties implements JsonSerializable { - /* - * IPv4 Address Prefix. - */ - private String primaryIpv4Prefix; - - /* - * IPv6 Address Prefix. - */ - private String primaryIpv6Prefix; - - /* - * Secondary IPv4 Address Prefix. - */ - private String secondaryIpv4Prefix; - - /* - * Secondary IPv6 Address Prefix. - */ - private String secondaryIpv6Prefix; - - /** - * Creates an instance of Layer3IpPrefixProperties class. - */ - public Layer3IpPrefixProperties() { - } - - /** - * 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 Layer3IpPrefixProperties object itself. - */ - public Layer3IpPrefixProperties 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 Layer3IpPrefixProperties object itself. - */ - public Layer3IpPrefixProperties 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 Layer3IpPrefixProperties object itself. - */ - public Layer3IpPrefixProperties 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 Layer3IpPrefixProperties object itself. - */ - public Layer3IpPrefixProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - this.secondaryIpv6Prefix = secondaryIpv6Prefix; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); - jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); - jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Layer3IpPrefixProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Layer3IpPrefixProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the Layer3IpPrefixProperties. - */ - public static Layer3IpPrefixProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Layer3IpPrefixProperties deserializedLayer3IpPrefixProperties = new Layer3IpPrefixProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedLayer3IpPrefixProperties.primaryIpv4Prefix = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedLayer3IpPrefixProperties.primaryIpv6Prefix = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedLayer3IpPrefixProperties.secondaryIpv4Prefix = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedLayer3IpPrefixProperties.secondaryIpv6Prefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLayer3IpPrefixProperties; - }); - } -} 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 index f3005308a67f..5aa2dba1d77d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class Layer4Protocol extends ExpandableStringEnum { /** - * Static value TCP for Layer4Protocol. + * TCP(Transmission Control Protocol) Protocol. */ public static final Layer4Protocol TCP = fromString("TCP"); /** - * Static value UDP for Layer4Protocol. + * UDP(User Datagram Protocol) Protocol. */ public static final Layer4Protocol UDP = fromString("UDP"); + /** + * SCTP(Streaming Control Transmission Protocol) Protocol. + */ + public static final Layer4Protocol SCTP = fromString("SCTP"); + /** * Creates a new instance of Layer4Protocol value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java new file mode 100644 index 000000000000..0c27bde59e85 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Lock Configuration State. + */ +public final class LockConfigurationState extends ExpandableStringEnum { + /** + * LockConfigurationState Enabled. + */ + public static final LockConfigurationState ENABLED = fromString("Enabled"); + + /** + * LockConfigurationState Disabled. + */ + public static final LockConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LockConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LockConfigurationState() { + } + + /** + * Creates or finds a LockConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LockConfigurationState. + */ + public static LockConfigurationState fromString(String name) { + return fromString(name, LockConfigurationState.class); + } + + /** + * Gets known LockConfigurationState values. + * + * @return known LockConfigurationState values. + */ + public static Collection values() { + return values(LockConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java index 655cd71d8fa7..f6d5c0ec2b3a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -72,14 +72,6 @@ public ManagedResourceGroupConfiguration withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java new file mode 100644 index 000000000000..a799141b93e9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Managed service identity (system assigned and/or user assigned identities). + */ +@Fluent +public final class ManagedServiceIdentity implements JsonSerializable { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + private String principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + private String tenantId; + + /* + * The type of managed identity assigned to this resource. + */ + private ManagedServiceIdentityType type; + + /* + * The identities assigned to this resource by the user. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentity class. + */ + public ManagedServiceIdentity() { + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of managed identity assigned to this resource. + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServiceIdentity. + */ + public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedManagedServiceIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedServiceIdentity.tenantId = reader.getString(); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentity; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java new file mode 100644 index 000000000000..ecaeeccaf725 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The managed service identities assigned to this resource. + */ +@Fluent +public final class ManagedServiceIdentityPatch implements JsonSerializable { + /* + * The type of managed identity assigned to this resource. + */ + private ManagedServiceIdentityType type; + + /* + * The identities assigned to this resource by the user. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentityPatch class. + */ + public ManagedServiceIdentityPatch() { + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type of managed identity assigned to this resource. + * + * @param type the type value to set. + * @return the ManagedServiceIdentityPatch object itself. + */ + public ManagedServiceIdentityPatch withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentityPatch object itself. + */ + public ManagedServiceIdentityPatch + withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentityPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentityPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedServiceIdentityPatch. + */ + public static ManagedServiceIdentityPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentityPatch deserializedManagedServiceIdentityPatch = new ManagedServiceIdentityPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentityPatch.type + = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentityPatch.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentityPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java new file mode 100644 index 000000000000..74823d0f0f68 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of managed identity. + */ +public final class ManagedServiceIdentitySelectorType extends ExpandableStringEnum { + /** + * System Assigned Identity. + */ + public static final ManagedServiceIdentitySelectorType SYSTEM_ASSIGNED_IDENTITY + = fromString("SystemAssignedIdentity"); + + /** + * User Assigned Identity. + */ + public static final ManagedServiceIdentitySelectorType USER_ASSIGNED_IDENTITY = fromString("UserAssignedIdentity"); + + /** + * Creates a new instance of ManagedServiceIdentitySelectorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentitySelectorType() { + } + + /** + * Creates or finds a ManagedServiceIdentitySelectorType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentitySelectorType. + */ + public static ManagedServiceIdentitySelectorType fromString(String name) { + return fromString(name, ManagedServiceIdentitySelectorType.class); + } + + /** + * Gets known ManagedServiceIdentitySelectorType values. + * + * @return known ManagedServiceIdentitySelectorType values. + */ + public static Collection values() { + return values(ManagedServiceIdentitySelectorType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java new file mode 100644 index 000000000000..62198fba9e65 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** + * No managed identity. + */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** + * System assigned managed identity. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * User assigned managed identity. + */ + public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * System and user assigned managed identity. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned,UserAssigned"); + + /** + * Creates a new instance of ManagedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentityType() { + } + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java index a123f86a8b7c..17556daeae6e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,30 +75,6 @@ public VpnConfigurationProperties workloadVpnConfiguration() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (infrastructureVpnConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property infrastructureVpnConfiguration in model ManagementNetworkConfigurationProperties")); - } else { - infrastructureVpnConfiguration().validate(); - } - if (workloadVpnConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property workloadVpnConfiguration in model ManagementNetworkConfigurationProperties")); - } else { - workloadVpnConfiguration().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagementNetworkConfigurationProperties.class); - /** * {@inheritDoc} */ 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/ManagementNetworkPatchConfiguration.java similarity index 62% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkPatchConfiguration.java index 5532afb83f3b..2767abc4a7bf 100644 --- 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/ManagementNetworkPatchConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -15,8 +15,8 @@ * Configuration to be used to setup the management network. */ @Fluent -public final class ManagementNetworkConfigurationPatchableProperties - implements JsonSerializable { +public final class ManagementNetworkPatchConfiguration + implements JsonSerializable { /* * VPN Configuration properties. */ @@ -28,9 +28,9 @@ public final class ManagementNetworkConfigurationPatchableProperties private VpnConfigurationPatchableProperties workloadVpnConfiguration; /** - * Creates an instance of ManagementNetworkConfigurationPatchableProperties class. + * Creates an instance of ManagementNetworkPatchConfiguration class. */ - public ManagementNetworkConfigurationPatchableProperties() { + public ManagementNetworkPatchConfiguration() { } /** @@ -46,9 +46,9 @@ public VpnConfigurationPatchableProperties infrastructureVpnConfiguration() { * Set the infrastructureVpnConfiguration property: VPN Configuration properties. * * @param infrastructureVpnConfiguration the infrastructureVpnConfiguration value to set. - * @return the ManagementNetworkConfigurationPatchableProperties object itself. + * @return the ManagementNetworkPatchConfiguration object itself. */ - public ManagementNetworkConfigurationPatchableProperties + public ManagementNetworkPatchConfiguration withInfrastructureVpnConfiguration(VpnConfigurationPatchableProperties infrastructureVpnConfiguration) { this.infrastructureVpnConfiguration = infrastructureVpnConfiguration; return this; @@ -67,28 +67,14 @@ public VpnConfigurationPatchableProperties workloadVpnConfiguration() { * Set the workloadVpnConfiguration property: VPN Configuration properties. * * @param workloadVpnConfiguration the workloadVpnConfiguration value to set. - * @return the ManagementNetworkConfigurationPatchableProperties object itself. + * @return the ManagementNetworkPatchConfiguration object itself. */ - public ManagementNetworkConfigurationPatchableProperties + public ManagementNetworkPatchConfiguration 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(); - } - } - /** * {@inheritDoc} */ @@ -101,33 +87,33 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ManagementNetworkConfigurationPatchableProperties from the JsonReader. + * Reads an instance of ManagementNetworkPatchConfiguration from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ManagementNetworkConfigurationPatchableProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagementNetworkConfigurationPatchableProperties. + * @return An instance of ManagementNetworkPatchConfiguration if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagementNetworkPatchConfiguration. */ - public static ManagementNetworkConfigurationPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static ManagementNetworkPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ManagementNetworkConfigurationPatchableProperties deserializedManagementNetworkConfigurationPatchableProperties - = new ManagementNetworkConfigurationPatchableProperties(); + ManagementNetworkPatchConfiguration deserializedManagementNetworkPatchConfiguration + = new ManagementNetworkPatchConfiguration(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("infrastructureVpnConfiguration".equals(fieldName)) { - deserializedManagementNetworkConfigurationPatchableProperties.infrastructureVpnConfiguration + deserializedManagementNetworkPatchConfiguration.infrastructureVpnConfiguration = VpnConfigurationPatchableProperties.fromJson(reader); } else if ("workloadVpnConfiguration".equals(fieldName)) { - deserializedManagementNetworkConfigurationPatchableProperties.workloadVpnConfiguration + deserializedManagementNetworkPatchConfiguration.workloadVpnConfiguration = VpnConfigurationPatchableProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedManagementNetworkConfigurationPatchableProperties; + return deserializedManagementNetworkPatchConfiguration; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java new file mode 100644 index 000000000000..d74f0666e028 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + */ +public final class MicroBfdState extends ExpandableStringEnum { + /** + * MicroBfdState-Enabled. + */ + public static final MicroBfdState ENABLED = fromString("Enabled"); + + /** + * MicroBfdState-Disabled. + */ + public static final MicroBfdState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MicroBfdState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MicroBfdState() { + } + + /** + * Creates or finds a MicroBfdState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MicroBfdState. + */ + public static MicroBfdState fromString(String name) { + return fromString(name, MicroBfdState.class); + } + + /** + * Gets known MicroBfdState values. + * + * @return known MicroBfdState values. + */ + public static Collection values() { + return values(MicroBfdState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java new file mode 100644 index 000000000000..3ad00643f279 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NNI Derived Unique Route Distinguisher Configuration State. + */ +public final class NNIDerivedUniqueRouteDistinguisherConfigurationState + extends ExpandableStringEnum { + /** + * NNI derived unique route distinguisher configuration state Enabled. + */ + public static final NNIDerivedUniqueRouteDistinguisherConfigurationState ENABLED = fromString("Enabled"); + + /** + * NNI derived unique route distinguisher configuration state Disabled. + */ + public static final NNIDerivedUniqueRouteDistinguisherConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of NNIDerivedUniqueRouteDistinguisherConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NNIDerivedUniqueRouteDistinguisherConfigurationState() { + } + + /** + * Creates or finds a NNIDerivedUniqueRouteDistinguisherConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NNIDerivedUniqueRouteDistinguisherConfigurationState. + */ + public static NNIDerivedUniqueRouteDistinguisherConfigurationState fromString(String name) { + return fromString(name, NNIDerivedUniqueRouteDistinguisherConfigurationState.class); + } + + /** + * Gets known NNIDerivedUniqueRouteDistinguisherConfigurationState values. + * + * @return known NNIDerivedUniqueRouteDistinguisherConfigurationState values. + */ + public static Collection values() { + return values(NNIDerivedUniqueRouteDistinguisherConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..a9216ea46619 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv4 prefix limits patch properties. + */ +@Fluent +public final class NativeIpv4PrefixLimitPatchProperties + implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv4PrefixLimitPatchProperties class. + */ + public NativeIpv4PrefixLimitPatchProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv4PrefixLimitPatchProperties object itself. + */ + public NativeIpv4PrefixLimitPatchProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv4PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv4PrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv4PrefixLimitPatchProperties. + */ + public static NativeIpv4PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv4PrefixLimitPatchProperties deserializedNativeIpv4PrefixLimitPatchProperties + = new NativeIpv4PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitPatchProperties.fromJson(reader1)); + deserializedNativeIpv4PrefixLimitPatchProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv4PrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java new file mode 100644 index 000000000000..cb730a142519 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv4 prefix limit properties. + */ +@Fluent +public final class NativeIpv4PrefixLimitProperties implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv4PrefixLimitProperties class. + */ + public NativeIpv4PrefixLimitProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv4PrefixLimitProperties object itself. + */ + public NativeIpv4PrefixLimitProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv4PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv4PrefixLimitProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv4PrefixLimitProperties. + */ + public static NativeIpv4PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv4PrefixLimitProperties deserializedNativeIpv4PrefixLimitProperties + = new NativeIpv4PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitProperties.fromJson(reader1)); + deserializedNativeIpv4PrefixLimitProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv4PrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..9fb3a567a34f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv6 prefix limits patch properties. + */ +@Fluent +public final class NativeIpv6PrefixLimitPatchProperties + implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv6PrefixLimitPatchProperties class. + */ + public NativeIpv6PrefixLimitPatchProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv6PrefixLimitPatchProperties object itself. + */ + public NativeIpv6PrefixLimitPatchProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv6PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv6PrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv6PrefixLimitPatchProperties. + */ + public static NativeIpv6PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv6PrefixLimitPatchProperties deserializedNativeIpv6PrefixLimitPatchProperties + = new NativeIpv6PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitPatchProperties.fromJson(reader1)); + deserializedNativeIpv6PrefixLimitPatchProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv6PrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java new file mode 100644 index 000000000000..4e0c32059ecd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * External Network native IPv6 prefix limit properties. + */ +@Fluent +public final class NativeIpv6PrefixLimitProperties implements JsonSerializable { + /* + * Prefix limits + */ + private List prefixLimits; + + /** + * Creates an instance of NativeIpv6PrefixLimitProperties class. + */ + public NativeIpv6PrefixLimitProperties() { + } + + /** + * Get the prefixLimits property: Prefix limits. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: Prefix limits. + * + * @param prefixLimits the prefixLimits value to set. + * @return the NativeIpv6PrefixLimitProperties object itself. + */ + public NativeIpv6PrefixLimitProperties withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NativeIpv6PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NativeIpv6PrefixLimitProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NativeIpv6PrefixLimitProperties. + */ + public static NativeIpv6PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NativeIpv6PrefixLimitProperties deserializedNativeIpv6PrefixLimitProperties + = new NativeIpv6PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> PrefixLimitProperties.fromJson(reader1)); + deserializedNativeIpv6PrefixLimitProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedNativeIpv6PrefixLimitProperties; + }); + } +} 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 5fb6f92f288f..88f64bf9b6ff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -21,6 +21,16 @@ public final class NeighborAddress implements JsonSerializable */ private String address; + /* + * BFD Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BfdAdministrativeState bfdAdministrativeState; + + /* + * BGP Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BgpAdministrativeState bgpAdministrativeState; + /* * Configuration state of the resource. */ @@ -53,20 +63,32 @@ public NeighborAddress withAddress(String address) { } /** - * Get the configurationState property: Configuration state of the resource. + * Get the bfdAdministrativeState property: BFD Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. * - * @return the configurationState value. + * @return the bfdAdministrativeState value. */ - public ConfigurationState configurationState() { - return this.configurationState; + public BfdAdministrativeState bfdAdministrativeState() { + return this.bfdAdministrativeState; } /** - * Validates the instance. + * Get the bgpAdministrativeState property: BGP Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the bgpAdministrativeState value. */ - public void validate() { + public BgpAdministrativeState bgpAdministrativeState() { + return this.bgpAdministrativeState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; } /** @@ -96,6 +118,12 @@ public static NeighborAddress fromJson(JsonReader jsonReader) throws IOException if ("address".equals(fieldName)) { deserializedNeighborAddress.address = reader.getString(); + } else if ("bfdAdministrativeState".equals(fieldName)) { + deserializedNeighborAddress.bfdAdministrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("bgpAdministrativeState".equals(fieldName)) { + deserializedNeighborAddress.bgpAdministrativeState + = BgpAdministrativeState.fromString(reader.getString()); } else if ("configurationState".equals(fieldName)) { deserializedNeighborAddress.configurationState = ConfigurationState.fromString(reader.getString()); } else { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java new file mode 100644 index 000000000000..02cfde39a653 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Neighbor Address Bidirectional Forwarding Detection (BFD) Administrative Status. + */ +@Immutable +public final class NeighborAddressBfdAdministrativeStatus + implements JsonSerializable { + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BFD Administrative state. + */ + private BfdAdministrativeState administrativeState; + + /* + * Error message. + */ + private String error; + + /** + * Creates an instance of NeighborAddressBfdAdministrativeStatus class. + */ + private NeighborAddressBfdAdministrativeStatus() { + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Get the administrativeState property: BFD Administrative state. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the error property: Error message. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + jsonWriter.writeStringField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborAddressBfdAdministrativeStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborAddressBfdAdministrativeStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborAddressBfdAdministrativeStatus. + */ + public static NeighborAddressBfdAdministrativeStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborAddressBfdAdministrativeStatus deserializedNeighborAddressBfdAdministrativeStatus + = new NeighborAddressBfdAdministrativeStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddress".equals(fieldName)) { + deserializedNeighborAddressBfdAdministrativeStatus.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedNeighborAddressBfdAdministrativeStatus.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNeighborAddressBfdAdministrativeStatus.error = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborAddressBfdAdministrativeStatus; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java new file mode 100644 index 000000000000..e28449c6d45c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Neighbor Address BGP Administrative Status. + */ +@Immutable +public final class NeighborAddressBgpAdministrativeStatus + implements JsonSerializable { + /* + * NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address. + */ + private String neighborAddress; + + /* + * BGP Administrative state. + */ + private BgpAdministrativeState administrativeState; + + /* + * Error message. + */ + private String error; + + /** + * Creates an instance of NeighborAddressBgpAdministrativeStatus class. + */ + private NeighborAddressBgpAdministrativeStatus() { + } + + /** + * Get the neighborAddress property: NeighborAddress - Input should be either All or Specific Ipv4 Address or + * Specific Ipv6 Address. + * + * @return the neighborAddress value. + */ + public String neighborAddress() { + return this.neighborAddress; + } + + /** + * Get the administrativeState property: BGP Administrative state. + * + * @return the administrativeState value. + */ + public BgpAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the error property: Error message. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("neighborAddress", this.neighborAddress); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + jsonWriter.writeStringField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborAddressBgpAdministrativeStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborAddressBgpAdministrativeStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborAddressBgpAdministrativeStatus. + */ + public static NeighborAddressBgpAdministrativeStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborAddressBgpAdministrativeStatus deserializedNeighborAddressBgpAdministrativeStatus + = new NeighborAddressBgpAdministrativeStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("neighborAddress".equals(fieldName)) { + deserializedNeighborAddressBgpAdministrativeStatus.neighborAddress = reader.getString(); + } else if ("administrativeState".equals(fieldName)) { + deserializedNeighborAddressBgpAdministrativeStatus.administrativeState + = BgpAdministrativeState.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNeighborAddressBgpAdministrativeStatus.error = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborAddressBgpAdministrativeStatus; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java new file mode 100644 index 000000000000..6acaf1318bab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Neighbor Address properties. + */ +@Fluent +public final class NeighborAddressPatch implements JsonSerializable { + /* + * IP Address. + */ + private String address; + + /* + * BFD Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BfdAdministrativeState bfdAdministrativeState; + + /* + * BGP Administrative State for each Neighbor Address. Example: Enabled | Disabled. + */ + private BgpAdministrativeState bgpAdministrativeState; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /** + * Creates an instance of NeighborAddressPatch class. + */ + public NeighborAddressPatch() { + } + + /** + * Get the address property: IP Address. + * + * @return the address value. + */ + public String address() { + return this.address; + } + + /** + * Set the address property: IP Address. + * + * @param address the address value to set. + * @return the NeighborAddressPatch object itself. + */ + public NeighborAddressPatch withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the bfdAdministrativeState property: BFD Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. + * + * @return the bfdAdministrativeState value. + */ + public BfdAdministrativeState bfdAdministrativeState() { + return this.bfdAdministrativeState; + } + + /** + * Get the bgpAdministrativeState property: BGP Administrative State for each Neighbor Address. Example: Enabled | + * Disabled. + * + * @return the bgpAdministrativeState value. + */ + public BgpAdministrativeState bgpAdministrativeState() { + return this.bgpAdministrativeState; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("address", this.address); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborAddressPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborAddressPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborAddressPatch. + */ + public static NeighborAddressPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborAddressPatch deserializedNeighborAddressPatch = new NeighborAddressPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("address".equals(fieldName)) { + deserializedNeighborAddressPatch.address = reader.getString(); + } else if ("bfdAdministrativeState".equals(fieldName)) { + deserializedNeighborAddressPatch.bfdAdministrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else if ("bgpAdministrativeState".equals(fieldName)) { + deserializedNeighborAddressPatch.bgpAdministrativeState + = BgpAdministrativeState.fromString(reader.getString()); + } else if ("configurationState".equals(fieldName)) { + deserializedNeighborAddressPatch.configurationState + = ConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborAddressPatch; + }); + } +} 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 index e28f941034bb..e56f71a9f8a7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ 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; /** @@ -51,46 +50,18 @@ public interface NeighborGroup { 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. + * Gets the properties property: The NeighborGroup Properties. * - * @return the provisioningState value. + * @return the properties value. */ - ProvisioningState provisioningState(); + NeighborGroupProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -124,7 +95,7 @@ public interface NeighborGroup { * The entirety of the NeighborGroup definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -168,15 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NeighborGroup definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The NeighborGroup Properties. + * + * @param properties The NeighborGroup Properties. + * @return the next definition stage. + */ + WithCreate withProperties(NeighborGroupProperties properties); } /** * 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 { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -205,32 +188,6 @@ interface WithTags { */ 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); - } } /** @@ -243,7 +200,7 @@ interface WithAnnotation { /** * The template for NeighborGroup update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithDestination, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -269,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -278,29 +235,16 @@ interface WithTags { } /** - * 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. + * The stage of the NeighborGroup update allowing to specify properties. */ - interface WithAnnotation { + interface WithProperties { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the properties property: Neighbor Group Patch properties.. * - * @param annotation Switch configuration description. + * @param properties Neighbor Group Patch properties. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withProperties(NeighborGroupPatchProperties properties); } } 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 index 5ad8a7c46fcc..e004a0a311f4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public NeighborGroupDestination withIpv6Addresses(List ipv6Addresses) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java new file mode 100644 index 000000000000..ac94abfc3943 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ +@Fluent +public final class NeighborGroupDestinationPatch implements JsonSerializable { + /* + * Array of IPv4 Addresses. + */ + private List ipv4Addresses; + + /* + * Array of IPv6 Addresses. + */ + private List ipv6Addresses; + + /** + * Creates an instance of NeighborGroupDestinationPatch class. + */ + public NeighborGroupDestinationPatch() { + } + + /** + * 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 NeighborGroupDestinationPatch object itself. + */ + public NeighborGroupDestinationPatch 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 NeighborGroupDestinationPatch object itself. + */ + public NeighborGroupDestinationPatch withIpv6Addresses(List ipv6Addresses) { + this.ipv6Addresses = ipv6Addresses; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipv4Addresses", this.ipv4Addresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipv6Addresses", this.ipv6Addresses, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NeighborGroupDestinationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NeighborGroupDestinationPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NeighborGroupDestinationPatch. + */ + public static NeighborGroupDestinationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NeighborGroupDestinationPatch deserializedNeighborGroupDestinationPatch + = new NeighborGroupDestinationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipv4Addresses".equals(fieldName)) { + List ipv4Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedNeighborGroupDestinationPatch.ipv4Addresses = ipv4Addresses; + } else if ("ipv6Addresses".equals(fieldName)) { + List ipv6Addresses = reader.readArray(reader1 -> reader1.getString()); + deserializedNeighborGroupDestinationPatch.ipv6Addresses = ipv6Addresses; + } else { + reader.skipChildren(); + } + } + + return deserializedNeighborGroupDestinationPatch; + }); + } +} 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 index 6acb912c3cdc..3c4d55c4b7d4 100644 --- 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupPatchProperties; import java.io.IOException; import java.util.Map; @@ -16,11 +16,16 @@ * The Neighbor Group Patch definition. */ @Fluent -public final class NeighborGroupPatch extends TagsUpdate { +public final class NeighborGroupPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Neighbor Group Patch properties. */ - private NeighborGroupPatchProperties innerProperties; + private NeighborGroupPatchProperties properties; /** * Creates an instance of NeighborGroupPatch class. @@ -29,89 +34,53 @@ public NeighborGroupPatch() { } /** - * Get the innerProperties property: Neighbor Group Patch properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. - */ - private NeighborGroupPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} + * @return the tags value. */ - @Override - public NeighborGroupPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Set the tags property: Resource tags. * - * @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. + * @param tags the tags 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); + public NeighborGroupPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: Neighbor Group Patch properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public NeighborGroupPatchProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: Neighbor Group Patch properties. * - * @param annotation the annotation value to set. + * @param properties the properties 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); + public NeighborGroupPatch withProperties(NeighborGroupPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -132,9 +101,9 @@ public static NeighborGroupPatch fromJson(JsonReader jsonReader) throws IOExcept if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNeighborGroupPatch.withTags(tags); + deserializedNeighborGroupPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNeighborGroupPatch.innerProperties = NeighborGroupPatchProperties.fromJson(reader); + deserializedNeighborGroupPatch.properties = NeighborGroupPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/NeighborGroupPatchProperties.java similarity index 70% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchProperties.java index 07d96fb93505..8ed9afc0c36a 100644 --- 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/models/NeighborGroupPatchProperties.java @@ -1,26 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; import java.io.IOException; /** * Neighbor Group Patch properties. */ @Fluent -public final class NeighborGroupPatchProperties extends AnnotationResource { +public final class NeighborGroupPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * An array of destination IPv4 Addresses or IPv6 Addresses. */ - private NeighborGroupDestination destination; + private NeighborGroupDestinationPatch destination; /** * Creates an instance of NeighborGroupPatchProperties class. @@ -29,44 +33,43 @@ public NeighborGroupPatchProperties() { } /** - * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Get the annotation property: Switch configuration description. * - * @return the destination value. + * @return the annotation value. */ - public NeighborGroupDestination destination() { - return this.destination; + public String annotation() { + return this.annotation; } /** - * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * Set the annotation property: Switch configuration description. * - * @param destination the destination value to set. + * @param annotation the annotation value to set. * @return the NeighborGroupPatchProperties object itself. */ - public NeighborGroupPatchProperties withDestination(NeighborGroupDestination destination) { - this.destination = destination; + public NeighborGroupPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } /** - * {@inheritDoc} + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. */ - @Override - public NeighborGroupPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public NeighborGroupDestinationPatch destination() { + return this.destination; } /** - * Validates the instance. + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param destination the destination value to set. + * @return the NeighborGroupPatchProperties object itself. */ - @Override - public void validate() { - if (destination() != null) { - destination().validate(); - } + public NeighborGroupPatchProperties withDestination(NeighborGroupDestinationPatch destination) { + this.destination = destination; + return this; } /** @@ -75,7 +78,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeJsonField("destination", this.destination); return jsonWriter.writeEndObject(); } @@ -96,9 +99,10 @@ public static NeighborGroupPatchProperties fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNeighborGroupPatchProperties.withAnnotation(reader.getString()); + deserializedNeighborGroupPatchProperties.annotation = reader.getString(); } else if ("destination".equals(fieldName)) { - deserializedNeighborGroupPatchProperties.destination = NeighborGroupDestination.fromJson(reader); + deserializedNeighborGroupPatchProperties.destination + = NeighborGroupDestinationPatch.fromJson(reader); } else { reader.skipChildren(); } 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 deleted file mode 100644 index 47817976f3c0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Neighbor Group Patchable Properties defines the patchable properties of the resource. - */ -@Fluent -public class NeighborGroupPatchableProperties implements JsonSerializable { - /* - * An array of destination IPv4 Addresses or IPv6 Addresses. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("destination", this.destination); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NeighborGroupPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NeighborGroupPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NeighborGroupPatchableProperties. - */ - public static NeighborGroupPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NeighborGroupPatchableProperties deserializedNeighborGroupPatchableProperties - = new NeighborGroupPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destination".equals(fieldName)) { - deserializedNeighborGroupPatchableProperties.destination - = NeighborGroupDestination.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNeighborGroupPatchableProperties; - }); - } -} 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/models/NeighborGroupProperties.java similarity index 73% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupProperties.java index 6d0174abc2ac..cde05e1a1c86 100644 --- 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/models/NeighborGroupProperties.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -18,7 +16,17 @@ * Neighbor Group Properties defines the properties of the resource. */ @Fluent -public final class NeighborGroupProperties extends AnnotationResource { +public final class NeighborGroupProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ + private NeighborGroupDestination destination; + /* * List of NetworkTap IDs where neighbor group is associated. */ @@ -30,14 +38,14 @@ public final class NeighborGroupProperties extends AnnotationResource { private List networkTapRuleIds; /* - * The provisioning state of the resource. + * Details of the last operation performed on the resource */ - private ProvisioningState provisioningState; + private LastOperationProperties lastOperation; /* - * An array of destination IPv4 Addresses or IPv6 Addresses. + * The provisioning state of the resource. */ - private NeighborGroupDestination destination; + private ProvisioningState provisioningState; /** * Creates an instance of NeighborGroupProperties class. @@ -46,30 +54,23 @@ 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. + * Get the annotation property: Switch configuration description. * - * @return the networkTapRuleIds value. + * @return the annotation value. */ - public List networkTapRuleIds() { - return this.networkTapRuleIds; + public String annotation() { + return this.annotation; } /** - * Get the provisioningState property: The provisioning state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @param annotation the annotation value to set. + * @return the NeighborGroupProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public NeighborGroupProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -93,24 +94,39 @@ public NeighborGroupProperties withDestination(NeighborGroupDestination destinat } /** - * {@inheritDoc} + * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. + * + * @return the networkTapIds value. */ - @Override - public NeighborGroupProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public List networkTapIds() { + return this.networkTapIds; } /** - * Validates the instance. + * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the networkTapRuleIds value. */ - @Override - public void validate() { - if (destination() != null) { - destination().validate(); - } + public List networkTapRuleIds() { + return this.networkTapRuleIds; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; } /** @@ -119,8 +135,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -130,6 +146,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NeighborGroupProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NeighborGroupProperties. */ public static NeighborGroupProperties fromJson(JsonReader jsonReader) throws IOException { @@ -139,19 +156,21 @@ public static NeighborGroupProperties fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNeighborGroupProperties.withAnnotation(reader.getString()); + if ("destination".equals(fieldName)) { + deserializedNeighborGroupProperties.destination = NeighborGroupDestination.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedNeighborGroupProperties.annotation = reader.getString(); } else if ("networkTapIds".equals(fieldName)) { List networkTapIds = reader.readArray(reader1 -> reader1.getString()); deserializedNeighborGroupProperties.networkTapIds = networkTapIds; } else if ("networkTapRuleIds".equals(fieldName)) { List networkTapRuleIds = reader.readArray(reader1 -> reader1.getString()); deserializedNeighborGroupProperties.networkTapRuleIds = networkTapRuleIds; + } else if ("lastOperation".equals(fieldName)) { + deserializedNeighborGroupProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNeighborGroupProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("destination".equals(fieldName)) { - deserializedNeighborGroupProperties.destination = NeighborGroupDestination.fromJson(reader); } else { reader.skipChildren(); } 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 index de3fe27e6437..f31cd0c50992 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ 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. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, 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. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, 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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, 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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, 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}. + * @return the response of a NeighborGroup list operation 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NeighborGroup list operation 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}. + * @return the response of a NeighborGroup list operation 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}. + * @return the response of a NeighborGroup list operation 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. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NeighborGroup getById(String id); /** - * Retrieves details of neighbor Group using GET method. - * * Gets the Neighbor Group. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Response getByIdWithResponse(String id, Context context); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteById(String id); /** - * Deletes a Neighbor Group. - * * Implements Neighbor Group DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index 0a76f545c561..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Neighbor Group. - */ -@Fluent -public final class NeighborGroupsListResult implements JsonSerializable { - /* - * List of Neighbor Group resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NeighborGroupsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NeighborGroupsListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NeighborGroupsListResult. - */ - public static NeighborGroupsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NeighborGroupsListResult deserializedNeighborGroupsListResult = new NeighborGroupsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NeighborGroupInner.fromJson(reader1)); - deserializedNeighborGroupsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNeighborGroupsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNeighborGroupsListResult; - }); - } -} 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 e815f26d3c96..4ff503832894 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -50,96 +50,18 @@ public interface NetworkDevice { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the version property: Current version of the device as defined in SKU. - * - * @return the version value. - */ - String version(); - - /** - * Gets the networkDeviceSku property: Network Device SKU name. - * - * @return the networkDeviceSku value. - */ - String networkDeviceSku(); - - /** - * Gets the networkDeviceRole property: NetworkDeviceRole is the device role: Example: CE | ToR. - * - * @return the networkDeviceRole value. - */ - NetworkDeviceRole networkDeviceRole(); - - /** - * Gets the networkRackId property: Reference to network rack resource id. + * Gets the properties property: The NetworkDevice properties. * - * @return the networkRackId value. + * @return the properties value. */ - String networkRackId(); + NetworkDeviceProperties properties(); /** - * 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 administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - AdministrativeState administrativeState(); - - /** - * Gets the hostname property: The host name of the device. - * - * @return the hostname value. - */ - String hostname(); - - /** - * Gets the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @return the serialNumber value. - */ - String serialNumber(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -173,7 +95,7 @@ public interface NetworkDevice { * The entirety of the NetworkDevice definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -217,15 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkDevice definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The NetworkDevice properties. + * + * @param properties The NetworkDevice properties. + * @return the next definition stage. + */ + WithCreate withProperties(NetworkDeviceProperties properties); } /** * The stage of the NetworkDevice 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.WithNetworkDeviceSku, - DefinitionStages.WithHostname, DefinitionStages.WithSerialNumber, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -254,60 +188,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - - /** - * The stage of the NetworkDevice definition allowing to specify networkDeviceSku. - */ - interface WithNetworkDeviceSku { - /** - * Specifies the networkDeviceSku property: Network Device SKU name.. - * - * @param networkDeviceSku Network Device SKU name. - * @return the next definition stage. - */ - WithCreate withNetworkDeviceSku(String networkDeviceSku); - } - - /** - * The stage of the NetworkDevice definition allowing to specify hostname. - */ - interface WithHostname { - /** - * Specifies the hostname property: The host name of the device.. - * - * @param hostname The host name of the device. - * @return the next definition stage. - */ - WithCreate withHostname(String hostname); - } - - /** - * The stage of the NetworkDevice definition allowing to specify serialNumber. - */ - interface WithSerialNumber { - /** - * Specifies the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber.. - * - * @param serialNumber Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * @return the next definition stage. - */ - WithCreate withSerialNumber(String serialNumber); - } - - /** - * The stage of the NetworkDevice 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); - } } /** @@ -320,8 +200,7 @@ interface WithAnnotation { /** * The template for NetworkDevice update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithHostname, UpdateStages.WithSerialNumber, - UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -347,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -356,44 +235,16 @@ interface WithTags { } /** - * The stage of the NetworkDevice update allowing to specify hostname. + * The stage of the NetworkDevice update allowing to specify properties. */ - interface WithHostname { + interface WithProperties { /** - * Specifies the hostname property: The host name of the device.. + * Specifies the properties property: Network Device Patch properties.. * - * @param hostname The host name of the device. + * @param properties Network Device Patch properties. * @return the next definition stage. */ - Update withHostname(String hostname); - } - - /** - * The stage of the NetworkDevice update allowing to specify serialNumber. - */ - interface WithSerialNumber { - /** - * Specifies the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber.. - * - * @param serialNumber Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * @return the next definition stage. - */ - Update withSerialNumber(String serialNumber); - } - - /** - * The stage of the NetworkDevice 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); + Update withProperties(NetworkDevicePatchParametersProperties properties); } } @@ -413,21 +264,17 @@ interface WithAnnotation { NetworkDevice refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Reboot 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. + * @return the response. */ CommonPostActionResponseForStateUpdate reboot(RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param body Request payload. @@ -435,50 +282,42 @@ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate reboot(RebootProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate refreshConfiguration(); /** - * Implements the operation to the underlying resources. - * * 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate refreshConfiguration(Context context); /** - * Implements the operation to the underlying resources. - * * 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param body Request payload. @@ -486,27 +325,23 @@ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param body Request payload. @@ -514,7 +349,54 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdm * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context); + + /** + * Run the RO Command on the Network Device. + * + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(DeviceRoCommand body, + Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceRWCommands runRwCommand(DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. + * + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceRWCommands runRwCommand(DeviceRwCommand 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 a16603bcf9f0..8ff0cd1261da 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties; import java.io.IOException; import java.util.Map; @@ -16,11 +16,16 @@ * The Network Device Patch Parameters defines the patch parameters of the resource. */ @Fluent -public final class NetworkDevicePatchParameters extends TagsUpdate { +public final class NetworkDevicePatchParameters implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Network Device Patch properties. */ - private NetworkDevicePatchParametersProperties innerProperties; + private NetworkDevicePatchParametersProperties properties; /** * Creates an instance of NetworkDevicePatchParameters class. @@ -29,114 +34,53 @@ public NetworkDevicePatchParameters() { } /** - * Get the innerProperties property: Network Device Patch properties. - * - * @return the innerProperties value. - */ - private NetworkDevicePatchParametersProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkDevicePatchParameters withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the hostname property: The host name of the device. + * Get the tags property: Resource tags. * - * @return the hostname value. + * @return the tags value. */ - public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + public Map tags() { + return this.tags; } /** - * Set the hostname property: The host name of the device. + * Set the tags property: Resource tags. * - * @param hostname the hostname value to set. + * @param tags the tags value to set. * @return the NetworkDevicePatchParameters object itself. */ - public NetworkDevicePatchParameters withHostname(String hostname) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDevicePatchParametersProperties(); - } - this.innerProperties().withHostname(hostname); - return this; - } - - /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); - } - - /** - * 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. - */ - public NetworkDevicePatchParameters withSerialNumber(String serialNumber) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDevicePatchParametersProperties(); - } - this.innerProperties().withSerialNumber(serialNumber); + public NetworkDevicePatchParameters withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: Network Device Patch properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public NetworkDevicePatchParametersProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: Network Device Patch properties. * - * @param annotation the annotation value to set. + * @param properties the properties value to set. * @return the NetworkDevicePatchParameters object itself. */ - public NetworkDevicePatchParameters withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDevicePatchParametersProperties(); - } - this.innerProperties().withAnnotation(annotation); + public NetworkDevicePatchParameters withProperties(NetworkDevicePatchParametersProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -157,9 +101,9 @@ public static NetworkDevicePatchParameters fromJson(JsonReader jsonReader) throw if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNetworkDevicePatchParameters.withTags(tags); + deserializedNetworkDevicePatchParameters.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNetworkDevicePatchParameters.innerProperties + deserializedNetworkDevicePatchParameters.properties = NetworkDevicePatchParametersProperties.fromJson(reader); } else { reader.skipChildren(); 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/models/NetworkDevicePatchParametersProperties.java similarity index 71% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParametersProperties.java index 945722302afd..b91547ec6b60 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/models/NetworkDevicePatchParametersProperties.java @@ -1,25 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import java.io.IOException; /** * Network Device Patch properties. */ @Fluent -public final class NetworkDevicePatchParametersProperties extends AnnotationResource { +public final class NetworkDevicePatchParametersProperties + implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * The host name of the device. */ - private String hostname; + private String hostName; /* * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. @@ -33,22 +39,42 @@ public NetworkDevicePatchParametersProperties() { } /** - * Get the hostname property: The host name of the device. + * 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 NetworkDevicePatchParametersProperties object itself. + */ + public NetworkDevicePatchParametersProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the hostName property: The host name of the device. * - * @return the hostname value. + * @return the hostName value. */ - public String hostname() { - return this.hostname; + public String hostName() { + return this.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. + * @param hostName the hostName value to set. * @return the NetworkDevicePatchParametersProperties object itself. */ - public NetworkDevicePatchParametersProperties withHostname(String hostname) { - this.hostname = hostname; + public NetworkDevicePatchParametersProperties withHostName(String hostName) { + this.hostName = hostName; return this; } @@ -74,32 +100,14 @@ public NetworkDevicePatchParametersProperties withSerialNumber(String serialNumb return this; } - /** - * {@inheritDoc} - */ - @Override - public NetworkDevicePatchParametersProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("hostName", this.hostname); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("hostName", this.hostName); jsonWriter.writeStringField("serialNumber", this.serialNumber); return jsonWriter.writeEndObject(); } @@ -121,9 +129,9 @@ public static NetworkDevicePatchParametersProperties fromJson(JsonReader jsonRea reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkDevicePatchParametersProperties.withAnnotation(reader.getString()); + deserializedNetworkDevicePatchParametersProperties.annotation = reader.getString(); } else if ("hostName".equals(fieldName)) { - deserializedNetworkDevicePatchParametersProperties.hostname = reader.getString(); + deserializedNetworkDevicePatchParametersProperties.hostName = reader.getString(); } else if ("serialNumber".equals(fieldName)) { deserializedNetworkDevicePatchParametersProperties.serialNumber = reader.getString(); } else { 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 deleted file mode 100644 index dca1582226ac..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network Device updatable properties. - */ -@Fluent -public class NetworkDevicePatchableProperties implements JsonSerializable { - /* - * The host name of the device. - */ - private String hostname; - - /* - * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. - */ - private String serialNumber; - - /** - * Creates an instance of NetworkDevicePatchableProperties class. - */ - public NetworkDevicePatchableProperties() { - } - - /** - * Get the hostname property: The host name of the device. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Set the hostname property: The host name of the device. - * - * @param hostname the hostname value to set. - * @return the NetworkDevicePatchableProperties object itself. - */ - public NetworkDevicePatchableProperties withHostname(String hostname) { - this.hostname = hostname; - return this; - } - - /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * 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. - */ - public NetworkDevicePatchableProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("hostName", this.hostname); - jsonWriter.writeStringField("serialNumber", this.serialNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkDevicePatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkDevicePatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkDevicePatchableProperties. - */ - public static NetworkDevicePatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkDevicePatchableProperties deserializedNetworkDevicePatchableProperties - = new NetworkDevicePatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hostName".equals(fieldName)) { - deserializedNetworkDevicePatchableProperties.hostname = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedNetworkDevicePatchableProperties.serialNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkDevicePatchableProperties; - }); - } -} 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/models/NetworkDeviceProperties.java similarity index 75% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceProperties.java index e9376fdf9d99..6e295503cd77 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/models/NetworkDeviceProperties.java @@ -1,25 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.NetworkDeviceRole; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; /** * Network Device Properties defines the properties of the resource. */ @Fluent -public final class NetworkDeviceProperties extends AnnotationResource { +public final class NetworkDeviceProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * The host name of the device. + */ + private String hostName; + + /* + * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + */ + private String serialNumber; + /* * Current version of the device as defined in SKU. */ @@ -50,6 +61,16 @@ public final class NetworkDeviceProperties extends AnnotationResource { */ private String managementIpv6Address; + /* + * User configured read-write configuration applied on the network devices. + */ + private String rwDeviceConfig; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -65,20 +86,72 @@ public final class NetworkDeviceProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * The host name of the device. + /** + * Creates an instance of NetworkDeviceProperties class. */ - private String hostname; + public NetworkDeviceProperties() { + } - /* - * Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. */ - private String serialNumber; + public String annotation() { + return this.annotation; + } /** - * Creates an instance of NetworkDeviceProperties class. + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkDeviceProperties object itself. */ - public NetworkDeviceProperties() { + public NetworkDeviceProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the hostName property: The host name of the device. + * + * @return the hostName value. + */ + public String hostName() { + return this.hostName; + } + + /** + * Set the hostName property: The host name of the device. + * + * @param hostName the hostName value to set. + * @return the NetworkDeviceProperties object itself. + */ + public NetworkDeviceProperties withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + /** + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * 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. + */ + public NetworkDeviceProperties withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; } /** @@ -146,6 +219,24 @@ public String managementIpv6Address() { return this.managementIpv6Address; } + /** + * Get the rwDeviceConfig property: User configured read-write configuration applied on the network devices. + * + * @return the rwDeviceConfig value. + */ + public String rwDeviceConfig() { + return this.rwDeviceConfig; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -173,76 +264,16 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * Get the hostname property: The host name of the device. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Set the hostname property: The host name of the device. - * - * @param hostname the hostname value to set. - * @return the NetworkDeviceProperties object itself. - */ - public NetworkDeviceProperties withHostname(String hostname) { - this.hostname = hostname; - return this; - } - - /** - * Get the serialNumber property: Serial number of the device. Format of serial Number - - * Make;Model;HardwareRevisionId;SerialNumber. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * 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. - */ - public NetworkDeviceProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkDeviceProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeStringField("networkDeviceSku", this.networkDeviceSku); - jsonWriter.writeStringField("hostName", this.hostname); jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("hostName", this.hostName); + jsonWriter.writeStringField("networkDeviceSku", this.networkDeviceSku); return jsonWriter.writeEndObject(); } @@ -252,6 +283,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkDeviceProperties if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkDeviceProperties. */ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOException { @@ -261,8 +293,12 @@ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkDeviceProperties.withAnnotation(reader.getString()); + if ("serialNumber".equals(fieldName)) { + deserializedNetworkDeviceProperties.serialNumber = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedNetworkDeviceProperties.annotation = reader.getString(); + } else if ("hostName".equals(fieldName)) { + deserializedNetworkDeviceProperties.hostName = reader.getString(); } else if ("version".equals(fieldName)) { deserializedNetworkDeviceProperties.version = reader.getString(); } else if ("networkDeviceSku".equals(fieldName)) { @@ -276,6 +312,10 @@ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOE deserializedNetworkDeviceProperties.managementIpv4Address = reader.getString(); } else if ("managementIpv6Address".equals(fieldName)) { deserializedNetworkDeviceProperties.managementIpv6Address = reader.getString(); + } else if ("rwDeviceConfig".equals(fieldName)) { + deserializedNetworkDeviceProperties.rwDeviceConfig = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkDeviceProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkDeviceProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -285,10 +325,6 @@ public static NetworkDeviceProperties fromJson(JsonReader jsonReader) throws IOE } else if ("administrativeState".equals(fieldName)) { deserializedNetworkDeviceProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("hostName".equals(fieldName)) { - deserializedNetworkDeviceProperties.hostname = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedNetworkDeviceProperties.serialNumber = reader.getString(); } else { reader.skipChildren(); } 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 index 77f7b151d786..370fc3639108 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,27 +12,27 @@ */ public final class NetworkDeviceRole extends ExpandableStringEnum { /** - * Static value CE for NetworkDeviceRole. + * NetworkDeviceRole-CE(Customer Edge). */ public static final NetworkDeviceRole CE = fromString("CE"); /** - * Static value ToR for NetworkDeviceRole. + * NetworkDeviceRole-ToR(top of rack). */ public static final NetworkDeviceRole TOR = fromString("ToR"); /** - * Static value NPB for NetworkDeviceRole. + * NetworkDeviceRole-NPB(Network Packet Broker). */ public static final NetworkDeviceRole NPB = fromString("NPB"); /** - * Static value TS for NetworkDeviceRole. + * NetworkDeviceRole-TS(Terminal Server). */ public static final NetworkDeviceRole TS = fromString("TS"); /** - * Static value Management for NetworkDeviceRole. + * NetworkDeviceRole-Management. */ public static final NetworkDeviceRole MANAGEMENT = fromString("Management"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java index 228c6b65f696..95f6fb16ec34 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,27 +12,27 @@ */ public final class NetworkDeviceRoleName extends ExpandableStringEnum { /** - * Static value CE for NetworkDeviceRoleName. + * NetworkDeviceRoleName-CE(Customer Edge). */ public static final NetworkDeviceRoleName CE = fromString("CE"); /** - * Static value ToR for NetworkDeviceRoleName. + * NetworkDeviceRoleName-ToR(top of rack). */ public static final NetworkDeviceRoleName TOR = fromString("ToR"); /** - * Static value NPB for NetworkDeviceRoleName. + * NetworkDeviceRoleName-NPB(Network Packet Broker). */ public static final NetworkDeviceRoleName NPB = fromString("NPB"); /** - * Static value TS for NetworkDeviceRoleName. + * NetworkDeviceRoleName-TS(Terminal Server). */ public static final NetworkDeviceRoleName TS = fromString("TS"); /** - * Static value Management for NetworkDeviceRoleName. + * NetworkDeviceRoleName-Management. */ public static final NetworkDeviceRoleName MANAGEMENT = fromString("Management"); 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 e53e06d10b4c..248d6ac0e221 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 @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.management.SystemData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; -import java.util.List; /** * An immutable client-side representation of NetworkDeviceSku. @@ -34,53 +33,18 @@ public interface NetworkDeviceSku { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the model property: Model of the network device. - * - * @return the model value. - */ - String model(); - - /** - * Gets the manufacturer property: Manufacturer of the network device. - * - * @return the manufacturer value. - */ - String manufacturer(); - - /** - * Gets the supportedVersions property: List of supported version details of network device. + * Gets the properties property: The NetworkDeviceSku properties. * - * @return the supportedVersions value. + * @return the properties value. */ - List supportedVersions(); + NetworkDeviceSkuProperties properties(); /** - * Gets the supportedRoleTypes property: Available roles for the network device. - * - * @return the supportedRoleTypes value. - */ - List supportedRoleTypes(); - - /** - * Gets the interfaces property: List of network device interfaces. - * - * @return the interfaces value. - */ - List interfaces(); - - /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the provisioningState value. + * @return the systemData value. */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner object. 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/models/NetworkDeviceSkuProperties.java similarity index 65% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkuProperties.java index 01ea8b1bacbe..1ebcf2576e4b 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/models/NetworkDeviceSkuProperties.java @@ -1,26 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; import java.io.IOException; import java.util.List; /** * Network Device SKU Properties defines the properties of the resource. */ -@Fluent +@Immutable public final class NetworkDeviceSkuProperties implements JsonSerializable { /* * Model of the network device. @@ -55,7 +50,7 @@ public final class NetworkDeviceSkuProperties implements JsonSerializable supportedVersions() { return this.supportedVersions; } - /** - * Set the supportedVersions property: List of supported version details of network device. - * - * @param supportedVersions the supportedVersions value to set. - * @return the NetworkDeviceSkuProperties object itself. - */ - public NetworkDeviceSkuProperties withSupportedVersions(List supportedVersions) { - this.supportedVersions = supportedVersions; - return this; - } - /** * Get the supportedRoleTypes property: Available roles for the network device. * @@ -127,17 +89,6 @@ public List supportedRoleTypes() { return this.supportedRoleTypes; } - /** - * Set the supportedRoleTypes property: Available roles for the network device. - * - * @param supportedRoleTypes the supportedRoleTypes value to set. - * @return the NetworkDeviceSkuProperties object itself. - */ - public NetworkDeviceSkuProperties withSupportedRoleTypes(List supportedRoleTypes) { - this.supportedRoleTypes = supportedRoleTypes; - return this; - } - /** * Get the interfaces property: List of network device interfaces. * @@ -147,17 +98,6 @@ public List interfaces() { return this.interfaces; } - /** - * Set the interfaces property: List of network device interfaces. - * - * @param interfaces the interfaces value to set. - * @return the NetworkDeviceSkuProperties object itself. - */ - public NetworkDeviceSkuProperties withInterfaces(List interfaces) { - this.interfaces = interfaces; - return this; - } - /** * Get the provisioningState property: Provisioning state of the resource. * @@ -167,27 +107,6 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (model() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property model in model NetworkDeviceSkuProperties")); - } - if (supportedVersions() != null) { - supportedVersions().forEach(e -> e.validate()); - } - if (interfaces() != null) { - interfaces().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceSkuProperties.class); - /** * {@inheritDoc} */ 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 adfdef9ffcf7..26d3e2a68a92 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkDeviceSkus { /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -27,8 +25,6 @@ public interface NetworkDeviceSkus { Response getWithResponse(String networkDeviceSkuName, Context context); /** - * Gets a Network Device Sku. - * * Get a Network Device SKU details. * * @param networkDeviceSkuName Name of the Network Device SKU. @@ -40,26 +36,22 @@ public interface NetworkDeviceSkus { NetworkDeviceSku get(String networkDeviceSkuName); /** - * 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 Network Device SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDeviceSku list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Device SKUs by subscription. - * * List Network Device SKUs for 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 Network Device SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDeviceSku list operation 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 deleted file mode 100644 index 2bb0e025682d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Network Device SKUs. - */ -@Fluent -public final class NetworkDeviceSkusListResult implements JsonSerializable { - /* - * List of Network Device SKU resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkDeviceSkusListResult class. - */ - public NetworkDeviceSkusListResult() { - } - - /** - * Get the value property: List of Network Device SKU resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Network Device SKU resources. - * - * @param value the value value to set. - * @return the NetworkDeviceSkusListResult object itself. - */ - public NetworkDeviceSkusListResult 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 NetworkDeviceSkusListResult object itself. - */ - public NetworkDeviceSkusListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkDeviceSkusListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkDeviceSkusListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkDeviceSkusListResult. - */ - public static NetworkDeviceSkusListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkDeviceSkusListResult deserializedNetworkDeviceSkusListResult = new NetworkDeviceSkusListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkDeviceSkuInner.fromJson(reader1)); - deserializedNetworkDeviceSkusListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkDeviceSkusListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkDeviceSkusListResult; - }); - } -} 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 cd9cec84af52..689fc29cd36e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkDevices { /** - * Gets a Network Device. - * * Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Gets a Network Device. - * * Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NetworkDevice getByResourceGroup(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteByResourceGroup(String resourceGroupName, String networkDeviceName); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void delete(String resourceGroupName, String networkDeviceName, Context context); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkDevices by resource group. - * * List all the Network Device resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkDevices by subscription. - * * List all the Network Device resources in a 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 NetworkDevices as paginated response with {@link PagedIterable}. + * @return the response of a NetworkDevice list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String networkDeviceName, RebootProperties body); /** - * Implements the operation to the underlying resources. - * * Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -148,14 +128,12 @@ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -163,13 +141,11 @@ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkDeviceName); /** - * Implements the operation to the underlying resources. - * * Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -178,14 +154,12 @@ CommonPostActionResponseForStateUpdate reboot(String resourceGroupName, String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkDeviceName, Context context); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -194,14 +168,12 @@ CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** - * Implements the operation to the underlying resources. - * * Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -211,14 +183,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -227,14 +197,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body); /** - * Implements the operation to the underlying resources. - * * Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -244,14 +212,70 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); /** - * Gets a Network Device. + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body); + + /** + * Run the RO Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceROCommandsOperationStatusResult runRoCommand(String resourceGroupName, + String networkDeviceName, DeviceRoCommand body, Context context); + + /** + * Run the RW Command on the Network Device. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceRWCommands runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body); + + /** + * Run the RW Command on the Network Device. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkDeviceName Name of the Network Device. + * @param body Request the command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + CommonPostActionResponseForDeviceRWCommands runRwCommand(String resourceGroupName, String networkDeviceName, + DeviceRwCommand body, Context context); + + /** * Gets the Network Device resource details. * * @param id the resource ID. @@ -263,8 +287,6 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String NetworkDevice getById(String id); /** - * Gets a Network Device. - * * Gets the Network Device resource details. * * @param id the resource ID. @@ -277,8 +299,6 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param id the resource ID. @@ -289,8 +309,6 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String void deleteById(String id); /** - * Deletes a Network Device. - * * Delete the Network Device resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java deleted file mode 100644 index 35fd5bf70494..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicesListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import java.io.IOException; -import java.util.List; - -/** - * List of NetworkDevices. - */ -@Fluent -public final class NetworkDevicesListResult implements JsonSerializable { - /* - * List of NetworkDevice resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkDevicesListResult class. - */ - public NetworkDevicesListResult() { - } - - /** - * Get the value property: List of NetworkDevice resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of NetworkDevice resources. - * - * @param value the value value to set. - * @return the NetworkDevicesListResult object itself. - */ - public NetworkDevicesListResult 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 NetworkDevicesListResult object itself. - */ - public NetworkDevicesListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkDevicesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkDevicesListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkDevicesListResult. - */ - public static NetworkDevicesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkDevicesListResult deserializedNetworkDevicesListResult = new NetworkDevicesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NetworkDeviceInner.fromJson(reader1)); - deserializedNetworkDevicesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkDevicesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkDevicesListResult; - }); - } -} 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 ba274a1f14bc..afad4151c1df 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; -import java.util.List; import java.util.Map; /** @@ -51,144 +50,25 @@ public interface NetworkFabric { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the - * user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines - * whether it is a single / multi rack Network Fabric. - * - * @return the networkFabricSku value. - */ - String networkFabricSku(); - - /** - * 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. - */ - Integer rackCount(); - - /** - * Gets the serverCountPerRack property: Number of servers.Possible values are from 1-16. - * - * @return the serverCountPerRack value. - */ - int serverCountPerRack(); - - /** - * Gets the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - * - * @return the ipv4Prefix value. - */ - String ipv4Prefix(); - - /** - * Gets the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - * - * @return the ipv6Prefix value. - */ - String ipv6Prefix(); - - /** - * Gets the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @return the fabricAsn value. - */ - long fabricAsn(); - - /** - * Gets the terminalServerConfiguration property: Network and credentials configuration currently applied to - * terminal server. - * - * @return the terminalServerConfiguration value. - */ - TerminalServerConfiguration terminalServerConfiguration(); - - /** - * Gets the managementNetworkConfiguration property: Configuration to be used to setup the management network. - * - * @return the managementNetworkConfiguration value. - */ - ManagementNetworkConfigurationProperties managementNetworkConfiguration(); - - /** - * Gets 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. - */ - List racks(); - - /** - * 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 L3 Isolation Domain resource IDs under the Network Fabric. - * - * @return the l3IsolationDomains value. - */ - List l3IsolationDomains(); - - /** - * Gets the configurationState property: Configuration state of the resource. + * Gets the properties property: The NetworkFabric Properties. * - * @return the configurationState value. + * @return the properties value. */ - ConfigurationState configurationState(); + NetworkFabricProperties properties(); /** - * 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. + * Gets the identity property: The managed service identities assigned to this resource. * - * @return the provisioningState value. + * @return the identity value. */ - ProvisioningState provisioningState(); + ManagedServiceIdentity identity(); /** - * Gets the administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - AdministrativeState administrativeState(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -221,12 +101,8 @@ public interface NetworkFabric { /** * The entirety of the NetworkFabric definition. */ - 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 { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -270,117 +146,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricSku withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the NetworkFabric definition allowing to specify networkFabricSku. - */ - interface WithNetworkFabricSku { - /** - * Specifies the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks. - * Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU - * determines whether it is a single / multi rack Network Fabric.. - * - * @param networkFabricSku Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user - * chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines - * whether it is a single / multi rack Network Fabric. - * @return the next definition stage. - */ - WithNetworkFabricControllerId withNetworkFabricSku(String networkFabricSku); - } - - /** - * 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. - */ - WithServerCountPerRack withNetworkFabricControllerId(String networkFabricControllerId); - } - - /** - * The stage of the NetworkFabric definition 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. - */ - WithIpv4Prefix withServerCountPerRack(int serverCountPerRack); - } - - /** - * The stage of the NetworkFabric definition 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. - */ - WithFabricAsn withIpv4Prefix(String ipv4Prefix); - } - - /** - * The stage of the NetworkFabric definition 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. - */ - WithTerminalServerConfiguration withFabricAsn(long fabricAsn); - } - - /** - * The stage of the NetworkFabric definition allowing to specify terminalServerConfiguration. - */ - interface WithTerminalServerConfiguration { - /** - * Specifies the terminalServerConfiguration property: Network and credentials configuration currently - * applied to terminal server.. - * - * @param terminalServerConfiguration Network and credentials configuration currently applied to terminal - * server. - * @return the next definition stage. - */ - WithManagementNetworkConfiguration - withTerminalServerConfiguration(TerminalServerConfiguration terminalServerConfiguration); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the NetworkFabric definition allowing to specify managementNetworkConfiguration. + * The stage of the NetworkFabric definition allowing to specify properties. */ - interface WithManagementNetworkConfiguration { + interface WithProperties { /** - * Specifies the managementNetworkConfiguration property: Configuration to be used to setup the management - * network.. + * Specifies the properties property: The NetworkFabric Properties. * - * @param managementNetworkConfiguration Configuration to be used to setup the management network. + * @param properties The NetworkFabric Properties. * @return the next definition stage. */ - WithCreate withManagementNetworkConfiguration( - ManagementNetworkConfigurationProperties managementNetworkConfiguration); + WithCreate withProperties(NetworkFabricProperties properties); } /** * 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.WithFabricVersion, - DefinitionStages.WithRackCount, DefinitionStages.WithIpv6Prefix, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -411,55 +197,16 @@ interface WithTags { } /** - * The stage of the NetworkFabric definition allowing to specify fabricVersion. - */ - interface WithFabricVersion { - /** - * Specifies the fabricVersion property: The version of Network Fabric.. - * - * @param fabricVersion The version of Network Fabric. - * @return the next definition stage. - */ - WithCreate withFabricVersion(String fabricVersion); - } - - /** - * The stage of the NetworkFabric definition allowing to specify rackCount. + * The stage of the NetworkFabric definition allowing to specify identity. */ - interface WithRackCount { + interface WithIdentity { /** - * Specifies the rackCount property: Number of compute racks associated to Network Fabric.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param rackCount Number of compute racks associated to Network Fabric. + * @param identity The managed service identities assigned to this resource. * @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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); + WithCreate withIdentity(ManagedServiceIdentity identity); } } @@ -473,10 +220,7 @@ interface WithAnnotation { /** * The template for NetworkFabric update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithRackCount, UpdateStages.WithServerCountPerRack, - UpdateStages.WithIpv4Prefix, UpdateStages.WithIpv6Prefix, UpdateStages.WithFabricAsn, - UpdateStages.WithTerminalServerConfiguration, UpdateStages.WithManagementNetworkConfiguration, - UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIdentity { /** * Executes the update request. * @@ -502,7 +246,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -511,112 +255,29 @@ interface WithTags { } /** - * 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 { - /** - * Specifies the terminalServerConfiguration property: Network and credentials configuration already applied - * to terminal server.. - * - * @param terminalServerConfiguration Network and credentials configuration already applied to terminal - * server. - * @return the next definition stage. - */ - Update withTerminalServerConfiguration( - NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration); - } - - /** - * The stage of the NetworkFabric update allowing to specify managementNetworkConfiguration. + * The stage of the NetworkFabric update allowing to specify properties. */ - interface WithManagementNetworkConfiguration { + interface WithProperties { /** - * Specifies the managementNetworkConfiguration property: Configuration to be used to setup the management - * network.. + * Specifies the properties property: Network Fabric Patch properties.. * - * @param managementNetworkConfiguration Configuration to be used to setup the management network. + * @param properties Network Fabric Patch properties. * @return the next definition stage. */ - Update withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration); + Update withProperties(NetworkFabricPatchProperties properties); } /** - * The stage of the NetworkFabric update allowing to specify annotation. + * The stage of the NetworkFabric update allowing to specify identity. */ - interface WithAnnotation { + interface WithIdentity { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param annotation Switch configuration description. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withIdentity(ManagedServiceIdentityPatch identity); } } @@ -636,69 +297,57 @@ interface WithAnnotation { NetworkFabric refresh(Context context); /** - * Implements the operation to the underlying resources. - * * Provisions 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 device updates. + * @return the response. */ CommonPostActionResponseForDeviceUpdate provision(); /** - * Implements the operation to the underlying resources. - * * Provisions 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 device updates. + * @return the response. */ CommonPostActionResponseForDeviceUpdate provision(Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions 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 device updates. + * @return the response. */ CommonPostActionResponseForDeviceUpdate deprovision(); /** - * Implements the operation to the underlying resources. - * * Deprovisions 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 device updates. + * @return the response. */ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(UpgradeNetworkFabricProperties 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. @@ -706,37 +355,31 @@ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(UpgradeNetworkFabricProperties 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. + * @return the response. */ 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. + * @return the response. */ 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. * @@ -744,13 +387,11 @@ 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. + * @return the response. */ 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. * @@ -759,27 +400,23 @@ 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. + * @return the response. */ 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. + * @return the response. */ 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. @@ -787,27 +424,23 @@ CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. + * @return the response. */ 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. @@ -815,13 +448,11 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Upd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ 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. @@ -831,8 +462,6 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Upd 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. @@ -844,26 +473,131 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Upd 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. + * @return the response. */ 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. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(Context context); + + /** + * Post action: Returns a status of commit batch operation. + * + * @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. + */ + CommitBatchStatusResponse commitBatchStatus(CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. + * + * @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. + */ + CommitBatchStatusResponse commitBatchStatus(CommitBatchStatusRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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. + */ + DiscardCommitBatchResponse discardCommitBatch(DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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. + */ + DiscardCommitBatchResponse discardCommitBatch(DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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. + */ + CommonPostActionResponseForStateUpdate lockFabric(NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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. + */ + CommonPostActionResponseForStateUpdate lockFabric(NetworkFabricLockRequest body, Context context); + + /** + * Post action: Triggers view of network fabric 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. + * @return the response. + */ + ViewDeviceConfigurationResponse viewDeviceConfiguration(); + + /** + * Post action: Triggers view of network fabric 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. + * @return the response. + */ + ViewDeviceConfigurationResponse viewDeviceConfiguration(Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM 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. + * @return the response. + */ + ArmConfigurationDiffResponse armConfigurationDiff(); + + /** + * Post action: Triggers diff of NetworkFabric ARM 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. + * @return the response. + */ + ArmConfigurationDiffResponse armConfigurationDiff(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 782fcca562a0..7076493c2016 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; -import java.util.List; import java.util.Map; /** @@ -51,120 +50,18 @@ public interface NetworkFabricController { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the infrastructureServices property: InfrastructureServices IP ranges. - * - * @return the infrastructureServices value. - */ - ControllerServices infrastructureServices(); - - /** - * Gets the workloadServices property: WorkloadServices IP ranges. - * - * @return the workloadServices value. - */ - ControllerServices workloadServices(); - - /** - * Gets the managedResourceGroupConfiguration property: Managed Resource Group configuration properties. - * - * @return the managedResourceGroupConfiguration value. - */ - ManagedResourceGroupConfiguration managedResourceGroupConfiguration(); - - /** - * Gets the networkFabricIds property: The NF-ID will be an input parameter used by the NF to link and get - * associated with the parent NFC Service. - * - * @return the networkFabricIds value. - */ - List networkFabricIds(); - - /** - * 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. 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. + * Gets the properties property: The NetworkFabricController Properties. * - * @return the ipv4AddressSpace value. + * @return the properties value. */ - String ipv4AddressSpace(); + NetworkFabricControllerProperties properties(); /** - * Gets the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space. - * - * @return the ipv6AddressSpace value. - */ - String ipv6AddressSpace(); - - /** - * Gets the nfcSku property: Network Fabric Controller SKU. - * - * @return the nfcSku value. - */ - NfcSku nfcSku(); - - /** - * 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 infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @return the infrastructureExpressRouteConnections value. - */ - List infrastructureExpressRouteConnections(); - - /** - * Gets the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @return the workloadExpressRouteConnections value. - */ - List workloadExpressRouteConnections(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -198,7 +95,7 @@ public interface NetworkFabricController { * The entirety of the NetworkFabricController definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -242,18 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkFabricController definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The NetworkFabricController Properties. + * + * @param properties The NetworkFabricController Properties. + * @return the next definition stage. + */ + WithCreate withProperties(NetworkFabricControllerProperties properties); } /** * The stage of the NetworkFabricController 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.WithManagedResourceGroupConfiguration, - DefinitionStages.WithIsWorkloadManagementNetworkEnabled, DefinitionStages.WithIpv4AddressSpace, - DefinitionStages.WithIpv6AddressSpace, DefinitionStages.WithNfcSku, - DefinitionStages.WithInfrastructureExpressRouteConnections, - DefinitionStages.WithWorkloadExpressRouteConnections, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -282,128 +188,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - - /** - * The stage of the NetworkFabricController definition allowing to specify managedResourceGroupConfiguration. - */ - interface WithManagedResourceGroupConfiguration { - /** - * Specifies the managedResourceGroupConfiguration property: Managed Resource Group configuration - * properties.. - * - * @param managedResourceGroupConfiguration Managed Resource Group configuration properties. - * @return the next definition stage. - */ - 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 { - /** - * Specifies the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space.. - * - * @param ipv4AddressSpace IPv4 Network Fabric Controller Address Space. - * @return the next definition stage. - */ - WithCreate withIpv4AddressSpace(String ipv4AddressSpace); - } - - /** - * The stage of the NetworkFabricController definition allowing to specify ipv6AddressSpace. - */ - interface WithIpv6AddressSpace { - /** - * Specifies the ipv6AddressSpace property: IPv6 Network Fabric Controller Address Space.. - * - * @param ipv6AddressSpace IPv6 Network Fabric Controller Address Space. - * @return the next definition stage. - */ - 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. - */ - interface WithInfrastructureExpressRouteConnections { - /** - * Specifies the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure - * ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated - * for Infrastructure services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - * Infrastructure services. (This is a Mandatory attribute). - * @return the next definition stage. - */ - WithCreate withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections); - } - - /** - * The stage of the NetworkFabricController definition allowing to specify workloadExpressRouteConnections. - */ - interface WithWorkloadExpressRouteConnections { - /** - * Specifies the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload - * services. (This is a Mandatory attribute).. - * - * @param workloadExpressRouteConnections As part of an update, the workload ExpressRoute CircuitID should - * be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This - * is a Mandatory attribute). - * @return the next definition stage. - */ - WithCreate withWorkloadExpressRouteConnections( - List workloadExpressRouteConnections); - } - - /** - * The stage of the NetworkFabricController 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); - } } /** @@ -416,8 +200,7 @@ interface WithAnnotation { /** * The template for NetworkFabricController update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithInfrastructureExpressRouteConnections, - UpdateStages.WithWorkloadExpressRouteConnections { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -443,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -452,39 +235,16 @@ interface WithTags { } /** - * The stage of the NetworkFabricController update allowing to specify infrastructureExpressRouteConnections. - */ - interface WithInfrastructureExpressRouteConnections { - /** - * Specifies the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure - * ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated - * for Infrastructure services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - * Infrastructure services. (This is a Mandatory attribute). - * @return the next definition stage. - */ - Update withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections); - } - - /** - * The stage of the NetworkFabricController update allowing to specify workloadExpressRouteConnections. + * The stage of the NetworkFabricController update allowing to specify properties. */ - interface WithWorkloadExpressRouteConnections { + interface WithProperties { /** - * Specifies the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload - * services. (This is a Mandatory attribute).. + * Specifies the properties property: Network Fabric Controller patch properties.. * - * @param workloadExpressRouteConnections As part of an update, the workload ExpressRoute CircuitID should - * be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This - * is a Mandatory attribute). + * @param properties Network Fabric Controller patch properties. * @return the next definition stage. */ - Update withWorkloadExpressRouteConnections( - List workloadExpressRouteConnections); + Update withProperties(NetworkFabricControllerPatchProperties properties); } } 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 9b9481b5380d..764aca45645a 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 @@ -1,29 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerPatchableProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** - * Network Fabric Controller patch parameters - * * The Network Fabric Controller Patch payload definition. */ @Fluent -public final class NetworkFabricControllerPatch extends TagsUpdate { +public final class NetworkFabricControllerPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Network Fabric Controller patch properties. */ - private NetworkFabricControllerPatchableProperties innerProperties; + private NetworkFabricControllerPatchProperties properties; /** * Creates an instance of NetworkFabricControllerPatch class. @@ -32,99 +34,53 @@ public NetworkFabricControllerPatch() { } /** - * Get the innerProperties property: Network Fabric Controller patch properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. - */ - private NetworkFabricControllerPatchableProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} + * @return the tags value. */ - @Override - public NetworkFabricControllerPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). + * Set the tags property: Resource tags. * - * @return the infrastructureExpressRouteConnections value. - */ - public List infrastructureExpressRouteConnections() { - return this.innerProperties() == null ? null : this.innerProperties().infrastructureExpressRouteConnections(); - } - - /** - * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. + * @param tags the tags value to set. * @return the NetworkFabricControllerPatch object itself. */ - public NetworkFabricControllerPatch withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerPatchableProperties(); - } - this.innerProperties().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections); + public NetworkFabricControllerPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). + * Get the properties property: Network Fabric Controller patch properties. * - * @return the workloadExpressRouteConnections value. + * @return the properties value. */ - public List workloadExpressRouteConnections() { - return this.innerProperties() == null ? null : this.innerProperties().workloadExpressRouteConnections(); + public NetworkFabricControllerPatchProperties properties() { + return this.properties; } /** - * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). + * Set the properties property: Network Fabric Controller patch properties. * - * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. + * @param properties the properties value to set. * @return the NetworkFabricControllerPatch object itself. */ - public NetworkFabricControllerPatch - withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricControllerPatchableProperties(); - } - this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections); + public NetworkFabricControllerPatch withProperties(NetworkFabricControllerPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -145,10 +101,10 @@ public static NetworkFabricControllerPatch fromJson(JsonReader jsonReader) throw if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNetworkFabricControllerPatch.withTags(tags); + deserializedNetworkFabricControllerPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNetworkFabricControllerPatch.innerProperties - = NetworkFabricControllerPatchableProperties.fromJson(reader); + deserializedNetworkFabricControllerPatch.properties + = NetworkFabricControllerPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatchProperties.java similarity index 69% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatchProperties.java index fb530dae14bd..90ca6c1da8ed 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatchProperties.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import java.io.IOException; import java.util.List; /** - * Network Fabric Controller updatable properties. + * Network Fabric Controller patch properties. */ @Fluent -public class NetworkFabricControllerPatchableProperties - implements JsonSerializable { +public final class NetworkFabricControllerPatchProperties + implements JsonSerializable { /* * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. * This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) @@ -32,9 +31,9 @@ public class NetworkFabricControllerPatchableProperties private List workloadExpressRouteConnections; /** - * Creates an instance of NetworkFabricControllerPatchableProperties class. + * Creates an instance of NetworkFabricControllerPatchProperties class. */ - public NetworkFabricControllerPatchableProperties() { + public NetworkFabricControllerPatchProperties() { } /** @@ -54,9 +53,9 @@ public List infrastructureExpressRouteConnect * services. (This is a Mandatory attribute). * * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. - * @return the NetworkFabricControllerPatchableProperties object itself. + * @return the NetworkFabricControllerPatchProperties object itself. */ - public NetworkFabricControllerPatchableProperties withInfrastructureExpressRouteConnections( + public NetworkFabricControllerPatchProperties withInfrastructureExpressRouteConnections( List infrastructureExpressRouteConnections) { this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; return this; @@ -79,28 +78,14 @@ public List workloadExpressRouteConnections() * a Mandatory attribute). * * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. - * @return the NetworkFabricControllerPatchableProperties object itself. + * @return the NetworkFabricControllerPatchProperties object itself. */ - public NetworkFabricControllerPatchableProperties + public NetworkFabricControllerPatchProperties withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { this.workloadExpressRouteConnections = workloadExpressRouteConnections; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (infrastructureExpressRouteConnections() != null) { - infrastructureExpressRouteConnections().forEach(e -> e.validate()); - } - if (workloadExpressRouteConnections() != null) { - workloadExpressRouteConnections().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -115,17 +100,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of NetworkFabricControllerPatchableProperties from the JsonReader. + * Reads an instance of NetworkFabricControllerPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricControllerPatchableProperties if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricControllerPatchableProperties. + * @return An instance of NetworkFabricControllerPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkFabricControllerPatchProperties. */ - public static NetworkFabricControllerPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static NetworkFabricControllerPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NetworkFabricControllerPatchableProperties deserializedNetworkFabricControllerPatchableProperties - = new NetworkFabricControllerPatchableProperties(); + NetworkFabricControllerPatchProperties deserializedNetworkFabricControllerPatchProperties + = new NetworkFabricControllerPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -133,19 +118,19 @@ public static NetworkFabricControllerPatchableProperties fromJson(JsonReader jso if ("infrastructureExpressRouteConnections".equals(fieldName)) { List infrastructureExpressRouteConnections = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerPatchableProperties.infrastructureExpressRouteConnections + deserializedNetworkFabricControllerPatchProperties.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; } else if ("workloadExpressRouteConnections".equals(fieldName)) { List workloadExpressRouteConnections = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerPatchableProperties.workloadExpressRouteConnections + deserializedNetworkFabricControllerPatchProperties.workloadExpressRouteConnections = workloadExpressRouteConnections; } else { reader.skipChildren(); } } - return deserializedNetworkFabricControllerPatchableProperties; + return deserializedNetworkFabricControllerPatchProperties; }); } } 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/models/NetworkFabricControllerProperties.java similarity index 85% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerProperties.java index 2d47a5ee69d7..da61f93de26d 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/models/NetworkFabricControllerProperties.java @@ -1,20 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.IsWorkloadManagementNetworkEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -22,7 +16,24 @@ * NetworkFabricControllerProperties defines the resource properties. */ @Fluent -public final class NetworkFabricControllerProperties extends AnnotationResource { +public final class NetworkFabricControllerProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. + * This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) + */ + private List infrastructureExpressRouteConnections; + + /* + * As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This + * Express route is dedicated for Workload services. (This is a Mandatory attribute). + */ + private List workloadExpressRouteConnections; + /* * InfrastructureServices IP ranges. */ @@ -43,13 +54,6 @@ public final class NetworkFabricControllerProperties extends AnnotationResource */ private List networkFabricIds; - /* - * A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated - * for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. This is used for - * the backward compatibility. - */ - 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. @@ -76,28 +80,91 @@ public final class NetworkFabricControllerProperties extends AnnotationResource */ private NfcSku nfcSku; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * 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. */ private ProvisioningState provisioningState; - /* - * As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. - * This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute) + /** + * Creates an instance of NetworkFabricControllerProperties class. */ - private List infrastructureExpressRouteConnections; + public NetworkFabricControllerProperties() { + } - /* - * As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This - * Express route is dedicated for Workload services. (This is a Mandatory attribute). + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. */ - private List workloadExpressRouteConnections; + public String annotation() { + return this.annotation; + } /** - * Creates an instance of NetworkFabricControllerProperties class. + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkFabricControllerProperties object itself. */ - public NetworkFabricControllerProperties() { + public NetworkFabricControllerProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @return the infrastructureExpressRouteConnections value. + */ + public List infrastructureExpressRouteConnections() { + return this.infrastructureExpressRouteConnections; + } + + /** + * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute + * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure + * services. (This is a Mandatory attribute). + * + * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. + * @return the NetworkFabricControllerProperties object itself. + */ + public NetworkFabricControllerProperties withInfrastructureExpressRouteConnections( + List infrastructureExpressRouteConnections) { + this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; + return this; + } + + /** + * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @return the workloadExpressRouteConnections value. + */ + public List workloadExpressRouteConnections() { + return this.workloadExpressRouteConnections; + } + + /** + * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID + * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is + * a Mandatory attribute). + * + * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. + * @return the NetworkFabricControllerProperties object itself. + */ + public NetworkFabricControllerProperties + withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { + this.workloadExpressRouteConnections = workloadExpressRouteConnections; + return this; } /** @@ -149,17 +216,6 @@ public List networkFabricIds() { return this.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. This is used for the backward compatibility. - * - * @return the workloadManagementNetwork value. - */ - 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 @@ -254,6 +310,15 @@ public NetworkFabricControllerProperties withNfcSku(NfcSku nfcSku) { return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * 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 @@ -265,96 +330,17 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @return the infrastructureExpressRouteConnections value. - */ - public List infrastructureExpressRouteConnections() { - return this.infrastructureExpressRouteConnections; - } - - /** - * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute - * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure - * services. (This is a Mandatory attribute). - * - * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set. - * @return the NetworkFabricControllerProperties object itself. - */ - public NetworkFabricControllerProperties withInfrastructureExpressRouteConnections( - List infrastructureExpressRouteConnections) { - this.infrastructureExpressRouteConnections = infrastructureExpressRouteConnections; - return this; - } - - /** - * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @return the workloadExpressRouteConnections value. - */ - public List workloadExpressRouteConnections() { - return this.workloadExpressRouteConnections; - } - - /** - * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID - * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is - * a Mandatory attribute). - * - * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set. - * @return the NetworkFabricControllerProperties object itself. - */ - public NetworkFabricControllerProperties - withWorkloadExpressRouteConnections(List workloadExpressRouteConnections) { - this.workloadExpressRouteConnections = workloadExpressRouteConnections; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NetworkFabricControllerProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (infrastructureServices() != null) { - infrastructureServices().validate(); - } - if (workloadServices() != null) { - workloadServices().validate(); - } - if (managedResourceGroupConfiguration() != null) { - managedResourceGroupConfiguration().validate(); - } - if (infrastructureExpressRouteConnections() != null) { - infrastructureExpressRouteConnections().forEach(e -> e.validate()); - } - if (workloadExpressRouteConnections() != null) { - workloadExpressRouteConnections().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeArrayField("infrastructureExpressRouteConnections", this.infrastructureExpressRouteConnections, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("workloadExpressRouteConnections", this.workloadExpressRouteConnections, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("managedResourceGroupConfiguration", this.managedResourceGroupConfiguration); jsonWriter.writeStringField("isWorkloadManagementNetworkEnabled", this.isWorkloadManagementNetworkEnabled == null @@ -363,10 +349,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("ipv4AddressSpace", this.ipv4AddressSpace); jsonWriter.writeStringField("ipv6AddressSpace", this.ipv6AddressSpace); jsonWriter.writeStringField("nfcSku", this.nfcSku == null ? null : this.nfcSku.toString()); - jsonWriter.writeArrayField("infrastructureExpressRouteConnections", this.infrastructureExpressRouteConnections, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("workloadExpressRouteConnections", this.workloadExpressRouteConnections, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -387,7 +369,17 @@ public static NetworkFabricControllerProperties fromJson(JsonReader jsonReader) reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkFabricControllerProperties.withAnnotation(reader.getString()); + deserializedNetworkFabricControllerProperties.annotation = reader.getString(); + } else if ("infrastructureExpressRouteConnections".equals(fieldName)) { + List infrastructureExpressRouteConnections + = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); + deserializedNetworkFabricControllerProperties.infrastructureExpressRouteConnections + = infrastructureExpressRouteConnections; + } else if ("workloadExpressRouteConnections".equals(fieldName)) { + List workloadExpressRouteConnections + = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); + deserializedNetworkFabricControllerProperties.workloadExpressRouteConnections + = workloadExpressRouteConnections; } else if ("infrastructureServices".equals(fieldName)) { deserializedNetworkFabricControllerProperties.infrastructureServices = ControllerServices.fromJson(reader); @@ -400,9 +392,6 @@ public static NetworkFabricControllerProperties fromJson(JsonReader jsonReader) } else if ("networkFabricIds".equals(fieldName)) { List networkFabricIds = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkFabricControllerProperties.networkFabricIds = networkFabricIds; - } else if ("workloadManagementNetwork".equals(fieldName)) { - deserializedNetworkFabricControllerProperties.workloadManagementNetwork - = reader.getNullable(JsonReader::getBoolean); } else if ("isWorkloadManagementNetworkEnabled".equals(fieldName)) { deserializedNetworkFabricControllerProperties.isWorkloadManagementNetworkEnabled = IsWorkloadManagementNetworkEnabled.fromString(reader.getString()); @@ -415,19 +404,12 @@ public static NetworkFabricControllerProperties fromJson(JsonReader jsonReader) deserializedNetworkFabricControllerProperties.ipv6AddressSpace = reader.getString(); } else if ("nfcSku".equals(fieldName)) { deserializedNetworkFabricControllerProperties.nfcSku = NfcSku.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkFabricControllerProperties.lastOperation + = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkFabricControllerProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("infrastructureExpressRouteConnections".equals(fieldName)) { - List infrastructureExpressRouteConnections - = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerProperties.infrastructureExpressRouteConnections - = infrastructureExpressRouteConnections; - } else if ("workloadExpressRouteConnections".equals(fieldName)) { - List workloadExpressRouteConnections - = reader.readArray(reader1 -> ExpressRouteConnectionInformation.fromJson(reader1)); - deserializedNetworkFabricControllerProperties.workloadExpressRouteConnections - = workloadExpressRouteConnections; } else { reader.skipChildren(); } 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 d3481ce8da48..31c68d75480e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkFabricControllers { /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resource String networkFabricControllerName, Context context); /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resource NetworkFabricController getByResourceGroup(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resource void deleteByResourceGroup(String resourceGroupName, String networkFabricControllerName); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,18 @@ Response getByResourceGroupWithResponse(String resource void delete(String resourceGroupName, String networkFabricControllerName, Context context); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkFabricControllers by resource group. - * * Lists all the NetworkFabricControllers thats available in the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +81,34 @@ Response getByResourceGroupWithResponse(String 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 list of Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkFabricControllers by subscription. - * * Lists all the NetworkFabricControllers by 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 Network Fabric Controllers as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricController list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param id the resource ID. @@ -134,8 +120,6 @@ Response getByResourceGroupWithResponse(String resource NetworkFabricController getById(String id); /** - * Gets a Network Fabric Controller. - * * Shows the provisioning status of Network Fabric Controller. * * @param id the resource ID. @@ -148,8 +132,6 @@ Response getByResourceGroupWithResponse(String resource Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param id the resource ID. @@ -160,8 +142,6 @@ Response getByResourceGroupWithResponse(String resource void deleteById(String id); /** - * Deletes a Network Fabric Controller. - * * Deletes the Network Fabric Controller resource. * * @param id the resource ID. 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 deleted file mode 100644 index 690a61bea3ee..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Network Fabric Controllers. - */ -@Fluent -public final class NetworkFabricControllersListResult implements JsonSerializable { - /* - * List of Network Fabric Controller resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkFabricControllersListResult class. - */ - public NetworkFabricControllersListResult() { - } - - /** - * Get the value property: List of Network Fabric Controller resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Network Fabric Controller resources. - * - * @param value the value value to set. - * @return the NetworkFabricControllersListResult object itself. - */ - public NetworkFabricControllersListResult 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 NetworkFabricControllersListResult object itself. - */ - public NetworkFabricControllersListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricControllersListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricControllersListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricControllersListResult. - */ - public static NetworkFabricControllersListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricControllersListResult deserializedNetworkFabricControllersListResult - = new NetworkFabricControllersListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkFabricControllerInner.fromJson(reader1)); - deserializedNetworkFabricControllersListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkFabricControllersListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricControllersListResult; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java new file mode 100644 index 000000000000..d209b2a01b8f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network fabric lock action. + */ +public final class NetworkFabricLockAction extends ExpandableStringEnum { + /** + * Perform lock operation. + */ + public static final NetworkFabricLockAction LOCK = fromString("Lock"); + + /** + * Perform unlock operation. + */ + public static final NetworkFabricLockAction UNLOCK = fromString("Unlock"); + + /** + * Creates a new instance of NetworkFabricLockAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkFabricLockAction() { + } + + /** + * Creates or finds a NetworkFabricLockAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkFabricLockAction. + */ + public static NetworkFabricLockAction fromString(String name) { + return fromString(name, NetworkFabricLockAction.class); + } + + /** + * Gets known NetworkFabricLockAction values. + * + * @return known NetworkFabricLockAction values. + */ + public static Collection values() { + return values(NetworkFabricLockAction.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java new file mode 100644 index 000000000000..a6fcd03a5cab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Fabric Lock Request. + */ +@Fluent +public final class NetworkFabricLockRequest implements JsonSerializable { + /* + * Type of lock to be applied + */ + private NetworkFabricLockType lockType; + + /* + * Action to be performed on the lock + */ + private NetworkFabricLockAction action; + + /** + * Creates an instance of NetworkFabricLockRequest class. + */ + public NetworkFabricLockRequest() { + } + + /** + * Get the lockType property: Type of lock to be applied. + * + * @return the lockType value. + */ + public NetworkFabricLockType lockType() { + return this.lockType; + } + + /** + * Set the lockType property: Type of lock to be applied. + * + * @param lockType the lockType value to set. + * @return the NetworkFabricLockRequest object itself. + */ + public NetworkFabricLockRequest withLockType(NetworkFabricLockType lockType) { + this.lockType = lockType; + return this; + } + + /** + * Get the action property: Action to be performed on the lock. + * + * @return the action value. + */ + public NetworkFabricLockAction action() { + return this.action; + } + + /** + * Set the action property: Action to be performed on the lock. + * + * @param action the action value to set. + * @return the NetworkFabricLockRequest object itself. + */ + public NetworkFabricLockRequest withAction(NetworkFabricLockAction action) { + this.action = action; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lockType", this.lockType == null ? null : this.lockType.toString()); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricLockRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricLockRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkFabricLockRequest. + */ + public static NetworkFabricLockRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricLockRequest deserializedNetworkFabricLockRequest = new NetworkFabricLockRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lockType".equals(fieldName)) { + deserializedNetworkFabricLockRequest.lockType + = NetworkFabricLockType.fromString(reader.getString()); + } else if ("action".equals(fieldName)) { + deserializedNetworkFabricLockRequest.action + = NetworkFabricLockAction.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricLockRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java new file mode 100644 index 000000000000..56801da1ce27 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Network fabric lock type. + */ +public final class NetworkFabricLockType extends ExpandableStringEnum { + /** + * A administrative lock/unlock operation will be performed. + */ + public static final NetworkFabricLockType ADMINISTRATIVE = fromString("Administrative"); + + /** + * A lock/unlock operation will be performed on the configuration. + */ + public static final NetworkFabricLockType CONFIGURATION = fromString("Configuration"); + + /** + * Creates a new instance of NetworkFabricLockType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkFabricLockType() { + } + + /** + * Creates or finds a NetworkFabricLockType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkFabricLockType. + */ + public static NetworkFabricLockType fromString(String name) { + return fromString(name, NetworkFabricLockType.class); + } + + /** + * Gets known NetworkFabricLockType values. + * + * @return known NetworkFabricLockType values. + */ + public static Collection values() { + return values(NetworkFabricLockType.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 index 03df946e6b32..fce631a95b16 100644 --- 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricPatchProperties; import java.io.IOException; import java.util.Map; @@ -16,244 +16,97 @@ * The Network Fabric resource definition. */ @Fluent -public final class NetworkFabricPatch extends TagsUpdate { +public final class NetworkFabricPatch implements JsonSerializable { /* - * Network Fabric Patch 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. + * Resource tags. */ - public NetworkFabricPatch withServerCountPerRack(Integer serverCountPerRack) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricPatchProperties(); - } - this.innerProperties().withServerCountPerRack(serverCountPerRack); - return this; - } + private Map tags; - /** - * 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. + /* + * Network Fabric Patch properties. */ - public NetworkFabricPatch withIpv6Prefix(String ipv6Prefix) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricPatchProperties(); - } - this.innerProperties().withIpv6Prefix(ipv6Prefix); - return this; - } + private NetworkFabricPatchProperties properties; - /** - * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @return the fabricAsn value. + /* + * The managed service identities assigned to this resource. */ - public Long fabricAsn() { - return this.innerProperties() == null ? null : this.innerProperties().fabricAsn(); - } + private ManagedServiceIdentityPatch identity; /** - * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @param fabricAsn the fabricAsn value to set. - * @return the NetworkFabricPatch object itself. + * Creates an instance of NetworkFabricPatch class. */ - public NetworkFabricPatch withFabricAsn(Long fabricAsn) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricPatchProperties(); - } - this.innerProperties().withFabricAsn(fabricAsn); - return this; + public NetworkFabricPatch() { } /** - * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. + * Get the tags property: Resource tags. * - * @return the terminalServerConfiguration value. + * @return the tags value. */ - public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().terminalServerConfiguration(); + public Map tags() { + return this.tags; } /** - * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. + * Set the tags property: Resource tags. * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. + * @param tags the tags 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); + public NetworkFabricPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * Get the properties property: Network Fabric Patch properties. * - * @return the managementNetworkConfiguration value. + * @return the properties value. */ - public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().managementNetworkConfiguration(); + public NetworkFabricPatchProperties properties() { + return this.properties; } /** - * Set the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * Set the properties property: Network Fabric Patch properties. * - * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. + * @param properties the properties 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); + public NetworkFabricPatch withProperties(NetworkFabricPatchProperties properties) { + this.properties = properties; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the identity property: The managed service identities assigned to this resource. * - * @return the annotation value. + * @return the identity value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public ManagedServiceIdentityPatch identity() { + return this.identity; } /** - * Set the annotation property: Switch configuration description. + * Set the identity property: The managed service identities assigned to this resource. * - * @param annotation the annotation value to set. + * @param identity the identity 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); + public NetworkFabricPatch withIdentity(ManagedServiceIdentityPatch identity) { + this.identity = identity; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -274,9 +127,11 @@ public static NetworkFabricPatch fromJson(JsonReader jsonReader) throws IOExcept if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNetworkFabricPatch.withTags(tags); + deserializedNetworkFabricPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNetworkFabricPatch.innerProperties = NetworkFabricPatchProperties.fromJson(reader); + deserializedNetworkFabricPatch.properties = NetworkFabricPatchProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetworkFabricPatch.identity = ManagedServiceIdentityPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchProperties.java new file mode 100644 index 000000000000..f4faaa12e93a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchProperties.java @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Network Fabric Patch properties. + */ +@Fluent +public final class NetworkFabricPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Number of compute racks associated to Network Fabric. + */ + private Integer rackCount; + + /* + * Number of servers.Possible values are from 1-16. + */ + private Integer serverCountPerRack; + + /* + * IPv4Prefix for Management Network. Example: 10.1.0.0/19. + */ + private String ipv4Prefix; + + /* + * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + */ + private String ipv6Prefix; + + /* + * ASN of CE devices for CE/PE connectivity. + */ + private Long fabricASN; + + /* + * Bring your own storage account configurations for Network Fabric. + */ + private StorageAccountPatchConfiguration storageAccountConfiguration; + + /* + * Network and credentials configuration already applied to terminal server. + */ + private TerminalServerPatchConfiguration terminalServerConfiguration; + + /* + * Configuration to be used to setup the management network. + */ + private ManagementNetworkPatchConfiguration managementNetworkConfiguration; + + /* + * Hardware alert threshold percentage. Possible values are from 20 to 100. + */ + private Integer hardwareAlertThreshold; + + /* + * Control Plane Access Control List ARM resource IDs. + */ + private List controlPlaneAcls; + + /* + * Trusted IP Prefix ARM resource IDs. + */ + private List trustedIpPrefixes; + + /* + * Unique Route Distinguisher configuration + */ + private UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration; + + /** + * Creates an instance of NetworkFabricPatchProperties class. + */ + public NetworkFabricPatchProperties() { + } + + /** + * 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 NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * 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 storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @return the storageAccountConfiguration value. + */ + public StorageAccountPatchConfiguration storageAccountConfiguration() { + return this.storageAccountConfiguration; + } + + /** + * Set the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @param storageAccountConfiguration the storageAccountConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties + withStorageAccountConfiguration(StorageAccountPatchConfiguration storageAccountConfiguration) { + this.storageAccountConfiguration = storageAccountConfiguration; + return this; + } + + /** + * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. + * + * @return the terminalServerConfiguration value. + */ + public TerminalServerPatchConfiguration 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(TerminalServerPatchConfiguration terminalServerConfiguration) { + this.terminalServerConfiguration = terminalServerConfiguration; + return this; + } + + /** + * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * + * @return the managementNetworkConfiguration value. + */ + public ManagementNetworkPatchConfiguration 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(ManagementNetworkPatchConfiguration managementNetworkConfiguration) { + this.managementNetworkConfiguration = managementNetworkConfiguration; + return this; + } + + /** + * Get the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @return the hardwareAlertThreshold value. + */ + public Integer hardwareAlertThreshold() { + return this.hardwareAlertThreshold; + } + + /** + * Set the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @param hardwareAlertThreshold the hardwareAlertThreshold value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + this.hardwareAlertThreshold = hardwareAlertThreshold; + return this; + } + + /** + * Get the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + public List controlPlaneAcls() { + return this.controlPlaneAcls; + } + + /** + * Set the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @param controlPlaneAcls the controlPlaneAcls value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withControlPlaneAcls(List controlPlaneAcls) { + this.controlPlaneAcls = controlPlaneAcls; + return this; + } + + /** + * Get the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + public List trustedIpPrefixes() { + return this.trustedIpPrefixes; + } + + /** + * Set the trustedIpPrefixes property: Trusted IP Prefix ARM resource IDs. + * + * @param trustedIpPrefixes the trustedIpPrefixes value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withTrustedIpPrefixes(List trustedIpPrefixes) { + this.trustedIpPrefixes = trustedIpPrefixes; + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration() { + return this.uniqueRdConfiguration; + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties + withUniqueRdConfiguration(UniqueRouteDistinguisherPatchProperties uniqueRdConfiguration) { + this.uniqueRdConfiguration = uniqueRdConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeNumberField("rackCount", this.rackCount); + jsonWriter.writeNumberField("serverCountPerRack", this.serverCountPerRack); + jsonWriter.writeStringField("ipv4Prefix", this.ipv4Prefix); + jsonWriter.writeStringField("ipv6Prefix", this.ipv6Prefix); + jsonWriter.writeNumberField("fabricASN", this.fabricASN); + jsonWriter.writeJsonField("storageAccountConfiguration", this.storageAccountConfiguration); + jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); + jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); + jsonWriter.writeNumberField("hardwareAlertThreshold", this.hardwareAlertThreshold); + jsonWriter.writeArrayField("controlPlaneAcls", this.controlPlaneAcls, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("trustedIpPrefixes", this.trustedIpPrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("uniqueRdConfiguration", this.uniqueRdConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkFabricPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkFabricPatchProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkFabricPatchProperties. + */ + public static NetworkFabricPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkFabricPatchProperties deserializedNetworkFabricPatchProperties = new NetworkFabricPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.annotation = reader.getString(); + } else if ("rackCount".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.rackCount = reader.getNullable(JsonReader::getInt); + } else if ("serverCountPerRack".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.serverCountPerRack + = reader.getNullable(JsonReader::getInt); + } else if ("ipv4Prefix".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.ipv4Prefix = reader.getString(); + } else if ("ipv6Prefix".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.ipv6Prefix = reader.getString(); + } else if ("fabricASN".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.fabricASN = reader.getNullable(JsonReader::getLong); + } else if ("storageAccountConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.storageAccountConfiguration + = StorageAccountPatchConfiguration.fromJson(reader); + } else if ("terminalServerConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.terminalServerConfiguration + = TerminalServerPatchConfiguration.fromJson(reader); + } else if ("managementNetworkConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.managementNetworkConfiguration + = ManagementNetworkPatchConfiguration.fromJson(reader); + } else if ("hardwareAlertThreshold".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.hardwareAlertThreshold + = reader.getNullable(JsonReader::getInt); + } else if ("controlPlaneAcls".equals(fieldName)) { + List controlPlaneAcls = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricPatchProperties.controlPlaneAcls = controlPlaneAcls; + } else if ("trustedIpPrefixes".equals(fieldName)) { + List trustedIpPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricPatchProperties.trustedIpPrefixes = trustedIpPrefixes; + } else if ("uniqueRdConfiguration".equals(fieldName)) { + deserializedNetworkFabricPatchProperties.uniqueRdConfiguration + = UniqueRouteDistinguisherPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkFabricPatchProperties; + }); + } +} 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 deleted file mode 100644 index 47452ffa4d8e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network Fabric updatable properties. - */ -@Fluent -public class NetworkFabricPatchableProperties implements JsonSerializable { - /* - * Number of compute racks associated to Network Fabric. - */ - private Integer rackCount; - - /* - * Number of servers.Possible values are from 1-16. - */ - private Integer serverCountPerRack; - - /* - * IPv4Prefix for Management Network. Example: 10.1.0.0/19. - */ - private String ipv4Prefix; - - /* - * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - */ - private String ipv6Prefix; - - /* - * ASN of CE devices for CE/PE connectivity. - */ - private Long fabricAsn; - - /* - * Network and credentials configuration already applied to terminal server. - */ - private NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration; - - /* - * Configuration to be used to setup the management network. - */ - private ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration; - - /** - * Creates an instance of NetworkFabricPatchableProperties class. - */ - public NetworkFabricPatchableProperties() { - } - - /** - * 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. - * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. - * @return the NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties 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 NetworkFabricPatchableProperties object itself. - */ - public NetworkFabricPatchableProperties withManagementNetworkConfiguration( - ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { - this.managementNetworkConfiguration = managementNetworkConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (terminalServerConfiguration() != null) { - terminalServerConfiguration().validate(); - } - if (managementNetworkConfiguration() != null) { - managementNetworkConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("rackCount", this.rackCount); - jsonWriter.writeNumberField("serverCountPerRack", this.serverCountPerRack); - jsonWriter.writeStringField("ipv4Prefix", this.ipv4Prefix); - jsonWriter.writeStringField("ipv6Prefix", this.ipv6Prefix); - jsonWriter.writeNumberField("fabricASN", this.fabricAsn); - jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); - jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricPatchableProperties. - */ - public static NetworkFabricPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricPatchableProperties deserializedNetworkFabricPatchableProperties - = new NetworkFabricPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rackCount".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.rackCount = reader.getNullable(JsonReader::getInt); - } else if ("serverCountPerRack".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.serverCountPerRack - = reader.getNullable(JsonReader::getInt); - } else if ("ipv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.ipv4Prefix = reader.getString(); - } else if ("ipv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.ipv6Prefix = reader.getString(); - } else if ("fabricASN".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.fabricAsn = reader.getNullable(JsonReader::getLong); - } else if ("terminalServerConfiguration".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.terminalServerConfiguration - = NetworkFabricPatchablePropertiesTerminalServerConfiguration.fromJson(reader); - } else if ("managementNetworkConfiguration".equals(fieldName)) { - deserializedNetworkFabricPatchableProperties.managementNetworkConfiguration - = ManagementNetworkConfigurationPatchableProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricPatchableProperties; - }); - } -} 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 deleted file mode 100644 index fd502c41a351..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network and credentials configuration already applied to terminal server. - */ -@Fluent -public final class NetworkFabricPatchablePropertiesTerminalServerConfiguration - extends TerminalServerPatchableProperties { - /* - * IPv4 Address Prefix. - */ - private String primaryIpv4Prefix; - - /* - * IPv6 Address Prefix. - */ - private String primaryIpv6Prefix; - - /* - * Secondary IPv4 Address Prefix. - */ - private String secondaryIpv4Prefix; - - /* - * Secondary IPv6 Address Prefix. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", username()); - jsonWriter.writeStringField("password", password()); - jsonWriter.writeStringField("serialNumber", serialNumber()); - jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); - jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); - jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * NetworkFabricPatchablePropertiesTerminalServerConfiguration. - */ - public static NetworkFabricPatchablePropertiesTerminalServerConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricPatchablePropertiesTerminalServerConfiguration deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - = new NetworkFabricPatchablePropertiesTerminalServerConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - .withUsername(reader.getString()); - } else if ("password".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - .withPassword(reader.getString()); - } else if ("serialNumber".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration - .withSerialNumber(reader.getString()); - } else if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.primaryIpv4Prefix - = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.primaryIpv6Prefix - = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.secondaryIpv4Prefix - = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration.secondaryIpv6Prefix - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricPatchablePropertiesTerminalServerConfiguration; - }); - } -} 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/models/NetworkFabricProperties.java similarity index 60% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricProperties.java index 414b33c3fce9..adf7f4335946 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/models/NetworkFabricProperties.java @@ -1,20 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.ManagementNetworkConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; import java.io.IOException; import java.util.List; @@ -22,7 +16,12 @@ * Network Fabric Properties defines the properties of the resource. */ @Fluent -public final class NetworkFabricProperties extends AnnotationResource { +public final class NetworkFabricProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only * supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack @@ -40,6 +39,16 @@ public final class NetworkFabricProperties extends AnnotationResource { */ private List routerIds; + /* + * Bring your own storage account configurations for Network Fabric. + */ + private StorageAccountConfiguration storageAccountConfiguration; + + /* + * Network Fabric Lock details + */ + private List fabricLocks; + /* * Azure resource ID for the NetworkFabricController the NetworkFabric belongs. */ @@ -68,7 +77,7 @@ public final class NetworkFabricProperties extends AnnotationResource { /* * ASN of CE devices for CE/PE connectivity. */ - private long fabricAsn; + private long fabricASN; /* * Network and credentials configuration currently applied to terminal server. @@ -96,6 +105,46 @@ public final class NetworkFabricProperties extends AnnotationResource { */ private List l3IsolationDomains; + /* + * Hardware alert threshold percentage. Possible values are from 20 to 100. + */ + private Integer hardwareAlertThreshold; + + /* + * Control Plane Access Control List ARM resource IDs. + */ + private List controlPlaneAcls; + + /* + * Feature flag status information + */ + private List featureFlags; + + /* + * Trusted IP Prefixes ARM resource IDs. + */ + private List trustedIpPrefixes; + + /* + * Unique Route Distinguisher configuration + */ + private UniqueRouteDistinguisherProperties uniqueRdConfiguration; + + /* + * Number of Storage arrays associated with the Network Fabric. + */ + private Integer storageArrayCount; + + /* + * Active commit batch identifiers + */ + private List activeCommitBatches; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -118,6 +167,26 @@ public final class NetworkFabricProperties extends AnnotationResource { public NetworkFabricProperties() { } + /** + * 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 NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the networkFabricSku property: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user * chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it @@ -171,6 +240,36 @@ public List routerIds() { return this.routerIds; } + /** + * Get the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @return the storageAccountConfiguration value. + */ + public StorageAccountConfiguration storageAccountConfiguration() { + return this.storageAccountConfiguration; + } + + /** + * Set the storageAccountConfiguration property: Bring your own storage account configurations for Network Fabric. + * + * @param storageAccountConfiguration the storageAccountConfiguration value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties + withStorageAccountConfiguration(StorageAccountConfiguration storageAccountConfiguration) { + this.storageAccountConfiguration = storageAccountConfiguration; + return this; + } + + /** + * Get the fabricLocks property: Network Fabric Lock details. + * + * @return the fabricLocks value. + */ + public List fabricLocks() { + return this.fabricLocks; + } + /** * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric * belongs. @@ -274,22 +373,22 @@ public NetworkFabricProperties withIpv6Prefix(String ipv6Prefix) { } /** - * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * Get the fabricASN property: ASN of CE devices for CE/PE connectivity. * - * @return the fabricAsn value. + * @return the fabricASN value. */ - public long fabricAsn() { - return this.fabricAsn; + public long fabricASN() { + return this.fabricASN; } /** - * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * Set the fabricASN property: ASN of CE devices for CE/PE connectivity. * - * @param fabricAsn the fabricAsn value to set. + * @param fabricASN the fabricASN value to set. * @return the NetworkFabricProperties object itself. */ - public NetworkFabricProperties withFabricAsn(long fabricAsn) { - this.fabricAsn = fabricAsn; + public NetworkFabricProperties withFabricASN(long fabricASN) { + this.fabricASN = fabricASN; return this; } @@ -365,6 +464,133 @@ public List l3IsolationDomains() { return this.l3IsolationDomains; } + /** + * Get the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @return the hardwareAlertThreshold value. + */ + public Integer hardwareAlertThreshold() { + return this.hardwareAlertThreshold; + } + + /** + * Set the hardwareAlertThreshold property: Hardware alert threshold percentage. Possible values are from 20 to 100. + * + * @param hardwareAlertThreshold the hardwareAlertThreshold value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withHardwareAlertThreshold(Integer hardwareAlertThreshold) { + this.hardwareAlertThreshold = hardwareAlertThreshold; + return this; + } + + /** + * Get the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @return the controlPlaneAcls value. + */ + public List controlPlaneAcls() { + return this.controlPlaneAcls; + } + + /** + * Set the controlPlaneAcls property: Control Plane Access Control List ARM resource IDs. + * + * @param controlPlaneAcls the controlPlaneAcls value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withControlPlaneAcls(List controlPlaneAcls) { + this.controlPlaneAcls = controlPlaneAcls; + return this; + } + + /** + * Get the featureFlags property: Feature flag status information. + * + * @return the featureFlags value. + */ + public List featureFlags() { + return this.featureFlags; + } + + /** + * Get the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @return the trustedIpPrefixes value. + */ + public List trustedIpPrefixes() { + return this.trustedIpPrefixes; + } + + /** + * Set the trustedIpPrefixes property: Trusted IP Prefixes ARM resource IDs. + * + * @param trustedIpPrefixes the trustedIpPrefixes value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withTrustedIpPrefixes(List trustedIpPrefixes) { + this.trustedIpPrefixes = trustedIpPrefixes; + return this; + } + + /** + * Get the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @return the uniqueRdConfiguration value. + */ + public UniqueRouteDistinguisherProperties uniqueRdConfiguration() { + return this.uniqueRdConfiguration; + } + + /** + * Set the uniqueRdConfiguration property: Unique Route Distinguisher configuration. + * + * @param uniqueRdConfiguration the uniqueRdConfiguration value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withUniqueRdConfiguration(UniqueRouteDistinguisherProperties uniqueRdConfiguration) { + this.uniqueRdConfiguration = uniqueRdConfiguration; + return this; + } + + /** + * Get the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @return the storageArrayCount value. + */ + public Integer storageArrayCount() { + return this.storageArrayCount; + } + + /** + * Set the storageArrayCount property: Number of Storage arrays associated with the Network Fabric. + * + * @param storageArrayCount the storageArrayCount value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withStorageArrayCount(Integer storageArrayCount) { + this.storageArrayCount = storageArrayCount; + return this; + } + + /** + * Get the activeCommitBatches property: Active commit batch identifiers. + * + * @return the activeCommitBatches value. + */ + public List activeCommitBatches() { + return this.activeCommitBatches; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -394,72 +620,31 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * {@inheritDoc} - */ - @Override - public NetworkFabricProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkFabricSku() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricSku in model NetworkFabricProperties")); - } - if (networkFabricControllerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricControllerId in model NetworkFabricProperties")); - } - if (ipv4Prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipv4Prefix in model NetworkFabricProperties")); - } - if (terminalServerConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property terminalServerConfiguration in model NetworkFabricProperties")); - } else { - terminalServerConfiguration().validate(); - } - if (managementNetworkConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property managementNetworkConfiguration in model NetworkFabricProperties")); - } else { - managementNetworkConfiguration().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("networkFabricSku", this.networkFabricSku); jsonWriter.writeStringField("networkFabricControllerId", this.networkFabricControllerId); jsonWriter.writeIntField("serverCountPerRack", this.serverCountPerRack); jsonWriter.writeStringField("ipv4Prefix", this.ipv4Prefix); - jsonWriter.writeLongField("fabricASN", this.fabricAsn); + jsonWriter.writeLongField("fabricASN", this.fabricASN); jsonWriter.writeJsonField("terminalServerConfiguration", this.terminalServerConfiguration); jsonWriter.writeJsonField("managementNetworkConfiguration", this.managementNetworkConfiguration); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("fabricVersion", this.fabricVersion); + jsonWriter.writeJsonField("storageAccountConfiguration", this.storageAccountConfiguration); jsonWriter.writeNumberField("rackCount", this.rackCount); jsonWriter.writeStringField("ipv6Prefix", this.ipv6Prefix); + jsonWriter.writeNumberField("hardwareAlertThreshold", this.hardwareAlertThreshold); + jsonWriter.writeArrayField("controlPlaneAcls", this.controlPlaneAcls, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("trustedIpPrefixes", this.trustedIpPrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("uniqueRdConfiguration", this.uniqueRdConfiguration); + jsonWriter.writeNumberField("storageArrayCount", this.storageArrayCount); return jsonWriter.writeEndObject(); } @@ -479,9 +664,7 @@ public static NetworkFabricProperties fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkFabricProperties.withAnnotation(reader.getString()); - } else if ("networkFabricSku".equals(fieldName)) { + if ("networkFabricSku".equals(fieldName)) { deserializedNetworkFabricProperties.networkFabricSku = reader.getString(); } else if ("networkFabricControllerId".equals(fieldName)) { deserializedNetworkFabricProperties.networkFabricControllerId = reader.getString(); @@ -490,18 +673,27 @@ public static NetworkFabricProperties fromJson(JsonReader jsonReader) throws IOE } else if ("ipv4Prefix".equals(fieldName)) { deserializedNetworkFabricProperties.ipv4Prefix = reader.getString(); } else if ("fabricASN".equals(fieldName)) { - deserializedNetworkFabricProperties.fabricAsn = reader.getLong(); + deserializedNetworkFabricProperties.fabricASN = reader.getLong(); } else if ("terminalServerConfiguration".equals(fieldName)) { deserializedNetworkFabricProperties.terminalServerConfiguration = TerminalServerConfiguration.fromJson(reader); } else if ("managementNetworkConfiguration".equals(fieldName)) { deserializedNetworkFabricProperties.managementNetworkConfiguration = ManagementNetworkConfigurationProperties.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedNetworkFabricProperties.annotation = reader.getString(); } else if ("fabricVersion".equals(fieldName)) { deserializedNetworkFabricProperties.fabricVersion = reader.getString(); } else if ("routerIds".equals(fieldName)) { List routerIds = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkFabricProperties.routerIds = routerIds; + } else if ("storageAccountConfiguration".equals(fieldName)) { + deserializedNetworkFabricProperties.storageAccountConfiguration + = StorageAccountConfiguration.fromJson(reader); + } else if ("fabricLocks".equals(fieldName)) { + List fabricLocks + = reader.readArray(reader1 -> FabricLockProperties.fromJson(reader1)); + deserializedNetworkFabricProperties.fabricLocks = fabricLocks; } else if ("rackCount".equals(fieldName)) { deserializedNetworkFabricProperties.rackCount = reader.getNullable(JsonReader::getInt); } else if ("ipv6Prefix".equals(fieldName)) { @@ -515,6 +707,28 @@ public static NetworkFabricProperties fromJson(JsonReader jsonReader) throws IOE } else if ("l3IsolationDomains".equals(fieldName)) { List l3IsolationDomains = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkFabricProperties.l3IsolationDomains = l3IsolationDomains; + } else if ("hardwareAlertThreshold".equals(fieldName)) { + deserializedNetworkFabricProperties.hardwareAlertThreshold = reader.getNullable(JsonReader::getInt); + } else if ("controlPlaneAcls".equals(fieldName)) { + List controlPlaneAcls = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricProperties.controlPlaneAcls = controlPlaneAcls; + } else if ("featureFlags".equals(fieldName)) { + List featureFlags + = reader.readArray(reader1 -> FeatureFlagProperties.fromJson(reader1)); + deserializedNetworkFabricProperties.featureFlags = featureFlags; + } else if ("trustedIpPrefixes".equals(fieldName)) { + List trustedIpPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricProperties.trustedIpPrefixes = trustedIpPrefixes; + } else if ("uniqueRdConfiguration".equals(fieldName)) { + deserializedNetworkFabricProperties.uniqueRdConfiguration + = UniqueRouteDistinguisherProperties.fromJson(reader); + } else if ("storageArrayCount".equals(fieldName)) { + deserializedNetworkFabricProperties.storageArrayCount = reader.getNullable(JsonReader::getInt); + } else if ("activeCommitBatches".equals(fieldName)) { + List activeCommitBatches = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkFabricProperties.activeCommitBatches = activeCommitBatches; + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkFabricProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkFabricProperties.configurationState = ConfigurationState.fromString(reader.getString()); 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 9b0709f77ded..968da5fe8e43 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 @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; 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. @@ -34,54 +33,18 @@ public interface NetworkFabricSku { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the typePropertiesType property: Type of Network Fabric SKU. - * - * @return the typePropertiesType value. - */ - FabricSkuType typePropertiesType(); - - /** - * 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 maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. + * Gets the properties property: The Network Fabric Sku properties. * - * @return the maximumServerCount value. + * @return the properties value. */ - Integer maximumServerCount(); + NetworkFabricSkuProperties properties(); /** - * Gets the supportedVersions property: List of supported Network Fabric SKU versions. - * - * @return the supportedVersions value. - */ - List supportedVersions(); - - /** - * Gets the details property: URL providing detailed configuration of the fabric SKU. - * - * @return the details value. - */ - String details(); - - /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the provisioningState value. + * @return the systemData value. */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner object. 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/models/NetworkFabricSkuProperties.java similarity index 78% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkuProperties.java index f49bcc9ec4aa..d32620ffcfd7 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/models/NetworkFabricSkuProperties.java @@ -1,23 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; /** * Network Fabric SKU Properties define properties of the resource. */ -@Fluent +@Immutable public final class NetworkFabricSkuProperties implements JsonSerializable { /* * Type of Network Fabric SKU. @@ -53,7 +51,7 @@ public final class NetworkFabricSkuProperties implements JsonSerializable getWithResponse(String networkFabricSkuName, Context context); /** - * Gets a Network Fabric Sku. - * * Implements Network Fabric SKU GET method. * * @param networkFabricSkuName Name of the Network Fabric SKU. @@ -40,26 +36,22 @@ public interface NetworkFabricSkus { NetworkFabricSku get(String networkFabricSkuName); /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricSku list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Fabric SKUs by subscription. - * * 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 Network Fabric SKUs as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabricSku list operation 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 deleted file mode 100644 index 221fa8a19552..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Network Fabric SKUs. - */ -@Fluent -public final class NetworkFabricSkusListResult implements JsonSerializable { - /* - * List of Network Fabric SKU resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkFabricSkusListResult class. - */ - public NetworkFabricSkusListResult() { - } - - /** - * Get the value property: List of Network Fabric SKU resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Network Fabric SKU resources. - * - * @param value the value value to set. - * @return the NetworkFabricSkusListResult object itself. - */ - public NetworkFabricSkusListResult 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 NetworkFabricSkusListResult object itself. - */ - public NetworkFabricSkusListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricSkusListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricSkusListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricSkusListResult. - */ - public static NetworkFabricSkusListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricSkusListResult deserializedNetworkFabricSkusListResult = new NetworkFabricSkusListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkFabricSkuInner.fromJson(reader1)); - deserializedNetworkFabricSkusListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkFabricSkusListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricSkusListResult; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java index aae3b650440d..23393c81d116 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class NetworkFabricUpgradeAction extends ExpandableStringEnum { /** - * Static value Start for NetworkFabricUpgradeAction. + * UpgradeAction-Start. */ public static final NetworkFabricUpgradeAction START = fromString("Start"); /** - * Static value Complete for NetworkFabricUpgradeAction. + * UpgradeAction -Complete. */ public static final NetworkFabricUpgradeAction COMPLETE = fromString("Complete"); 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 fe663cbb7e2d..1c28fe220775 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkFabrics { /** - * Gets a Network Fabric. - * * Get Network Fabric resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Gets a Network Fabric. - * * Get Network Fabric resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, NetworkFabric getByResourceGroup(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void deleteByResourceGroup(String resourceGroupName, String networkFabricName); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, void delete(String resourceGroupName, String networkFabricName, Context context); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Fabrics by resource group. - * * List all the Network Fabric resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Fabrics by subscription. - * * List all the Network Fabric 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 Network Fabrics as paginated response with {@link PagedIterable}. + * @return the response of a NetworkFabric list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -130,13 +112,11 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -145,14 +125,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -160,13 +138,11 @@ CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName); /** - * Implements the operation to the underlying resources. - * * Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,14 +151,12 @@ CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -191,14 +165,12 @@ CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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. @@ -208,14 +180,12 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String networkFabricName, UpgradeNetworkFabricProperties 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. @@ -223,13 +193,11 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -238,14 +206,12 @@ CommonPostActionResponseForStateUpdate upgrade(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. * @@ -255,14 +221,12 @@ CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. * @@ -273,14 +237,12 @@ CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -289,14 +251,12 @@ CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -306,14 +266,12 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -322,14 +280,12 @@ CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ 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. @@ -339,14 +295,12 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ 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. @@ -359,8 +313,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St 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. @@ -374,8 +326,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St 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. @@ -383,13 +333,11 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -398,14 +346,151 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String networkFabricName, Context context); /** - * Gets a Network Fabric. + * Post action: Returns a status of commit batch operation. + * + * @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 response. + */ + CommitBatchStatusResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body); + + /** + * Post action: Returns a status of commit batch operation. * + * @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 response. + */ + CommitBatchStatusResponse commitBatchStatus(String resourceGroupName, String networkFabricName, + CommitBatchStatusRequest body, Context context); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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 response. + */ + DiscardCommitBatchResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body); + + /** + * Post action: Discards a Batch operation in progress. + * + * @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 response. + */ + DiscardCommitBatchResponse discardCommitBatch(String resourceGroupName, String networkFabricName, + DiscardCommitBatchRequest body, Context context); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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 response. + */ + CommonPostActionResponseForStateUpdate lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body); + + /** + * Post action: Triggers network fabric lock operation. + * + * @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 response. + */ + CommonPostActionResponseForStateUpdate lockFabric(String resourceGroupName, String networkFabricName, + NetworkFabricLockRequest body, Context context); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @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 response. + */ + ViewDeviceConfigurationResponse viewDeviceConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers view of network fabric configuration. + * + * @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 response. + */ + ViewDeviceConfigurationResponse viewDeviceConfiguration(String resourceGroupName, String networkFabricName, + Context context); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @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 response. + */ + ArmConfigurationDiffResponse armConfigurationDiff(String resourceGroupName, String networkFabricName); + + /** + * Post action: Triggers diff of NetworkFabric ARM Configuration. + * + * @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 response. + */ + ArmConfigurationDiffResponse armConfigurationDiff(String resourceGroupName, String networkFabricName, + Context context); + + /** * Get Network Fabric resource details. * * @param id the resource ID. @@ -417,8 +502,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN NetworkFabric getById(String id); /** - * Gets a Network Fabric. - * * Get Network Fabric resource details. * * @param id the resource ID. @@ -431,8 +514,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param id the resource ID. @@ -443,8 +524,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes a Network Fabric. - * * Delete Network Fabric resource. * * @param id the resource ID. 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 deleted file mode 100644 index 609cdbd62d29..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Network Fabrics. - */ -@Fluent -public final class NetworkFabricsListResult implements JsonSerializable { - /* - * List of Network Fabric resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkFabricsListResult class. - */ - public NetworkFabricsListResult() { - } - - /** - * Get the value property: List of Network Fabric resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Network Fabric resources. - * - * @param value the value value to set. - * @return the NetworkFabricsListResult object itself. - */ - public NetworkFabricsListResult 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 NetworkFabricsListResult object itself. - */ - public NetworkFabricsListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkFabricsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkFabricsListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkFabricsListResult. - */ - public static NetworkFabricsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkFabricsListResult deserializedNetworkFabricsListResult = new NetworkFabricsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NetworkFabricInner.fromJson(reader1)); - deserializedNetworkFabricsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkFabricsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkFabricsListResult; - }); - } -} 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 63c4f2ec0782..851a2b6afd85 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -34,67 +34,18 @@ public interface NetworkInterface { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the physicalIdentifier property: Physical Identifier of the network interface. - * - * @return the physicalIdentifier value. - */ - String physicalIdentifier(); - - /** - * Gets the connectedTo property: The ARM resource id of the interface or compute server its connected to. - * - * @return the connectedTo value. - */ - String connectedTo(); - - /** - * Gets the interfaceType property: The Interface Type. Example: Management/Data. - * - * @return the interfaceType value. - */ - InterfaceType interfaceType(); - - /** - * Gets the ipv4Address property: IPv4Address of the interface. - * - * @return the ipv4Address value. - */ - String ipv4Address(); - - /** - * Gets the ipv6Address property: IPv6Address of the interface. - * - * @return the ipv6Address value. - */ - String ipv6Address(); - - /** - * Gets the provisioningState property: Provisioning state of the resource. + * Gets the properties property: The NetworkInterface properties. * - * @return the provisioningState value. + * @return the properties value. */ - ProvisioningState provisioningState(); + NetworkInterfaceProperties properties(); /** - * Gets the administrativeState property: Administrative state of the resource. - * - * @return the administrativeState value. - */ - AdministrativeState administrativeState(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -113,8 +64,8 @@ public interface NetworkInterface { /** * The entirety of the NetworkInterface definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -138,14 +89,27 @@ interface WithParentResource { * @param networkDeviceName Name of the Network Device. * @return the next definition stage. */ - WithCreate withExistingNetworkDevice(String resourceGroupName, String networkDeviceName); + WithProperties withExistingNetworkDevice(String resourceGroupName, String networkDeviceName); + } + + /** + * The stage of the NetworkInterface definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The NetworkInterface properties. + * + * @param properties The NetworkInterface properties. + * @return the next definition stage. + */ + WithCreate withProperties(NetworkInterfaceProperties properties); } /** * The stage of the NetworkInterface 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.WithAnnotation { + interface WithCreate { /** * Executes the create request. * @@ -161,19 +125,6 @@ interface WithCreate extends DefinitionStages.WithAnnotation { */ NetworkInterface create(Context context); } - - /** - * The stage of the NetworkInterface 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); - } } /** @@ -186,7 +137,7 @@ interface WithAnnotation { /** * The template for NetworkInterface update. */ - interface Update extends UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -208,16 +159,16 @@ interface Update extends UpdateStages.WithAnnotation { */ interface UpdateStages { /** - * The stage of the NetworkInterface update allowing to specify annotation. + * The stage of the NetworkInterface update allowing to specify properties. */ - interface WithAnnotation { + interface WithProperties { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the properties property: Network Interface Patch properties.. * - * @param annotation Switch configuration description. + * @param properties Network Interface Patch properties. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withProperties(NetworkInterfacePatchProperties properties); } } @@ -237,21 +188,17 @@ interface WithAnnotation { NetworkInterface refresh(Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param body Request payload. @@ -259,7 +206,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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java index ea9ff540fe3d..6e6dbc157f4e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfacePatchProperties; import java.io.IOException; /** @@ -20,7 +19,7 @@ public final class NetworkInterfacePatch implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Description of the interface. + */ + private String description; + + /* + * Additional description of the interface. + */ + private String additionalDescription; + + /** + * Creates an instance of NetworkInterfacePatchProperties class. + */ + public NetworkInterfacePatchProperties() { + } + + /** + * 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 NetworkInterfacePatchProperties object itself. + */ + public NetworkInterfacePatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the description property: Description of the interface. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the interface. + * + * @param description the description value to set. + * @return the NetworkInterfacePatchProperties object itself. + */ + public NetworkInterfacePatchProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. + */ + public String additionalDescription() { + return this.additionalDescription; + } + + /** + * Set the additionalDescription property: Additional description of the interface. + * + * @param additionalDescription the additionalDescription value to set. + * @return the NetworkInterfacePatchProperties object itself. + */ + public NetworkInterfacePatchProperties withAdditionalDescription(String additionalDescription) { + this.additionalDescription = additionalDescription; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("additionalDescription", this.additionalDescription); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkInterfacePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkInterfacePatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkInterfacePatchProperties. + */ + public static NetworkInterfacePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkInterfacePatchProperties deserializedNetworkInterfacePatchProperties + = new NetworkInterfacePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkInterfacePatchProperties.annotation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedNetworkInterfacePatchProperties.description = reader.getString(); + } else if ("additionalDescription".equals(fieldName)) { + deserializedNetworkInterfacePatchProperties.additionalDescription = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkInterfacePatchProperties; + }); + } +} 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/models/NetworkInterfaceProperties.java similarity index 61% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaceProperties.java index 364d731026fc..fce6954f89fa 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/models/NetworkInterfaceProperties.java @@ -1,24 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; /** * Network Interface Properties defines the properties of the resource. */ @Fluent -public final class NetworkInterfaceProperties extends AnnotationResource { +public final class NetworkInterfaceProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Physical Identifier of the network interface. */ @@ -44,6 +46,21 @@ public final class NetworkInterfaceProperties extends AnnotationResource { */ private String ipv6Address; + /* + * Description of the interface. + */ + private String description; + + /* + * Additional description of the interface. + */ + private String additionalDescription; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ @@ -60,6 +77,26 @@ public final class NetworkInterfaceProperties extends AnnotationResource { public NetworkInterfaceProperties() { } + /** + * 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 NetworkInterfaceProperties object itself. + */ + public NetworkInterfaceProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the physicalIdentifier property: Physical Identifier of the network interface. * @@ -106,39 +143,70 @@ public String ipv6Address() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the description property: Description of the interface. * - * @return the provisioningState value. + * @return the description value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String description() { + return this.description; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the description property: Description of the interface. * - * @return the administrativeState value. + * @param description the description value to set. + * @return the NetworkInterfaceProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public NetworkInterfaceProperties withDescription(String description) { + this.description = description; + return this; } /** - * {@inheritDoc} + * Get the additionalDescription property: Additional description of the interface. + * + * @return the additionalDescription value. */ - @Override - public NetworkInterfaceProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public String additionalDescription() { + return this.additionalDescription; + } + + /** + * Set the additionalDescription property: Additional description of the interface. + * + * @param additionalDescription the additionalDescription value to set. + * @return the NetworkInterfaceProperties object itself. + */ + public NetworkInterfaceProperties withAdditionalDescription(String additionalDescription) { + this.additionalDescription = additionalDescription; return this; } /** - * Validates the instance. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the lastOperation value. */ - @Override - public void validate() { + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * 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; } /** @@ -147,7 +215,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("additionalDescription", this.additionalDescription); return jsonWriter.writeEndObject(); } @@ -167,7 +237,7 @@ public static NetworkInterfaceProperties fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkInterfaceProperties.withAnnotation(reader.getString()); + deserializedNetworkInterfaceProperties.annotation = reader.getString(); } else if ("physicalIdentifier".equals(fieldName)) { deserializedNetworkInterfaceProperties.physicalIdentifier = reader.getString(); } else if ("connectedTo".equals(fieldName)) { @@ -178,6 +248,12 @@ public static NetworkInterfaceProperties fromJson(JsonReader jsonReader) throws deserializedNetworkInterfaceProperties.ipv4Address = reader.getString(); } else if ("ipv6Address".equals(fieldName)) { deserializedNetworkInterfaceProperties.ipv6Address = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedNetworkInterfaceProperties.description = reader.getString(); + } else if ("additionalDescription".equals(fieldName)) { + deserializedNetworkInterfaceProperties.additionalDescription = reader.getString(); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkInterfaceProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkInterfaceProperties.provisioningState = ProvisioningState.fromString(reader.getString()); 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 421f900b0692..bfa851d94169 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkInterfaces { /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String netw String networkInterfaceName, Context context); /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -45,8 +41,6 @@ Response getWithResponse(String resourceGroupName, String netw NetworkInterface get(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -59,8 +53,6 @@ Response getWithResponse(String resourceGroupName, String netw void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -74,8 +66,6 @@ Response getWithResponse(String resourceGroupName, String netw void delete(String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -83,13 +73,11 @@ Response getWithResponse(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName); /** - * List all Network Interfaces that are available using an Network Device. - * * List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -98,14 +86,12 @@ Response getWithResponse(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkInterface list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName, Context context); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -115,14 +101,12 @@ PagedIterable listByNetworkDevice(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body); /** - * Updates the admin state of the network interface. - * * Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -133,14 +117,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context); /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param id the resource ID. @@ -152,8 +134,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource NetworkInterface getById(String id); /** - * Gets a NetworkInterface. - * * Get the Network Interface resource details. * * @param id the resource ID. @@ -166,8 +146,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource Response getByIdWithResponse(String id, Context context); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param id the resource ID. @@ -178,8 +156,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource void deleteById(String id); /** - * Deletes a NetworkInterface. - * * Delete the Network Interface resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.java deleted file mode 100644 index e30a59e8bcd0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacesList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import java.io.IOException; -import java.util.List; - -/** - * List of NetworkInterfaces. - */ -@Fluent -public final class NetworkInterfacesList implements JsonSerializable { - /* - * List of NetworkInterfaces resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkInterfacesList class. - */ - public NetworkInterfacesList() { - } - - /** - * Get the value property: List of NetworkInterfaces resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of NetworkInterfaces resources. - * - * @param value the value value to set. - * @return the NetworkInterfacesList object itself. - */ - public NetworkInterfacesList 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 NetworkInterfacesList object itself. - */ - public NetworkInterfacesList 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkInterfacesList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkInterfacesList if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkInterfacesList. - */ - public static NetworkInterfacesList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkInterfacesList deserializedNetworkInterfacesList = new NetworkInterfacesList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkInterfaceInner.fromJson(reader1)); - deserializedNetworkInterfacesList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkInterfacesList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkInterfacesList; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java new file mode 100644 index 000000000000..b449532a5730 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.NetworkMonitorInner; +import java.util.Map; + +/** + * An immutable client-side representation of NetworkMonitor. + */ +public interface NetworkMonitor { + /** + * 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 properties property: The NetworkFabric Properties. + * + * @return the properties value. + */ + NetworkMonitorProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.NetworkMonitorInner object. + * + * @return the inner object. + */ + NetworkMonitorInner innerModel(); + + /** + * The entirety of the NetworkMonitor definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The NetworkMonitor definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NetworkMonitor definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the NetworkMonitor 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 NetworkMonitor 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. + */ + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkMonitor definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The NetworkFabric Properties. + * + * @param properties The NetworkFabric Properties. + * @return the next definition stage. + */ + WithCreate withProperties(NetworkMonitorProperties properties); + } + + /** + * The stage of the NetworkMonitor 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. + */ + NetworkMonitor create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkMonitor create(Context context); + } + + /** + * The stage of the NetworkMonitor 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 NetworkMonitor resource. + * + * @return the stage of resource update. + */ + NetworkMonitor.Update update(); + + /** + * The template for NetworkMonitor update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkMonitor apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkMonitor apply(Context context); + } + + /** + * The NetworkMonitor update stages. + */ + interface UpdateStages { + /** + * The stage of the NetworkMonitor 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 NetworkMonitor update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Network Monitor Patch properties.. + * + * @param properties Network Monitor Patch properties. + * @return the next definition stage. + */ + Update withProperties(NetworkMonitorPatchProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkMonitor refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkMonitor refresh(Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @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. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @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. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java new file mode 100644 index 000000000000..723171df99a2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The Network Monitor Patch resource definition. + */ +@Fluent +public final class NetworkMonitorPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * Network Monitor Patch properties. + */ + private NetworkMonitorPatchProperties properties; + + /** + * Creates an instance of NetworkMonitorPatch class. + */ + public NetworkMonitorPatch() { + } + + /** + * 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 NetworkMonitorPatch object itself. + */ + public NetworkMonitorPatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: Network Monitor Patch properties. + * + * @return the properties value. + */ + public NetworkMonitorPatchProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Network Monitor Patch properties. + * + * @param properties the properties value to set. + * @return the NetworkMonitorPatch object itself. + */ + public NetworkMonitorPatch withProperties(NetworkMonitorPatchProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkMonitorPatch. + */ + public static NetworkMonitorPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorPatch deserializedNetworkMonitorPatch = new NetworkMonitorPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetworkMonitorPatch.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedNetworkMonitorPatch.properties = NetworkMonitorPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatchProperties.java new file mode 100644 index 000000000000..3fea776704d2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatchProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Network Monitor Patch Properties. + */ +@Fluent +public final class NetworkMonitorPatchProperties implements JsonSerializable { + /* + * BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + */ + private BmpConfigurationPatchProperties bmpConfiguration; + + /** + * Creates an instance of NetworkMonitorPatchProperties class. + */ + public NetworkMonitorPatchProperties() { + } + + /** + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * + * @return the bmpConfiguration value. + */ + public BmpConfigurationPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the NetworkMonitorPatchProperties object itself. + */ + public NetworkMonitorPatchProperties withBmpConfiguration(BmpConfigurationPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorPatchProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkMonitorPatchProperties. + */ + public static NetworkMonitorPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorPatchProperties deserializedNetworkMonitorPatchProperties + = new NetworkMonitorPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bmpConfiguration".equals(fieldName)) { + deserializedNetworkMonitorPatchProperties.bmpConfiguration + = BmpConfigurationPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorProperties.java new file mode 100644 index 000000000000..1ade1eef1483 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorProperties.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network Monitor Properties defines the properties of the resource. + */ +@Fluent +public final class NetworkMonitorProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * BMP Configurations for the Network Fabric. + */ + private BmpConfigurationProperties bmpConfiguration; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + + /* + * Configuration state of the resource. + */ + private ConfigurationState configurationState; + + /* + * Provides you the latest status of the NetworkMonitor resource + */ + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + private AdministrativeState administrativeState; + + /** + * Creates an instance of NetworkMonitorProperties class. + */ + public NetworkMonitorProperties() { + } + + /** + * 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 NetworkMonitorProperties object itself. + */ + public NetworkMonitorProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @return the bmpConfiguration value. + */ + public BmpConfigurationProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BMP Configurations for the Network Fabric. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the NetworkMonitorProperties object itself. + */ + public NetworkMonitorProperties withBmpConfiguration(BmpConfigurationProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * 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 NetworkMonitor 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkMonitorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkMonitorProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkMonitorProperties. + */ + public static NetworkMonitorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkMonitorProperties deserializedNetworkMonitorProperties = new NetworkMonitorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkMonitorProperties.annotation = reader.getString(); + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedNetworkMonitorProperties.bmpConfiguration = BmpConfigurationProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkMonitorProperties.lastOperation = LastOperationProperties.fromJson(reader); + } else if ("configurationState".equals(fieldName)) { + deserializedNetworkMonitorProperties.configurationState + = ConfigurationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedNetworkMonitorProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNetworkMonitorProperties.administrativeState + = AdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkMonitorProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java new file mode 100644 index 000000000000..3254de166600 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 NetworkMonitors. + */ +public interface NetworkMonitors { + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String networkMonitorName, + Context context); + + /** + * Implements NetworkMonitor GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkMonitor resource definition. + */ + NetworkMonitor getByResourceGroup(String resourceGroupName, String networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 networkMonitorName); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 networkMonitorName, Context context); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Displays NetworkMonitors 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 the response of a NetworkMonitor list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body); + + /** + * Enables isolation domain across the fabric or on specified racks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkMonitorName Name of the Network Monitor. + * @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. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, + String networkMonitorName, UpdateAdministrativeState body, Context context); + + /** + * Implements NetworkMonitor 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 NetworkMonitor resource definition along with {@link Response}. + */ + NetworkMonitor getById(String id); + + /** + * Implements NetworkMonitor 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 NetworkMonitor resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @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 layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + * + * @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 NetworkMonitor resource. + * + * @param name resource name. + * @return the first stage of the new NetworkMonitor definition. + */ + NetworkMonitor.DefinitionStages.Blank define(String name); +} 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 index 79b59fa5d58d..3d0e28d09ce8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ 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; /** @@ -51,54 +50,18 @@ public interface NetworkPacketBroker { 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. + * Gets the properties property: The NetworkPacketBroker properties. * - * @return the networkFabricId value. + * @return the properties value. */ - String networkFabricId(); + NetworkPacketBrokerProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the provisioningState value. + * @return the systemData value. */ - ProvisioningState provisioningState(); + SystemData systemData(); /** * Gets the region of the resource. @@ -132,7 +95,7 @@ public interface NetworkPacketBroker { * The entirety of the NetworkPacketBroker definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -176,20 +139,20 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the NetworkPacketBroker definition allowing to specify networkFabricId. + * The stage of the NetworkPacketBroker definition allowing to specify properties. */ - interface WithNetworkFabricId { + interface WithProperties { /** - * Specifies the networkFabricId property: ARM resource ID of the Network Fabric.. + * Specifies the properties property: The NetworkPacketBroker properties. * - * @param networkFabricId ARM resource ID of the Network Fabric. + * @param properties The NetworkPacketBroker properties. * @return the next definition stage. */ - WithCreate withNetworkFabricId(String networkFabricId); + WithCreate withProperties(NetworkPacketBrokerProperties properties); } /** @@ -263,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. 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 index a2bf291f8b69..7dbfd9244a55 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,12 @@ * The NetworkPacketBroker patch resource definition. */ @Fluent -public final class NetworkPacketBrokerPatch extends TagsUpdate { +public final class NetworkPacketBrokerPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /** * Creates an instance of NetworkPacketBrokerPatch class. */ @@ -23,21 +29,23 @@ public NetworkPacketBrokerPatch() { } /** - * {@inheritDoc} + * Get the tags property: Resource tags. + * + * @return the tags value. */ - @Override - public NetworkPacketBrokerPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Validates the instance. + * Set the tags property: Resource tags. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param tags the tags value to set. + * @return the NetworkPacketBrokerPatch object itself. */ - @Override - public void validate() { + public NetworkPacketBrokerPatch withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -46,7 +54,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -67,7 +75,7 @@ public static NetworkPacketBrokerPatch fromJson(JsonReader jsonReader) throws IO if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNetworkPacketBrokerPatch.withTags(tags); + deserializedNetworkPacketBrokerPatch.tags = tags; } else { reader.skipChildren(); } 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/models/NetworkPacketBrokerProperties.java similarity index 89% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerProperties.java index 6a8d9522f6d2..2e6a4d4adee4 100644 --- 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/models/NetworkPacketBrokerProperties.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -44,6 +42,11 @@ public final class NetworkPacketBrokerProperties implements JsonSerializable neighborGroupIds; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ @@ -113,29 +116,23 @@ public List neighborGroupIds() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the provisioningState value. + * @return the lastOperation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model NetworkPacketBrokerProperties")); - } + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokerProperties.class); - /** * {@inheritDoc} */ @@ -177,6 +174,8 @@ public static NetworkPacketBrokerProperties fromJson(JsonReader jsonReader) thro } else if ("neighborGroupIds".equals(fieldName)) { List neighborGroupIds = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkPacketBrokerProperties.neighborGroupIds = neighborGroupIds; + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkPacketBrokerProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkPacketBrokerProperties.provisioningState = ProvisioningState.fromString(reader.getString()); 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 index 11f80c7a6186..85a75598a0b4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ 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. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGrou 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. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGrou 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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGrou 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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGrou 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}. + * @return the response of a NetworkPacketBroker list operation 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkPacketBroker list operation 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}. + * @return the response of a NetworkPacketBroker list operation 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}. + * @return the response of a NetworkPacketBroker list operation 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. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGrou NetworkPacketBroker getById(String id); /** - * Gets a Network Packet Broker. - * * Retrieves details of this Network Packet Broker. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGrou Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGrou void deleteById(String id); /** - * Deletes a Network Packet Broker. - * * Deletes Network Packet Broker. * * @param id the resource ID. 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 deleted file mode 100644 index ed471419ab21..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; -import java.io.IOException; -import java.util.List; - -/** - * List of NetworkPacketBrokers. - */ -@Fluent -public final class NetworkPacketBrokersListResult implements JsonSerializable { - /* - * List of NetworkPacketBroker resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkPacketBrokersListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkPacketBrokersListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkPacketBrokersListResult. - */ - public static NetworkPacketBrokersListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkPacketBrokersListResult deserializedNetworkPacketBrokersListResult - = new NetworkPacketBrokersListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkPacketBrokerInner.fromJson(reader1)); - deserializedNetworkPacketBrokersListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkPacketBrokersListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkPacketBrokersListResult; - }); - } -} 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 c9f6815efbeb..d618e3fd08b0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import java.util.List; import java.util.Map; /** @@ -51,46 +50,18 @@ public interface NetworkRack { Map tags(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the networkRackType property: Network Rack SKU name. - * - * @return the networkRackType value. - */ - NetworkRackType networkRackType(); - - /** - * 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 properties property: The NetworkRack properties. * - * @return the networkDevices value. + * @return the properties value. */ - List networkDevices(); + NetworkRackProperties properties(); /** - * Gets the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -124,7 +95,7 @@ public interface NetworkRack { * The entirety of the NetworkRack definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -168,28 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the NetworkRack definition allowing to specify networkFabricId. + * The stage of the NetworkRack definition allowing to specify properties. */ - interface WithNetworkFabricId { + interface WithProperties { /** - * Specifies the networkFabricId property: ARM resource ID of the Network Fabric.. + * Specifies the properties property: The NetworkRack properties. * - * @param networkFabricId ARM resource ID of the Network Fabric. + * @param properties The NetworkRack properties. * @return the next definition stage. */ - WithCreate withNetworkFabricId(String networkFabricId); + WithCreate withProperties(NetworkRackProperties properties); } /** * 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.WithNetworkRackType, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -218,32 +188,6 @@ 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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -282,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java similarity index 63% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java index 1da9ff2bed9c..ddac90eb0a88 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,19 +13,19 @@ import java.util.Map; /** - * Base tracked resource type for PATCH updates. + * Network Rack patch resource definition. */ @Fluent -public class TagsUpdate implements JsonSerializable { +public final class NetworkRackPatch implements JsonSerializable { /* - * Resource tags + * Resource tags. */ private Map tags; /** - * Creates an instance of TagsUpdate class. + * Creates an instance of NetworkRackPatch class. */ - public TagsUpdate() { + public NetworkRackPatch() { } /** @@ -41,21 +41,13 @@ public Map tags() { * Set the tags property: Resource tags. * * @param tags the tags value to set. - * @return the TagsUpdate object itself. + * @return the NetworkRackPatch object itself. */ - public TagsUpdate withTags(Map tags) { + public NetworkRackPatch withTags(Map tags) { this.tags = tags; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -67,29 +59,29 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of TagsUpdate from the JsonReader. + * Reads an instance of NetworkRackPatch from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of TagsUpdate if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the TagsUpdate. + * @return An instance of NetworkRackPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkRackPatch. */ - public static TagsUpdate fromJson(JsonReader jsonReader) throws IOException { + public static NetworkRackPatch fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - TagsUpdate deserializedTagsUpdate = new TagsUpdate(); + NetworkRackPatch deserializedNetworkRackPatch = new NetworkRackPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedTagsUpdate.tags = tags; + deserializedNetworkRackPatch.tags = tags; } else { reader.skipChildren(); } } - return deserializedTagsUpdate; + return deserializedNetworkRackPatch; }); } } 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/models/NetworkRackProperties.java similarity index 75% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackProperties.java index 08ebb39a563b..f1ab5678341f 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/models/NetworkRackProperties.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -19,7 +16,12 @@ * Network Rack Properties defines the properties of the resource. */ @Fluent -public final class NetworkRackProperties extends AnnotationResource { +public final class NetworkRackProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Network Rack SKU name. */ @@ -35,6 +37,11 @@ public final class NetworkRackProperties extends AnnotationResource { */ private List networkDevices; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Provisioning state of the resource. */ @@ -46,6 +53,26 @@ public final class NetworkRackProperties extends AnnotationResource { public NetworkRackProperties() { } + /** + * 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 NetworkRackProperties object itself. + */ + public NetworkRackProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the networkRackType property: Network Rack SKU name. * @@ -96,47 +123,31 @@ public List networkDevices() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the lastOperation property: Details of the last operation performed on the resource. * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} + * @return the lastOperation value. */ - @Override - public NetworkRackProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; + public LastOperationProperties lastOperation() { + return this.lastOperation; } /** - * Validates the instance. + * Get the provisioningState property: Provisioning state of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the provisioningState value. */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model NetworkRackProperties")); - } + public ProvisioningState provisioningState() { + return this.provisioningState; } - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("networkFabricId", this.networkFabricId); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("networkRackType", this.networkRackType == null ? null : this.networkRackType.toString()); return jsonWriter.writeEndObject(); @@ -158,15 +169,17 @@ public static NetworkRackProperties fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkRackProperties.withAnnotation(reader.getString()); - } else if ("networkFabricId".equals(fieldName)) { + if ("networkFabricId".equals(fieldName)) { deserializedNetworkRackProperties.networkFabricId = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedNetworkRackProperties.annotation = reader.getString(); } else if ("networkRackType".equals(fieldName)) { deserializedNetworkRackProperties.networkRackType = NetworkRackType.fromString(reader.getString()); } else if ("networkDevices".equals(fieldName)) { List networkDevices = reader.readArray(reader1 -> reader1.getString()); deserializedNetworkRackProperties.networkDevices = networkDevices; + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkRackProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedNetworkRackProperties.provisioningState = ProvisioningState.fromString(reader.getString()); 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 index 3a0f5dbc6138..9daa9595e894 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class NetworkRackType extends ExpandableStringEnum { /** - * Static value Aggregate for NetworkRackType. + * NetworkRackType-Aggregate. */ public static final NetworkRackType AGGREGATE = fromString("Aggregate"); /** - * Static value Compute for NetworkRackType. + * NetworkRackType-Compute. */ public static final NetworkRackType COMPUTE = fromString("Compute"); /** - * Static value Combined for NetworkRackType. + * NetworkRackType-Combined. */ public static final NetworkRackType COMBINED = fromString("Combined"); 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 4e7184b637a1..ff94c16f680a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkRacks { /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Context context); /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S NetworkRack getByResourceGroup(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteByResourceGroup(String resourceGroupName, String networkRackName); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String networkRackName, Context context); /** - * List Network Racks by resource group. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List Network Racks by resource group. - * * List all Network Rack resources in the given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List Network Racks by subscription. - * * List all Network Rack 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 Network Racks as paginated response with {@link PagedIterable}. + * @return the response of a NetworkRack list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param id the resource ID. @@ -134,8 +116,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S NetworkRack getById(String id); /** - * Gets a Network Rack. - * * Get Network Rack resource details. * * @param id the resource ID. @@ -148,8 +128,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param id the resource ID. @@ -160,8 +138,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteById(String id); /** - * Deletes a Network Rack. - * * Delete Network Rack resource. * * @param id the resource ID. 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 deleted file mode 100644 index a5dd0a1485cb..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Network Racks. - */ -@Fluent -public final class NetworkRacksListResult implements JsonSerializable { - /* - * List of Network Rack resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkRacksListResult class. - */ - public NetworkRacksListResult() { - } - - /** - * Get the value property: List of Network Rack resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Network Rack resources. - * - * @param value the value value to set. - * @return the NetworkRacksListResult object itself. - */ - public NetworkRacksListResult 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 NetworkRacksListResult object itself. - */ - public NetworkRacksListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkRacksListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkRacksListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkRacksListResult. - */ - public static NetworkRacksListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkRacksListResult deserializedNetworkRacksListResult = new NetworkRacksListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NetworkRackInner.fromJson(reader1)); - deserializedNetworkRacksListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkRacksListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkRacksListResult; - }); - } -} 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 index ce3b909128a7..e53bdeecb713 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ 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; /** @@ -51,69 +50,18 @@ public interface NetworkTap { 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. + * Gets the properties property: The NetworkTap Properties. * - * @return the administrativeState value. + * @return the properties value. */ - AdministrativeState administrativeState(); + NetworkTapProperties properties(); /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -146,9 +94,8 @@ public interface NetworkTap { /** * The entirety of the NetworkTap definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithNetworkPacketBrokerId, DefinitionStages.WithDestinations, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -192,41 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkPacketBrokerId withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the NetworkTap definition allowing to specify networkPacketBrokerId. + * The stage of the NetworkTap definition allowing to specify properties. */ - interface WithNetworkPacketBrokerId { + interface WithProperties { /** - * Specifies the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker.. + * Specifies the properties property: The NetworkTap Properties. * - * @param networkPacketBrokerId ARM resource ID of the Network Packet Broker. + * @param properties The NetworkTap Properties. * @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); + WithCreate withProperties(NetworkTapProperties properties); } /** * 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 { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -255,32 +188,6 @@ interface WithTags { */ 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); - } } /** @@ -293,8 +200,7 @@ interface WithAnnotation { /** * The template for NetworkTap update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithPollingType, UpdateStages.WithDestinations, - UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -320,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -329,42 +235,16 @@ interface WithTags { } /** - * The stage of the NetworkTap update allowing to specify pollingType. + * The stage of the NetworkTap update allowing to specify properties. */ - interface WithPollingType { + interface WithProperties { /** - * Specifies the pollingType property: Polling type.. + * Specifies the properties property: Resource properties.. * - * @param pollingType Polling type. + * @param properties Resource properties. * @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); + Update withProperties(NetworkTapPatchProperties properties); } } @@ -384,21 +264,17 @@ interface WithAnnotation { 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap. - * * Implements the operation to the underlying resources. * * @param body Request payload. @@ -406,31 +282,27 @@ 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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 index 074880ede293..18873ab7538b 100644 --- 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchableParameters; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The NetworkFabric resource definition. */ @Fluent -public final class NetworkTapPatch extends TagsUpdate { +public final class NetworkTapPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Resource properties. */ - private NetworkTapPatchableParameters innerProperties; + private NetworkTapPatchProperties properties; /** * Creates an instance of NetworkTapPatch class. @@ -30,112 +34,53 @@ 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. + * Get the tags property: Resource tags. * - * @return the pollingType value. + * @return the tags value. */ - public PollingType pollingType() { - return this.innerProperties() == null ? null : this.innerProperties().pollingType(); + public Map tags() { + return this.tags; } /** - * Set the pollingType property: Polling type. + * Set the tags property: Resource tags. * - * @param pollingType the pollingType value to set. + * @param tags the tags 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); + public NetworkTapPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: Resource properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public NetworkTapPatchProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: Resource properties. * - * @param annotation the annotation value to set. + * @param properties the properties 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); + public NetworkTapPatch withProperties(NetworkTapPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -156,9 +101,9 @@ public static NetworkTapPatch fromJson(JsonReader jsonReader) throws IOException if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNetworkTapPatch.withTags(tags); + deserializedNetworkTapPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNetworkTapPatch.innerProperties = NetworkTapPatchableParameters.fromJson(reader); + deserializedNetworkTapPatch.properties = NetworkTapPatchProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchProperties.java new file mode 100644 index 000000000000..32197d0b9e78 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchProperties.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The Network Tap resource patch definition. + */ +@Fluent +public final class NetworkTapPatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Polling type. + */ + private PollingType pollingType; + + /* + * List of destination properties to send the filter traffic. + */ + private List destinations; + + /** + * Creates an instance of NetworkTapPatchProperties class. + */ + public NetworkTapPatchProperties() { + } + + /** + * 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 NetworkTapPatchProperties object itself. + */ + public NetworkTapPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + 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 NetworkTapPatchProperties object itself. + */ + public NetworkTapPatchProperties 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 NetworkTapPatchProperties object itself. + */ + public NetworkTapPatchProperties withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("pollingType", this.pollingType == null ? null : this.pollingType.toString()); + jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapPatchProperties. + */ + public static NetworkTapPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapPatchProperties deserializedNetworkTapPatchProperties = new NetworkTapPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("annotation".equals(fieldName)) { + deserializedNetworkTapPatchProperties.annotation = reader.getString(); + } else if ("pollingType".equals(fieldName)) { + deserializedNetworkTapPatchProperties.pollingType = PollingType.fromString(reader.getString()); + } else if ("destinations".equals(fieldName)) { + List destinations + = reader.readArray(reader1 -> DestinationPatchProperties.fromJson(reader1)); + deserializedNetworkTapPatchProperties.destinations = destinations; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapPatchProperties; + }); + } +} 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 deleted file mode 100644 index 056cec8a8355..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * 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() { - if (isolationDomainProperties() != null) { - isolationDomainProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("destinationType", destinationType() == null ? null : destinationType().toString()); - jsonWriter.writeStringField("destinationId", destinationId()); - jsonWriter.writeJsonField("isolationDomainProperties", isolationDomainProperties()); - jsonWriter.writeStringField("destinationTapRuleId", destinationTapRuleId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapPatchableParametersDestinationsItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapPatchableParametersDestinationsItem if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapPatchableParametersDestinationsItem. - */ - public static NetworkTapPatchableParametersDestinationsItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapPatchableParametersDestinationsItem deserializedNetworkTapPatchableParametersDestinationsItem - = new NetworkTapPatchableParametersDestinationsItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem.withName(reader.getString()); - } else if ("destinationType".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem - .withDestinationType(DestinationType.fromString(reader.getString())); - } else if ("destinationId".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem.withDestinationId(reader.getString()); - } else if ("isolationDomainProperties".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem - .withIsolationDomainProperties(IsolationDomainProperties.fromJson(reader)); - } else if ("destinationTapRuleId".equals(fieldName)) { - deserializedNetworkTapPatchableParametersDestinationsItem - .withDestinationTapRuleId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapPatchableParametersDestinationsItem; - }); - } -} 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/models/NetworkTapProperties.java similarity index 75% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapProperties.java index 673b06d632d7..1635cf398a31 100644 --- 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/models/NetworkTapProperties.java @@ -1,20 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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 java.io.IOException; import java.util.List; @@ -22,7 +16,12 @@ * Network Tap Properties defines the properties of the resource. */ @Fluent -public final class NetworkTapProperties extends AnnotationResource { +public final class NetworkTapProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * ARM resource ID of the Network Packet Broker. */ @@ -36,13 +35,18 @@ public final class NetworkTapProperties extends AnnotationResource { /* * List of destinations to send the filter traffic. */ - private List destinations; + private List destinations; /* * Polling type. */ private PollingType pollingType; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Gets the configurations state of the resource. */ @@ -65,6 +69,26 @@ public final class NetworkTapProperties extends AnnotationResource { public NetworkTapProperties() { } + /** + * 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 NetworkTapProperties object itself. + */ + public NetworkTapProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker. * @@ -99,7 +123,7 @@ public String sourceTapRuleId() { * * @return the destinations value. */ - public List destinations() { + public List destinations() { return this.destinations; } @@ -109,7 +133,7 @@ public List destinations() { * @param destinations the destinations value to set. * @return the NetworkTapProperties object itself. */ - public NetworkTapProperties withDestinations(List destinations) { + public NetworkTapProperties withDestinations(List destinations) { this.destinations = destinations; return this; } @@ -134,6 +158,15 @@ public NetworkTapProperties withPollingType(PollingType pollingType) { return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Gets the configurations state of the resource. * @@ -163,47 +196,15 @@ 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() { - if (networkPacketBrokerId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkPacketBrokerId in model NetworkTapProperties")); - } - if (destinations() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property destinations in model NetworkTapProperties")); - } else { - destinations().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkTapProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeStringField("networkPacketBrokerId", this.networkPacketBrokerId); jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("pollingType", this.pollingType == null ? null : this.pollingType.toString()); return jsonWriter.writeEndObject(); } @@ -224,18 +225,20 @@ public static NetworkTapProperties fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkTapProperties.withAnnotation(reader.getString()); - } else if ("networkPacketBrokerId".equals(fieldName)) { + if ("networkPacketBrokerId".equals(fieldName)) { deserializedNetworkTapProperties.networkPacketBrokerId = reader.getString(); } else if ("destinations".equals(fieldName)) { - List destinations - = reader.readArray(reader1 -> NetworkTapPropertiesDestinationsItem.fromJson(reader1)); + List destinations + = reader.readArray(reader1 -> DestinationProperties.fromJson(reader1)); deserializedNetworkTapProperties.destinations = destinations; + } else if ("annotation".equals(fieldName)) { + deserializedNetworkTapProperties.annotation = reader.getString(); } else if ("sourceTapRuleId".equals(fieldName)) { deserializedNetworkTapProperties.sourceTapRuleId = reader.getString(); } else if ("pollingType".equals(fieldName)) { deserializedNetworkTapProperties.pollingType = PollingType.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkTapProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkTapProperties.configurationState = ConfigurationState.fromString(reader.getString()); 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 deleted file mode 100644 index c99b2ccc52c3..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * 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() { - if (isolationDomainProperties() != null) { - isolationDomainProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("destinationType", destinationType() == null ? null : destinationType().toString()); - jsonWriter.writeStringField("destinationId", destinationId()); - jsonWriter.writeJsonField("isolationDomainProperties", isolationDomainProperties()); - jsonWriter.writeStringField("destinationTapRuleId", destinationTapRuleId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapPropertiesDestinationsItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapPropertiesDestinationsItem if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapPropertiesDestinationsItem. - */ - public static NetworkTapPropertiesDestinationsItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapPropertiesDestinationsItem deserializedNetworkTapPropertiesDestinationsItem - = new NetworkTapPropertiesDestinationsItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem.withName(reader.getString()); - } else if ("destinationType".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem - .withDestinationType(DestinationType.fromString(reader.getString())); - } else if ("destinationId".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem.withDestinationId(reader.getString()); - } else if ("isolationDomainProperties".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem - .withIsolationDomainProperties(IsolationDomainProperties.fromJson(reader)); - } else if ("destinationTapRuleId".equals(fieldName)) { - deserializedNetworkTapPropertiesDestinationsItem.withDestinationTapRuleId(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapPropertiesDestinationsItem; - }); - } -} 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 index dc620e53b705..2ba0140db7dc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,8 +8,6 @@ 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; /** @@ -52,88 +50,18 @@ public interface NetworkTapRule { 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. + * Gets the properties property: The NetworkTapRule Properties. * - * @return the administrativeState value. + * @return the properties value. */ - AdministrativeState administrativeState(); + NetworkTapRuleProperties properties(); /** - * 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. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -167,7 +95,7 @@ public interface NetworkTapRule { * The entirety of the NetworkTapRule definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -211,17 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the NetworkTapRule definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The NetworkTapRule Properties. + * + * @param properties The NetworkTapRule Properties. + * @return the next definition stage. + */ + WithCreate withProperties(NetworkTapRuleProperties properties); } /** * 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 { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -250,84 +188,6 @@ interface WithTags { */ 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); - } } /** @@ -340,8 +200,7 @@ interface WithAnnotation { /** * The template for NetworkTapRule update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithConfigurationType, UpdateStages.WithTapRulesUrl, - UpdateStages.WithMatchConfigurations, UpdateStages.WithDynamicMatchConfigurations, UpdateStages.WithAnnotation { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -367,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -376,68 +235,16 @@ interface WithTags { } /** - * 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. + * The stage of the NetworkTapRule update allowing to specify properties. */ - interface WithMatchConfigurations { + interface WithProperties { /** - * Specifies the matchConfigurations property: List of match configurations.. + * Specifies the properties property: Network Tap Rule Patch properties.. * - * @param matchConfigurations List of match configurations. + * @param properties Network Tap Rule Patch properties. * @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); + Update withProperties(NetworkTapRulePatchProperties properties); } } @@ -457,21 +264,17 @@ interface WithAnnotation { 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. + * @return the response. */ CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Updates administrative state of Network Tap Rules. - * * Implements the operation to the underlying resources. * * @param body Request payload. @@ -479,55 +282,47 @@ 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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 index 1e55a7c525ff..077f7bb18f87 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -37,8 +37,7 @@ public final class NetworkTapRuleAction implements JsonSerializable { + /* + * Type of actions that can be performed. + */ + private TapRuleActionType type; + + /* + * Truncate. 0 indicates do not truncate. + */ + private String truncate; + + /* + * The parameter to enable or disable the timestamp. + */ + private BooleanEnumProperty isTimestampEnabled; + + /* + * Destination Id. The ARM resource Id may be either Network To Network Interconnect or NeighborGroup. + */ + private String destinationId; + + /* + * The name of the match configuration. This is used when Goto type is provided. + */ + private String matchConfigurationName; + + /** + * Creates an instance of NetworkTapRuleActionPatch class. + */ + public NetworkTapRuleActionPatch() { + } + + /** + * 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 NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch 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 NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch 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 NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch 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 NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch 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. + * + * @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. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the NetworkTapRuleActionPatch object itself. + */ + public NetworkTapRuleActionPatch withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("truncate", this.truncate); + jsonWriter.writeStringField("isTimestampEnabled", + this.isTimestampEnabled == null ? null : this.isTimestampEnabled.toString()); + jsonWriter.writeStringField("destinationId", this.destinationId); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleActionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleActionPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapRuleActionPatch. + */ + public static NetworkTapRuleActionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleActionPatch deserializedNetworkTapRuleActionPatch = new NetworkTapRuleActionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.type = TapRuleActionType.fromString(reader.getString()); + } else if ("truncate".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.truncate = reader.getString(); + } else if ("isTimestampEnabled".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.isTimestampEnabled + = BooleanEnumProperty.fromString(reader.getString()); + } else if ("destinationId".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.destinationId = reader.getString(); + } else if ("matchConfigurationName".equals(fieldName)) { + deserializedNetworkTapRuleActionPatch.matchConfigurationName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleActionPatch; + }); + } +} 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 index 084195e10395..7ca75de8502c 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,22 @@ * Defines the match condition that is supported to filter the traffic. */ @Fluent -public final class NetworkTapRuleMatchCondition extends CommonMatchConditions { +public final class NetworkTapRuleMatchCondition implements JsonSerializable { + /* + * List of the protocols that need to be matched. + */ + private List protocolTypes; + + /* + * Vlan match condition that needs to be matched. + */ + private VlanMatchCondition vlanMatchCondition; + + /* + * IP condition that needs to be matched. + */ + private IpMatchCondition ipCondition; + /* * Encapsulation Type that needs to be matched. */ @@ -33,88 +49,103 @@ public NetworkTapRuleMatchCondition() { } /** - * Get the encapsulationType property: Encapsulation Type that needs to be matched. + * Get the protocolTypes property: List of the protocols that need to be matched. * - * @return the encapsulationType value. + * @return the protocolTypes value. */ - public EncapsulationType encapsulationType() { - return this.encapsulationType; + public List protocolTypes() { + return this.protocolTypes; } /** - * Set the encapsulationType property: Encapsulation Type that needs to be matched. + * Set the protocolTypes property: List of the protocols that need to be matched. * - * @param encapsulationType the encapsulationType value to set. + * @param protocolTypes the protocolTypes value to set. * @return the NetworkTapRuleMatchCondition object itself. */ - public NetworkTapRuleMatchCondition withEncapsulationType(EncapsulationType encapsulationType) { - this.encapsulationType = encapsulationType; + public NetworkTapRuleMatchCondition withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; return this; } /** - * Get the portCondition property: Defines the port condition that needs to be matched. + * Get the vlanMatchCondition property: Vlan match condition that needs to be matched. * - * @return the portCondition value. + * @return the vlanMatchCondition value. */ - public PortCondition portCondition() { - return this.portCondition; + public VlanMatchCondition vlanMatchCondition() { + return this.vlanMatchCondition; } /** - * Set the portCondition property: Defines the port condition that needs to be matched. + * Set the vlanMatchCondition property: Vlan match condition that needs to be matched. * - * @param portCondition the portCondition value to set. + * @param vlanMatchCondition the vlanMatchCondition value to set. * @return the NetworkTapRuleMatchCondition object itself. */ - public NetworkTapRuleMatchCondition withPortCondition(PortCondition portCondition) { - this.portCondition = portCondition; + public NetworkTapRuleMatchCondition withVlanMatchCondition(VlanMatchCondition vlanMatchCondition) { + this.vlanMatchCondition = vlanMatchCondition; return this; } /** - * {@inheritDoc} + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. */ - @Override - public NetworkTapRuleMatchCondition withProtocolTypes(List protocolTypes) { - super.withProtocolTypes(protocolTypes); - return this; + public IpMatchCondition ipCondition() { + return this.ipCondition; } /** - * {@inheritDoc} + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the NetworkTapRuleMatchCondition object itself. */ - @Override - public NetworkTapRuleMatchCondition withVlanMatchCondition(VlanMatchCondition vlanMatchCondition) { - super.withVlanMatchCondition(vlanMatchCondition); + public NetworkTapRuleMatchCondition withIpCondition(IpMatchCondition ipCondition) { + this.ipCondition = ipCondition; return this; } /** - * {@inheritDoc} + * Get the encapsulationType property: Encapsulation Type that needs to be matched. + * + * @return the encapsulationType value. */ - @Override - public NetworkTapRuleMatchCondition withIpCondition(IpMatchCondition ipCondition) { - super.withIpCondition(ipCondition); + public EncapsulationType encapsulationType() { + return this.encapsulationType; + } + + /** + * Set the encapsulationType property: Encapsulation Type that needs to be matched. + * + * @param encapsulationType the encapsulationType value to set. + * @return the NetworkTapRuleMatchCondition object itself. + */ + public NetworkTapRuleMatchCondition withEncapsulationType(EncapsulationType encapsulationType) { + this.encapsulationType = encapsulationType; return this; } /** - * Validates the instance. + * Get the portCondition property: Defines the port condition that needs to be matched. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the portCondition value. */ - @Override - public void validate() { - if (portCondition() != null) { - portCondition().validate(); - } - if (vlanMatchCondition() != null) { - vlanMatchCondition().validate(); - } - if (ipCondition() != null) { - ipCondition().validate(); - } + 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; } /** @@ -123,9 +154,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("protocolTypes", protocolTypes(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("vlanMatchCondition", vlanMatchCondition()); - jsonWriter.writeJsonField("ipCondition", ipCondition()); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", this.vlanMatchCondition); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); jsonWriter.writeStringField("encapsulationType", this.encapsulationType == null ? null : this.encapsulationType.toString()); jsonWriter.writeJsonField("portCondition", this.portCondition); @@ -149,12 +181,11 @@ public static NetworkTapRuleMatchCondition fromJson(JsonReader jsonReader) throw if ("protocolTypes".equals(fieldName)) { List protocolTypes = reader.readArray(reader1 -> reader1.getString()); - deserializedNetworkTapRuleMatchCondition.withProtocolTypes(protocolTypes); + deserializedNetworkTapRuleMatchCondition.protocolTypes = protocolTypes; } else if ("vlanMatchCondition".equals(fieldName)) { - deserializedNetworkTapRuleMatchCondition - .withVlanMatchCondition(VlanMatchCondition.fromJson(reader)); + deserializedNetworkTapRuleMatchCondition.vlanMatchCondition = VlanMatchCondition.fromJson(reader); } else if ("ipCondition".equals(fieldName)) { - deserializedNetworkTapRuleMatchCondition.withIpCondition(IpMatchCondition.fromJson(reader)); + deserializedNetworkTapRuleMatchCondition.ipCondition = IpMatchCondition.fromJson(reader); } else if ("encapsulationType".equals(fieldName)) { deserializedNetworkTapRuleMatchCondition.encapsulationType = EncapsulationType.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java new file mode 100644 index 000000000000..0811b27e9a3a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match condition that is supported to filter the traffic. + */ +@Fluent +public final class NetworkTapRuleMatchConditionPatch implements JsonSerializable { + /* + * List of the protocols that need to be matched. + */ + private List protocolTypes; + + /* + * Vlan match condition that needs to be matched. + */ + private VlanMatchConditionPatch vlanMatchCondition; + + /* + * IP condition that needs to be matched. + */ + private IpMatchConditionPatch ipCondition; + + /* + * Encapsulation Type that needs to be matched. + */ + private EncapsulationType encapsulationType; + + /* + * Defines the port condition that needs to be matched. + */ + private PortConditionPatch portCondition; + + /** + * Creates an instance of NetworkTapRuleMatchConditionPatch class. + */ + public NetworkTapRuleMatchConditionPatch() { + } + + /** + * 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 NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch 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 VlanMatchConditionPatch 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 NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch withVlanMatchCondition(VlanMatchConditionPatch vlanMatchCondition) { + this.vlanMatchCondition = vlanMatchCondition; + return this; + } + + /** + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. + */ + public IpMatchConditionPatch ipCondition() { + return this.ipCondition; + } + + /** + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch withIpCondition(IpMatchConditionPatch ipCondition) { + this.ipCondition = ipCondition; + return this; + } + + /** + * Get the encapsulationType property: Encapsulation Type that needs to be matched. + * + * @return the encapsulationType value. + */ + public EncapsulationType encapsulationType() { + return this.encapsulationType; + } + + /** + * Set the encapsulationType property: Encapsulation Type that needs to be matched. + * + * @param encapsulationType the encapsulationType value to set. + * @return the NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch 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 PortConditionPatch 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 NetworkTapRuleMatchConditionPatch object itself. + */ + public NetworkTapRuleMatchConditionPatch withPortCondition(PortConditionPatch portCondition) { + this.portCondition = portCondition; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("vlanMatchCondition", this.vlanMatchCondition); + jsonWriter.writeJsonField("ipCondition", this.ipCondition); + jsonWriter.writeStringField("encapsulationType", + this.encapsulationType == null ? null : this.encapsulationType.toString()); + jsonWriter.writeJsonField("portCondition", this.portCondition); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleMatchConditionPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapRuleMatchConditionPatch. + */ + public static NetworkTapRuleMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleMatchConditionPatch deserializedNetworkTapRuleMatchConditionPatch + = new NetworkTapRuleMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkTapRuleMatchConditionPatch.protocolTypes = protocolTypes; + } else if ("vlanMatchCondition".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch.vlanMatchCondition + = VlanMatchConditionPatch.fromJson(reader); + } else if ("ipCondition".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch.ipCondition = IpMatchConditionPatch.fromJson(reader); + } else if ("encapsulationType".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch.encapsulationType + = EncapsulationType.fromString(reader.getString()); + } else if ("portCondition".equals(fieldName)) { + deserializedNetworkTapRuleMatchConditionPatch.portCondition = PortConditionPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleMatchConditionPatch; + }); + } +} 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 index 7c16e2c4b690..f119348ba700 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -30,7 +30,7 @@ public final class NetworkTapRuleMatchConfiguration implements JsonSerializable< /* * Type of IP Address. IPv4 or IPv6 */ - private IpAddressType ipAddressType; + private IPAddressType ipAddressType; /* * List of the match conditions. @@ -93,7 +93,7 @@ public NetworkTapRuleMatchConfiguration withSequenceNumber(Long sequenceNumber) * * @return the ipAddressType value. */ - public IpAddressType ipAddressType() { + public IPAddressType ipAddressType() { return this.ipAddressType; } @@ -103,7 +103,7 @@ public IpAddressType ipAddressType() { * @param ipAddressType the ipAddressType value to set. * @return the NetworkTapRuleMatchConfiguration object itself. */ - public NetworkTapRuleMatchConfiguration withIpAddressType(IpAddressType ipAddressType) { + public NetworkTapRuleMatchConfiguration withIpAddressType(IPAddressType ipAddressType) { this.ipAddressType = ipAddressType; return this; } @@ -148,20 +148,6 @@ public NetworkTapRuleMatchConfiguration withActions(List a 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()); - } - } - /** * {@inheritDoc} */ @@ -200,7 +186,7 @@ public static NetworkTapRuleMatchConfiguration fromJson(JsonReader jsonReader) t = reader.getNullable(JsonReader::getLong); } else if ("ipAddressType".equals(fieldName)) { deserializedNetworkTapRuleMatchConfiguration.ipAddressType - = IpAddressType.fromString(reader.getString()); + = IPAddressType.fromString(reader.getString()); } else if ("matchConditions".equals(fieldName)) { List matchConditions = reader.readArray(reader1 -> NetworkTapRuleMatchCondition.fromJson(reader1)); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java new file mode 100644 index 000000000000..bc85a5ef43bb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines the match configuration that are supported to filter the traffic. + */ +@Fluent +public final class NetworkTapRuleMatchConfigurationPatch + implements JsonSerializable { + /* + * The name of the match configuration. + */ + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration.. + */ + private Long sequenceNumber; + + /* + * Type of IP Address. IPv4 or IPv6 + */ + private IPAddressType ipAddressType; + + /* + * List of the match conditions. + */ + private List matchConditions; + + /* + * List of actions that need to be performed for the matched conditions. + */ + private List actions; + + /** + * Creates an instance of NetworkTapRuleMatchConfigurationPatch class. + */ + public NetworkTapRuleMatchConfigurationPatch() { + } + + /** + * 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 NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch 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 NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch 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 NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch 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 NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch + 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 NetworkTapRuleMatchConfigurationPatch object itself. + */ + public NetworkTapRuleMatchConfigurationPatch withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("matchConfigurationName", this.matchConfigurationName); + jsonWriter.writeNumberField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeStringField("ipAddressType", this.ipAddressType == null ? null : this.ipAddressType.toString()); + jsonWriter.writeArrayField("matchConditions", this.matchConditions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkTapRuleMatchConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkTapRuleMatchConfigurationPatch if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkTapRuleMatchConfigurationPatch. + */ + public static NetworkTapRuleMatchConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkTapRuleMatchConfigurationPatch deserializedNetworkTapRuleMatchConfigurationPatch + = new NetworkTapRuleMatchConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchConfigurationName".equals(fieldName)) { + deserializedNetworkTapRuleMatchConfigurationPatch.matchConfigurationName = reader.getString(); + } else if ("sequenceNumber".equals(fieldName)) { + deserializedNetworkTapRuleMatchConfigurationPatch.sequenceNumber + = reader.getNullable(JsonReader::getLong); + } else if ("ipAddressType".equals(fieldName)) { + deserializedNetworkTapRuleMatchConfigurationPatch.ipAddressType + = IPAddressType.fromString(reader.getString()); + } else if ("matchConditions".equals(fieldName)) { + List matchConditions + = reader.readArray(reader1 -> NetworkTapRuleMatchConditionPatch.fromJson(reader1)); + deserializedNetworkTapRuleMatchConfigurationPatch.matchConditions = matchConditions; + } else if ("actions".equals(fieldName)) { + List actions + = reader.readArray(reader1 -> NetworkTapRuleActionPatch.fromJson(reader1)); + deserializedNetworkTapRuleMatchConfigurationPatch.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkTapRuleMatchConfigurationPatch; + }); + } +} 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 index 85fd517d0ff6..bb6eb4a310b2 100644 --- 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRulePatchProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The NetworkTapRule resource definition. */ @Fluent -public final class NetworkTapRulePatch extends TagsUpdate { +public final class NetworkTapRulePatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * Network Tap Rule Patch properties. */ - private NetworkTapRulePatchProperties innerProperties; + private NetworkTapRulePatchProperties properties; /** * Creates an instance of NetworkTapRulePatch class. @@ -30,159 +34,53 @@ 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. + * Get the tags property: Resource tags. * - * @return the configurationType value. + * @return the tags value. */ - public ConfigurationType configurationType() { - return this.innerProperties() == null ? null : this.innerProperties().configurationType(); + public Map tags() { + return this.tags; } /** - * Set the configurationType property: Input method to configure Network Tap Rule. + * Set the tags property: Resource tags. * - * @param configurationType the configurationType value to set. + * @param tags the tags 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); + public NetworkTapRulePatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the annotation property: Switch configuration description. + * Get the properties property: Network Tap Rule Patch properties. * - * @return the annotation value. + * @return the properties value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public NetworkTapRulePatchProperties properties() { + return this.properties; } /** - * Set the annotation property: Switch configuration description. + * Set the properties property: Network Tap Rule Patch properties. * - * @param annotation the annotation value to set. + * @param properties the properties 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); + public NetworkTapRulePatch withProperties(NetworkTapRulePatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -203,9 +101,9 @@ public static NetworkTapRulePatch fromJson(JsonReader jsonReader) throws IOExcep if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNetworkTapRulePatch.withTags(tags); + deserializedNetworkTapRulePatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNetworkTapRulePatch.innerProperties = NetworkTapRulePatchProperties.fromJson(reader); + deserializedNetworkTapRulePatch.properties = NetworkTapRulePatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/NetworkTapRulePatchProperties.java similarity index 67% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchProperties.java index 7bd91d78ea4c..6ead40758d9a 100644 --- 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/models/NetworkTapRulePatchProperties.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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 java.io.IOException; import java.util.List; @@ -19,7 +16,12 @@ * Network Tap Rule Patch properties. */ @Fluent -public final class NetworkTapRulePatchProperties extends AnnotationResource { +public final class NetworkTapRulePatchProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Input method to configure Network Tap Rule. */ @@ -30,15 +32,20 @@ public final class NetworkTapRulePatchProperties extends AnnotationResource { */ private String tapRulesUrl; + /* + * Global network tap rule actions + */ + private GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions; + /* * List of match configurations. */ - private List matchConfigurations; + private List matchConfigurations; /* * List of dynamic match configurations. */ - private List dynamicMatchConfigurations; + private List dynamicMatchConfigurations; /** * Creates an instance of NetworkTapRulePatchProperties class. @@ -46,6 +53,26 @@ public final class NetworkTapRulePatchProperties extends AnnotationResource { public NetworkTapRulePatchProperties() { } + /** + * 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 NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the configurationType property: Input method to configure Network Tap Rule. * @@ -86,12 +113,33 @@ public NetworkTapRulePatchProperties withTapRulesUrl(String tapRulesUrl) { return this; } + /** + * Get the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @return the globalNetworkTapRuleActions value. + */ + public GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions() { + return this.globalNetworkTapRuleActions; + } + + /** + * Set the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions the globalNetworkTapRuleActions value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionPatchProperties globalNetworkTapRuleActions) { + this.globalNetworkTapRuleActions = globalNetworkTapRuleActions; + return this; + } + /** * Get the matchConfigurations property: List of match configurations. * * @return the matchConfigurations value. */ - public List matchConfigurations() { + public List matchConfigurations() { return this.matchConfigurations; } @@ -102,7 +150,7 @@ public List matchConfigurations() { * @return the NetworkTapRulePatchProperties object itself. */ public NetworkTapRulePatchProperties - withMatchConfigurations(List matchConfigurations) { + withMatchConfigurations(List matchConfigurations) { this.matchConfigurations = matchConfigurations; return this; } @@ -112,7 +160,7 @@ public List matchConfigurations() { * * @return the dynamicMatchConfigurations value. */ - public List dynamicMatchConfigurations() { + public List dynamicMatchConfigurations() { return this.dynamicMatchConfigurations; } @@ -123,45 +171,22 @@ public List dynamicMatchConfigurations() { * @return the NetworkTapRulePatchProperties object itself. */ public NetworkTapRulePatchProperties - withDynamicMatchConfigurations(List dynamicMatchConfigurations) { + 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() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("configurationType", this.configurationType == null ? null : this.configurationType.toString()); jsonWriter.writeStringField("tapRulesUrl", this.tapRulesUrl); + jsonWriter.writeJsonField("globalNetworkTapRuleActions", this.globalNetworkTapRuleActions); jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, @@ -186,19 +211,22 @@ public static NetworkTapRulePatchProperties fromJson(JsonReader jsonReader) thro reader.nextToken(); if ("annotation".equals(fieldName)) { - deserializedNetworkTapRulePatchProperties.withAnnotation(reader.getString()); + deserializedNetworkTapRulePatchProperties.annotation = reader.getString(); } else if ("configurationType".equals(fieldName)) { deserializedNetworkTapRulePatchProperties.configurationType = ConfigurationType.fromString(reader.getString()); } else if ("tapRulesUrl".equals(fieldName)) { deserializedNetworkTapRulePatchProperties.tapRulesUrl = reader.getString(); + } else if ("globalNetworkTapRuleActions".equals(fieldName)) { + deserializedNetworkTapRulePatchProperties.globalNetworkTapRuleActions + = GlobalNetworkTapRuleActionPatchProperties.fromJson(reader); } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); + List matchConfigurations + = reader.readArray(reader1 -> NetworkTapRuleMatchConfigurationPatch.fromJson(reader1)); deserializedNetworkTapRulePatchProperties.matchConfigurations = matchConfigurations; } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); + List dynamicMatchConfigurations + = reader.readArray(reader1 -> CommonDynamicMatchConfigurationPatch.fromJson(reader1)); deserializedNetworkTapRulePatchProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; } else { reader.skipChildren(); 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 deleted file mode 100644 index 2975564d3a95..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Network Tap Rule updatable properties. - */ -@Fluent -public class NetworkTapRulePatchableProperties implements JsonSerializable { - /* - * Input method to configure Network Tap Rule. - */ - private ConfigurationType configurationType; - - /* - * Network Tap Rules file URL. - */ - private String tapRulesUrl; - - /* - * List of match configurations. - */ - private List matchConfigurations; - - /* - * List of dynamic match configurations. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("configurationType", - this.configurationType == null ? null : this.configurationType.toString()); - jsonWriter.writeStringField("tapRulesUrl", this.tapRulesUrl); - jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapRulePatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapRulePatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapRulePatchableProperties. - */ - public static NetworkTapRulePatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapRulePatchableProperties deserializedNetworkTapRulePatchableProperties - = new NetworkTapRulePatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("configurationType".equals(fieldName)) { - deserializedNetworkTapRulePatchableProperties.configurationType - = ConfigurationType.fromString(reader.getString()); - } else if ("tapRulesUrl".equals(fieldName)) { - deserializedNetworkTapRulePatchableProperties.tapRulesUrl = reader.getString(); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRulePatchableProperties.matchConfigurations = matchConfigurations; - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRulePatchableProperties.dynamicMatchConfigurations - = dynamicMatchConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapRulePatchableProperties; - }); - } -} 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/models/NetworkTapRuleProperties.java similarity index 78% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleProperties.java index f67ce21ebe5a..f7cb897c0a05 100644 --- 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/models/NetworkTapRuleProperties.java @@ -1,22 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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 java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -25,126 +18,96 @@ * Network Tap Rule Properties defines the resource properties. */ @Fluent -public final class NetworkTapRuleProperties extends AnnotationResource { +public final class NetworkTapRuleProperties implements JsonSerializable { /* - * The ARM resource Id of the NetworkTap. + * Switch configuration description. */ - private String networkTapId; + private String annotation; /* - * Polling interval in seconds. + * Input method to configure Network Tap Rule. */ - private PollingIntervalInSeconds pollingIntervalInSeconds; + private ConfigurationType configurationType; /* - * The last sync timestamp. + * Network Tap Rules file URL. */ - private OffsetDateTime lastSyncedTime; + private String tapRulesUrl; /* - * Configuration state of the resource. + * List of match configurations. */ - private ConfigurationState configurationState; + private List matchConfigurations; /* - * Provisioning state of the resource. + * List of dynamic match configurations. */ - private ProvisioningState provisioningState; + private List dynamicMatchConfigurations; /* - * Administrative state of the resource. + * The ARM resource Id of the NetworkTap. */ - private AdministrativeState administrativeState; + private String networkTapId; /* - * Input method to configure Network Tap Rule. + * Polling interval in seconds. */ - private ConfigurationType configurationType; + private PollingIntervalInSeconds pollingIntervalInSeconds; /* - * Network Tap Rules file URL. + * The last sync timestamp. */ - private String tapRulesUrl; + private OffsetDateTime lastSyncedTime; /* - * List of match configurations. + * Global network tap rule actions */ - private List matchConfigurations; + private GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions; /* - * List of dynamic match configurations. + * Details of the last operation performed on the resource */ - private List dynamicMatchConfigurations; + private LastOperationProperties lastOperation; - /** - * 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. + /* + * Configuration state of the resource. */ - public PollingIntervalInSeconds pollingIntervalInSeconds() { - return this.pollingIntervalInSeconds; - } + private ConfigurationState configurationState; - /** - * Set the pollingIntervalInSeconds property: Polling interval in seconds. - * - * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. - * @return the NetworkTapRuleProperties object itself. + /* + * Provisioning state of the resource. */ - public NetworkTapRuleProperties withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { - this.pollingIntervalInSeconds = pollingIntervalInSeconds; - return this; - } + private ProvisioningState provisioningState; - /** - * Get the lastSyncedTime property: The last sync timestamp. - * - * @return the lastSyncedTime value. + /* + * Administrative state of the resource. */ - public OffsetDateTime lastSyncedTime() { - return this.lastSyncedTime; - } + private AdministrativeState administrativeState; /** - * Get the configurationState property: Configuration state of the resource. - * - * @return the configurationState value. + * Creates an instance of NetworkTapRuleProperties class. */ - public ConfigurationState configurationState() { - return this.configurationState; + public NetworkTapRuleProperties() { } /** - * Get the provisioningState property: Provisioning state of the resource. + * Get the annotation property: Switch configuration description. * - * @return the provisioningState value. + * @return the annotation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public String annotation() { + return this.annotation; } /** - * Get the administrativeState property: Administrative state of the resource. + * Set the annotation property: Switch configuration description. * - * @return the administrativeState value. + * @param annotation the annotation value to set. + * @return the NetworkTapRuleProperties object itself. */ - public AdministrativeState administrativeState() { - return this.administrativeState; + public NetworkTapRuleProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; } /** @@ -230,27 +193,98 @@ public List dynamicMatchConfigurations() { } /** - * {@inheritDoc} + * Get the networkTapId property: The ARM resource Id of the NetworkTap. + * + * @return the networkTapId value. */ - @Override - public NetworkTapRuleProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + 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; } /** - * Validates the instance. + * Get the lastSyncedTime property: The last sync timestamp. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the lastSyncedTime value. */ - @Override - public void validate() { - if (matchConfigurations() != null) { - matchConfigurations().forEach(e -> e.validate()); - } - if (dynamicMatchConfigurations() != null) { - dynamicMatchConfigurations().forEach(e -> e.validate()); - } + public OffsetDateTime lastSyncedTime() { + return this.lastSyncedTime; + } + + /** + * Get the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @return the globalNetworkTapRuleActions value. + */ + public GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions() { + return this.globalNetworkTapRuleActions; + } + + /** + * Set the globalNetworkTapRuleActions property: Global network tap rule actions. + * + * @param globalNetworkTapRuleActions the globalNetworkTapRuleActions value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties + withGlobalNetworkTapRuleActions(GlobalNetworkTapRuleActionProperties globalNetworkTapRuleActions) { + this.globalNetworkTapRuleActions = globalNetworkTapRuleActions; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + + /** + * 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; } /** @@ -259,16 +293,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); - jsonWriter.writeNumberField("pollingIntervalInSeconds", - this.pollingIntervalInSeconds == null ? null : this.pollingIntervalInSeconds.getValue()); jsonWriter.writeStringField("configurationType", this.configurationType == null ? null : this.configurationType.toString()); + jsonWriter.writeStringField("annotation", this.annotation); jsonWriter.writeStringField("tapRulesUrl", this.tapRulesUrl); jsonWriter.writeArrayField("matchConfigurations", this.matchConfigurations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("dynamicMatchConfigurations", this.dynamicMatchConfigurations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("pollingIntervalInSeconds", + this.pollingIntervalInSeconds == null ? null : this.pollingIntervalInSeconds.getValue()); + jsonWriter.writeJsonField("globalNetworkTapRuleActions", this.globalNetworkTapRuleActions); return jsonWriter.writeEndObject(); } @@ -278,6 +313,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkTapRuleProperties if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkTapRuleProperties. */ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IOException { @@ -287,8 +323,21 @@ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedNetworkTapRuleProperties.withAnnotation(reader.getString()); + if ("configurationType".equals(fieldName)) { + deserializedNetworkTapRuleProperties.configurationType + = ConfigurationType.fromString(reader.getString()); + } else if ("annotation".equals(fieldName)) { + deserializedNetworkTapRuleProperties.annotation = reader.getString(); + } else if ("tapRulesUrl".equals(fieldName)) { + deserializedNetworkTapRuleProperties.tapRulesUrl = reader.getString(); + } else if ("matchConfigurations".equals(fieldName)) { + List matchConfigurations + = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); + deserializedNetworkTapRuleProperties.matchConfigurations = matchConfigurations; + } else if ("dynamicMatchConfigurations".equals(fieldName)) { + List dynamicMatchConfigurations + = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); + deserializedNetworkTapRuleProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; } else if ("networkTapId".equals(fieldName)) { deserializedNetworkTapRuleProperties.networkTapId = reader.getString(); } else if ("pollingIntervalInSeconds".equals(fieldName)) { @@ -297,6 +346,11 @@ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IO } else if ("lastSyncedTime".equals(fieldName)) { deserializedNetworkTapRuleProperties.lastSyncedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("globalNetworkTapRuleActions".equals(fieldName)) { + deserializedNetworkTapRuleProperties.globalNetworkTapRuleActions + = GlobalNetworkTapRuleActionProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkTapRuleProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkTapRuleProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -306,19 +360,6 @@ public static NetworkTapRuleProperties fromJson(JsonReader jsonReader) throws IO } else if ("administrativeState".equals(fieldName)) { deserializedNetworkTapRuleProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("configurationType".equals(fieldName)) { - deserializedNetworkTapRuleProperties.configurationType - = ConfigurationType.fromString(reader.getString()); - } else if ("tapRulesUrl".equals(fieldName)) { - deserializedNetworkTapRuleProperties.tapRulesUrl = reader.getString(); - } else if ("matchConfigurations".equals(fieldName)) { - List matchConfigurations - = reader.readArray(reader1 -> NetworkTapRuleMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRuleProperties.matchConfigurations = matchConfigurations; - } else if ("dynamicMatchConfigurations".equals(fieldName)) { - List dynamicMatchConfigurations - = reader.readArray(reader1 -> CommonDynamicMatchConfiguration.fromJson(reader1)); - deserializedNetworkTapRuleProperties.dynamicMatchConfigurations = dynamicMatchConfigurations; } else { reader.skipChildren(); } 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 index 5c51ed53872a..5106e3d54c12 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ 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. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName 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. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName 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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName 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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName 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}. + * @return the response of a NetworkTapRule list operation 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkTapRule list operation 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}. + * @return the response of a NetworkTapRule list operation 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}. + * @return the response of a NetworkTapRule list operation 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. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -148,14 +128,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ 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. @@ -163,13 +141,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ 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. @@ -178,13 +154,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ 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. @@ -192,13 +166,11 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 response of the action validate configuration. + * @return the response. */ 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. @@ -207,14 +179,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 response of the action validate configuration. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkTapRuleName, Context context); /** - * Gets a Network Tap Rule. - * * Get Network Tap Rule resource details. * * @param id the resource ID. @@ -226,8 +196,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St NetworkTapRule getById(String id); /** - * Gets a Network Tap Rule. - * * Get Network Tap Rule resource details. * * @param id the resource ID. @@ -240,8 +208,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param id the resource ID. @@ -252,8 +218,6 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St void deleteById(String id); /** - * Deletes a Network Tap Rule. - * * Delete Network Tap Rule resource. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java deleted file mode 100644 index c4e4432ab9ff..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; -import java.io.IOException; -import java.util.List; - -/** - * List of NetworkTapRules. - */ -@Fluent -public final class NetworkTapRulesListResult implements JsonSerializable { - /* - * List of NetworkTapRule resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkTapRulesListResult class. - */ - public NetworkTapRulesListResult() { - } - - /** - * Get the value property: List of NetworkTapRule resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of NetworkTapRule resources. - * - * @param value the value value to set. - * @return the NetworkTapRulesListResult object itself. - */ - public NetworkTapRulesListResult 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 NetworkTapRulesListResult object itself. - */ - public NetworkTapRulesListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapRulesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapRulesListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapRulesListResult. - */ - public static NetworkTapRulesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapRulesListResult deserializedNetworkTapRulesListResult = new NetworkTapRulesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkTapRuleInner.fromJson(reader1)); - deserializedNetworkTapRulesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkTapRulesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapRulesListResult; - }); - } -} 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 index 0eee5a2165b7..266c68af769f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ 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. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St 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. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St 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. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St 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. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St 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}. + * @return the response of a NetworkTap list operation 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. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkTap list operation 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}. + * @return the response of a NetworkTap list operation 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}. + * @return the response of a NetworkTap list operation 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. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -148,14 +128,12 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -163,13 +141,11 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -178,13 +154,11 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName, Context context); /** - * Gets a Network Tap. - * * Retrieves details of this Network Tap. * * @param id the resource ID. @@ -196,8 +170,6 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc NetworkTap getById(String id); /** - * Gets a Network Tap. - * * Retrieves details of this Network Tap. * * @param id the resource ID. @@ -210,8 +182,6 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc Response getByIdWithResponse(String id, Context context); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param id the resource ID. @@ -222,8 +192,6 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc void deleteById(String id); /** - * Deletes a Network Tap. - * * Deletes Network Tap. * * @param id the resource ID. 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 deleted file mode 100644 index 656ac0c3456b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; -import java.io.IOException; -import java.util.List; - -/** - * List of NetworkTaps. - */ -@Fluent -public final class NetworkTapsListResult implements JsonSerializable { - /* - * List of NetworkTap resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkTapsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkTapsListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkTapsListResult. - */ - public static NetworkTapsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkTapsListResult deserializedNetworkTapsListResult = new NetworkTapsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NetworkTapInner.fromJson(reader1)); - deserializedNetworkTapsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkTapsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkTapsListResult; - }); - } -} 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 7c22df9269d4..dd70fc81305b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -34,102 +34,18 @@ public interface NetworkToNetworkInterconnect { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the nniType property: Type of NNI used. Example: CE | NPB. - * - * @return the nniType value. - */ - NniType nniType(); - - /** - * Gets the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: True/False. - * - * @return the isManagementType value. - */ - IsManagementType isManagementType(); - - /** - * 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 Layer2 Configuration. - * - * @return the layer2Configuration value. - */ - Layer2Configuration layer2Configuration(); - - /** - * 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. + * Gets the properties property: The NetworkToNetworkInterconnect Properties. * - * @return the configurationState value. + * @return the properties value. */ - ConfigurationState configurationState(); + NetworkToNetworkInterconnectProperties properties(); /** - * Gets the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the administrativeState property: Administrative state of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the administrativeState value. + * @return the systemData value. */ - AdministrativeState administrativeState(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -150,7 +66,7 @@ public interface NetworkToNetworkInterconnect { * The entirety of the NetworkToNetworkInterconnect definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithUseOptionB, DefinitionStages.WithCreate { + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -174,32 +90,27 @@ interface WithParentResource { * @param networkFabricName Name of the Network Fabric. * @return the next definition stage. */ - WithUseOptionB withExistingNetworkFabric(String resourceGroupName, String networkFabricName); + WithProperties withExistingNetworkFabric(String resourceGroupName, String networkFabricName); } /** - * The stage of the NetworkToNetworkInterconnect definition allowing to specify useOptionB. + * The stage of the NetworkToNetworkInterconnect definition allowing to specify properties. */ - interface WithUseOptionB { + interface WithProperties { /** - * Specifies the useOptionB property: Based on this option layer3 parameters are mandatory. Example: - * True/False. + * Specifies the properties property: The NetworkToNetworkInterconnect Properties. * - * @param useOptionB Based on this option layer3 parameters are mandatory. Example: True/False. + * @param properties The NetworkToNetworkInterconnect Properties. * @return the next definition stage. */ - WithCreate withUseOptionB(BooleanEnumProperty useOptionB); + WithCreate withProperties(NetworkToNetworkInterconnectProperties properties); } /** * The stage of the NetworkToNetworkInterconnect 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.WithNniType, DefinitionStages.WithIsManagementType, - DefinitionStages.WithLayer2Configuration, DefinitionStages.WithOptionBLayer3Configuration, - DefinitionStages.WithNpbStaticRouteConfiguration, DefinitionStages.WithImportRoutePolicy, - DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithEgressAclId, - DefinitionStages.WithIngressAclId { + interface WithCreate { /** * Executes the create request. * @@ -215,125 +126,6 @@ interface WithCreate extends DefinitionStages.WithNniType, DefinitionStages.With */ NetworkToNetworkInterconnect create(Context context); } - - /** - * The stage of the NetworkToNetworkInterconnect definition allowing to specify nniType. - */ - interface WithNniType { - /** - * Specifies the nniType property: Type of NNI used. Example: CE | NPB. - * - * @param nniType Type of NNI used. Example: CE | NPB. - * @return the next definition stage. - */ - WithCreate withNniType(NniType nniType); - } - - /** - * The stage of the NetworkToNetworkInterconnect definition allowing to specify isManagementType. - */ - interface WithIsManagementType { - /** - * Specifies the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: - * True/False.. - * - * @param isManagementType Configuration to use NNI for Infrastructure Management. Example: True/False. - * @return the next definition stage. - */ - WithCreate withIsManagementType(IsManagementType isManagementType); - } - - /** - * The stage of the NetworkToNetworkInterconnect definition allowing to specify layer2Configuration. - */ - interface WithLayer2Configuration { - /** - * Specifies the layer2Configuration property: Common properties for Layer2 Configuration.. - * - * @param layer2Configuration Common properties for Layer2 Configuration. - * @return the next definition stage. - */ - WithCreate withLayer2Configuration(Layer2Configuration 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); - } } /** @@ -346,9 +138,7 @@ interface WithIngressAclId { /** * The template for NetworkToNetworkInterconnect update. */ - interface Update extends UpdateStages.WithLayer2Configuration, UpdateStages.WithOptionBLayer3Configuration, - UpdateStages.WithNpbStaticRouteConfiguration, UpdateStages.WithImportRoutePolicy, - UpdateStages.WithExportRoutePolicy, UpdateStages.WithEgressAclId, UpdateStages.WithIngressAclId { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -370,94 +160,16 @@ interface Update extends UpdateStages.WithLayer2Configuration, UpdateStages.With */ interface UpdateStages { /** - * The stage of the NetworkToNetworkInterconnect update allowing to specify layer2Configuration. + * The stage of the NetworkToNetworkInterconnect update allowing to specify properties. */ - interface WithLayer2Configuration { + interface WithProperties { /** - * Specifies the layer2Configuration property: Common properties for Layer2Configuration.. + * Specifies the properties property: Resource properties.. * - * @param layer2Configuration Common properties for Layer2Configuration. + * @param properties Resource properties. * @return the next definition stage. */ - 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 update 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. - */ - 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); + Update withProperties(NetworkToNetworkInterconnectPatchProperties properties); } } @@ -477,49 +189,40 @@ interface WithIngressAclId { NetworkToNetworkInterconnect refresh(Context context); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body, - Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState(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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + NniBfdAdministrativeStateResponse updateBfdAdministrativeState(NniBfdAdministrativeStateRequest body); /** - * Implements the operation to the underlying resources. - * * Updates the Admin State. * * @param body Request payload. @@ -527,7 +230,8 @@ CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + NniBfdAdministrativeStateResponse updateBfdAdministrativeState(NniBfdAdministrativeStateRequest 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 index 7a42a8cb79e8..d4a90edaf417 100644 --- 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 @@ -1,47 +1,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchableProperties; import java.io.IOException; /** * The Network To Network Interconnect resource patch definition. */ @Fluent -public final class NetworkToNetworkInterconnectPatch extends ProxyResource { +public final class NetworkToNetworkInterconnectPatch implements JsonSerializable { /* - * Resource properties. - */ - private NetworkToNetworkInterconnectPatchableProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ + * resourceType}/{resourceName}' */ - private SystemData systemData; + private String id; /* - * The type of the resource. + * The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or 'Microsoft.Storage/storageAccounts' */ private String type; /* - * The name of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String name; + private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * Resource properties. */ - private String id; + private NetworkToNetworkInterconnectPatchProperties properties; /** * Creates an instance of NetworkToNetworkInterconnectPatch class. @@ -50,234 +46,61 @@ 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the id property: Fully qualified resource ID for the resource. E.g. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'. * * @return the id value. */ - @Override public String id() { return this.id; } /** - * Get the layer2Configuration property: Common properties for Layer2Configuration. + * Get the type property: The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + * 'Microsoft.Storage/storageAccounts'. * - * @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. + * @return the type value. */ - public String egressAclId() { - return this.innerProperties() == null ? null : this.innerProperties().egressAclId(); + public String type() { + return this.type; } /** - * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param egressAclId the egressAclId value to set. - * @return the NetworkToNetworkInterconnectPatch object itself. + * @return the systemData value. */ - public NetworkToNetworkInterconnectPatch withEgressAclId(String egressAclId) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); - } - this.innerProperties().withEgressAclId(egressAclId); - return this; + public SystemData systemData() { + return this.systemData; } /** - * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * Get the properties property: Resource properties. * - * @return the ingressAclId value. + * @return the properties value. */ - public String ingressAclId() { - return this.innerProperties() == null ? null : this.innerProperties().ingressAclId(); + public NetworkToNetworkInterconnectPatchProperties properties() { + return this.properties; } /** - * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * Set the properties property: Resource properties. * - * @param ingressAclId the ingressAclId value to set. + * @param properties the properties 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); + public NetworkToNetworkInterconnectPatch withProperties(NetworkToNetworkInterconnectPatchProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -287,7 +110,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkToNetworkInterconnectPatch if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectPatch. */ public static NetworkToNetworkInterconnectPatch fromJson(JsonReader jsonReader) throws IOException { @@ -300,15 +122,13 @@ public static NetworkToNetworkInterconnectPatch fromJson(JsonReader jsonReader) if ("id".equals(fieldName)) { deserializedNetworkToNetworkInterconnectPatch.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatch.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedNetworkToNetworkInterconnectPatch.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatch.innerProperties - = NetworkToNetworkInterconnectPatchableProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedNetworkToNetworkInterconnectPatch.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectPatch.properties + = NetworkToNetworkInterconnectPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/NetworkToNetworkInterconnectPatchProperties.java similarity index 52% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatchProperties.java index 3d9bd68c0328..562fdcbcdd44 100644 --- 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/models/NetworkToNetworkInterconnectPatchProperties.java @@ -1,51 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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 java.io.IOException; /** - * Network to Network Interconnect patchable properties. + * Network Tap Rule Patch properties. */ @Fluent -public final class NetworkToNetworkInterconnectPatchableProperties - implements JsonSerializable { +public final class NetworkToNetworkInterconnectPatchProperties + implements JsonSerializable { /* * Common properties for Layer2Configuration. */ - private Layer2Configuration layer2Configuration; + private Layer2ConfigurationPatch layer2Configuration; /* * Common properties for Layer3Configuration. */ - private OptionBLayer3Configuration optionBLayer3Configuration; + private OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration; /* * NPB Static Route Configuration properties. */ - private NpbStaticRouteConfiguration npbStaticRouteConfiguration; + private NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration; + + /* + * Static Route Configuration. + */ + private NniStaticRoutePatchConfiguration staticRouteConfiguration; /* * Import Route Policy information. */ - private ImportRoutePolicyInformation importRoutePolicy; + private ImportRoutePolicyInformationPatch importRoutePolicy; /* * Export Route Policy information */ - private ExportRoutePolicyInformation exportRoutePolicy; + private ExportRoutePolicyInformationPatch exportRoutePolicy; /* * Egress Acl. ARM resource ID of Access Control Lists. @@ -57,10 +57,15 @@ public final class NetworkToNetworkInterconnectPatchableProperties */ private String ingressAclId; + /* + * Micro BFD enabled/disabled state. + */ + private MicroBfdState microBfdState; + /** - * Creates an instance of NetworkToNetworkInterconnectPatchableProperties class. + * Creates an instance of NetworkToNetworkInterconnectPatchProperties class. */ - public NetworkToNetworkInterconnectPatchableProperties() { + public NetworkToNetworkInterconnectPatchProperties() { } /** @@ -68,7 +73,7 @@ public NetworkToNetworkInterconnectPatchableProperties() { * * @return the layer2Configuration value. */ - public Layer2Configuration layer2Configuration() { + public Layer2ConfigurationPatch layer2Configuration() { return this.layer2Configuration; } @@ -76,10 +81,10 @@ public Layer2Configuration layer2Configuration() { * Set the layer2Configuration property: Common properties for Layer2Configuration. * * @param layer2Configuration the layer2Configuration value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withLayer2Configuration(Layer2Configuration layer2Configuration) { + public NetworkToNetworkInterconnectPatchProperties + withLayer2Configuration(Layer2ConfigurationPatch layer2Configuration) { this.layer2Configuration = layer2Configuration; return this; } @@ -89,7 +94,7 @@ public Layer2Configuration layer2Configuration() { * * @return the optionBLayer3Configuration value. */ - public OptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration() { return this.optionBLayer3Configuration; } @@ -97,10 +102,10 @@ public OptionBLayer3Configuration optionBLayer3Configuration() { * Set the optionBLayer3Configuration property: Common properties for Layer3Configuration. * * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { + public NetworkToNetworkInterconnectPatchProperties + withOptionBLayer3Configuration(OptionBLayer3ConfigurationPatchProperties optionBLayer3Configuration) { this.optionBLayer3Configuration = optionBLayer3Configuration; return this; } @@ -110,7 +115,7 @@ public OptionBLayer3Configuration optionBLayer3Configuration() { * * @return the npbStaticRouteConfiguration value. */ - public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + public NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration() { return this.npbStaticRouteConfiguration; } @@ -118,20 +123,41 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { * Set the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. * * @param npbStaticRouteConfiguration the npbStaticRouteConfiguration value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + public NetworkToNetworkInterconnectPatchProperties + withNpbStaticRouteConfiguration(NpbStaticRouteConfigurationPatch npbStaticRouteConfiguration) { this.npbStaticRouteConfiguration = npbStaticRouteConfiguration; return this; } + /** + * Get the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + public NniStaticRoutePatchConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. + */ + public NetworkToNetworkInterconnectPatchProperties + withStaticRouteConfiguration(NniStaticRoutePatchConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + /** * Get the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ - public ImportRoutePolicyInformation importRoutePolicy() { + public ImportRoutePolicyInformationPatch importRoutePolicy() { return this.importRoutePolicy; } @@ -139,10 +165,10 @@ public ImportRoutePolicyInformation importRoutePolicy() { * Set the importRoutePolicy property: Import Route Policy information. * * @param importRoutePolicy the importRoutePolicy value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { + public NetworkToNetworkInterconnectPatchProperties + withImportRoutePolicy(ImportRoutePolicyInformationPatch importRoutePolicy) { this.importRoutePolicy = importRoutePolicy; return this; } @@ -152,7 +178,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { * * @return the exportRoutePolicy value. */ - public ExportRoutePolicyInformation exportRoutePolicy() { + public ExportRoutePolicyInformationPatch exportRoutePolicy() { return this.exportRoutePolicy; } @@ -160,10 +186,10 @@ public ExportRoutePolicyInformation exportRoutePolicy() { * Set the exportRoutePolicy property: Export Route Policy information. * * @param exportRoutePolicy the exportRoutePolicy value to set. - * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties - withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { + public NetworkToNetworkInterconnectPatchProperties + withExportRoutePolicy(ExportRoutePolicyInformationPatch exportRoutePolicy) { this.exportRoutePolicy = exportRoutePolicy; return this; } @@ -181,9 +207,9 @@ public String 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. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties withEgressAclId(String egressAclId) { + public NetworkToNetworkInterconnectPatchProperties withEgressAclId(String egressAclId) { this.egressAclId = egressAclId; return this; } @@ -201,34 +227,31 @@ public String 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. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. */ - public NetworkToNetworkInterconnectPatchableProperties withIngressAclId(String ingressAclId) { + public NetworkToNetworkInterconnectPatchProperties withIngressAclId(String ingressAclId) { this.ingressAclId = ingressAclId; return this; } /** - * Validates the instance. + * Get the microBfdState property: Micro BFD enabled/disabled state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the microBfdState value. */ - 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(); - } + public MicroBfdState microBfdState() { + return this.microBfdState; + } + + /** + * Set the microBfdState property: Micro BFD enabled/disabled state. + * + * @param microBfdState the microBfdState value to set. + * @return the NetworkToNetworkInterconnectPatchProperties object itself. + */ + public NetworkToNetworkInterconnectPatchProperties withMicroBfdState(MicroBfdState microBfdState) { + this.microBfdState = microBfdState; + return this; } /** @@ -240,54 +263,62 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("layer2Configuration", this.layer2Configuration); jsonWriter.writeJsonField("optionBLayer3Configuration", this.optionBLayer3Configuration); jsonWriter.writeJsonField("npbStaticRouteConfiguration", this.npbStaticRouteConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); + jsonWriter.writeStringField("microBfdState", this.microBfdState == null ? null : this.microBfdState.toString()); return jsonWriter.writeEndObject(); } /** - * Reads an instance of NetworkToNetworkInterconnectPatchableProperties from the JsonReader. + * Reads an instance of NetworkToNetworkInterconnectPatchProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NetworkToNetworkInterconnectPatchableProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectPatchableProperties. + * @return An instance of NetworkToNetworkInterconnectPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectPatchProperties. */ - public static NetworkToNetworkInterconnectPatchableProperties fromJson(JsonReader jsonReader) throws IOException { + public static NetworkToNetworkInterconnectPatchProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NetworkToNetworkInterconnectPatchableProperties deserializedNetworkToNetworkInterconnectPatchableProperties - = new NetworkToNetworkInterconnectPatchableProperties(); + NetworkToNetworkInterconnectPatchProperties deserializedNetworkToNetworkInterconnectPatchProperties + = new NetworkToNetworkInterconnectPatchProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("layer2Configuration".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.layer2Configuration - = Layer2Configuration.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.layer2Configuration + = Layer2ConfigurationPatch.fromJson(reader); } else if ("optionBLayer3Configuration".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.optionBLayer3Configuration - = OptionBLayer3Configuration.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.optionBLayer3Configuration + = OptionBLayer3ConfigurationPatchProperties.fromJson(reader); } else if ("npbStaticRouteConfiguration".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.npbStaticRouteConfiguration - = NpbStaticRouteConfiguration.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.npbStaticRouteConfiguration + = NpbStaticRouteConfigurationPatch.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectPatchProperties.staticRouteConfiguration + = NniStaticRoutePatchConfiguration.fromJson(reader); } else if ("importRoutePolicy".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.importRoutePolicy - = ImportRoutePolicyInformation.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.importRoutePolicy + = ImportRoutePolicyInformationPatch.fromJson(reader); } else if ("exportRoutePolicy".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.exportRoutePolicy - = ExportRoutePolicyInformation.fromJson(reader); + deserializedNetworkToNetworkInterconnectPatchProperties.exportRoutePolicy + = ExportRoutePolicyInformationPatch.fromJson(reader); } else if ("egressAclId".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.egressAclId = reader.getString(); + deserializedNetworkToNetworkInterconnectPatchProperties.egressAclId = reader.getString(); } else if ("ingressAclId".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPatchableProperties.ingressAclId = reader.getString(); + deserializedNetworkToNetworkInterconnectPatchProperties.ingressAclId = reader.getString(); + } else if ("microBfdState".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectPatchProperties.microBfdState + = MicroBfdState.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedNetworkToNetworkInterconnectPatchableProperties; + return deserializedNetworkToNetworkInterconnectPatchProperties; }); } } 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/models/NetworkToNetworkInterconnectProperties.java similarity index 73% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectProperties.java index d8815f869508..a30e506c1378 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/models/NetworkToNetworkInterconnectProperties.java @@ -1,26 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.io.IOException; /** @@ -52,7 +40,7 @@ public final class NetworkToNetworkInterconnectProperties /* * Common properties for Layer3Configuration. */ - private NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration; + private OptionBLayer3Configuration optionBLayer3Configuration; /* * NPB Static Route Configuration properties. @@ -60,12 +48,17 @@ public final class NetworkToNetworkInterconnectProperties private NpbStaticRouteConfiguration npbStaticRouteConfiguration; /* - * Import Route Policy configuration. + * Static Route Configuration. + */ + private NniStaticRouteConfiguration staticRouteConfiguration; + + /* + * Import Route Policy information. */ private ImportRoutePolicyInformation importRoutePolicy; /* - * Export Route Policy configuration. + * Export Route Policy information */ private ExportRoutePolicyInformation exportRoutePolicy; @@ -79,6 +72,21 @@ public final class NetworkToNetworkInterconnectProperties */ private String ingressAclId; + /* + * Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + */ + private MicroBfdState microBfdState; + + /* + * Conditional Default Route Configuration properties. + */ + private ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration; + + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -185,7 +193,7 @@ public NetworkToNetworkInterconnectProperties withLayer2Configuration(Layer2Conf * * @return the optionBLayer3Configuration value. */ - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + public OptionBLayer3Configuration optionBLayer3Configuration() { return this.optionBLayer3Configuration; } @@ -195,8 +203,8 @@ public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBL * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. * @return the NetworkToNetworkInterconnectProperties object itself. */ - public NetworkToNetworkInterconnectProperties withOptionBLayer3Configuration( - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + public NetworkToNetworkInterconnectProperties + withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration) { this.optionBLayer3Configuration = optionBLayer3Configuration; return this; } @@ -223,7 +231,28 @@ public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { } /** - * Get the importRoutePolicy property: Import Route Policy configuration. + * Get the staticRouteConfiguration property: Static Route Configuration. + * + * @return the staticRouteConfiguration value. + */ + public NniStaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties + withStaticRouteConfiguration(NniStaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy information. * * @return the importRoutePolicy value. */ @@ -232,7 +261,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { } /** - * Set the importRoutePolicy property: Import Route Policy configuration. + * Set the importRoutePolicy property: Import Route Policy information. * * @param importRoutePolicy the importRoutePolicy value to set. * @return the NetworkToNetworkInterconnectProperties object itself. @@ -244,7 +273,7 @@ public ImportRoutePolicyInformation importRoutePolicy() { } /** - * Get the exportRoutePolicy property: Export Route Policy configuration. + * Get the exportRoutePolicy property: Export Route Policy information. * * @return the exportRoutePolicy value. */ @@ -253,7 +282,7 @@ public ExportRoutePolicyInformation exportRoutePolicy() { } /** - * Set the exportRoutePolicy property: Export Route Policy configuration. + * Set the exportRoutePolicy property: Export Route Policy information. * * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the NetworkToNetworkInterconnectProperties object itself. @@ -304,6 +333,56 @@ public NetworkToNetworkInterconnectProperties withIngressAclId(String ingressAcl return this; } + /** + * Get the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @return the microBfdState value. + */ + public MicroBfdState microBfdState() { + return this.microBfdState; + } + + /** + * Set the microBfdState property: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + * + * @param microBfdState the microBfdState value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withMicroBfdState(MicroBfdState microBfdState) { + this.microBfdState = microBfdState; + return this; + } + + /** + * Get the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @return the conditionalDefaultRouteConfiguration value. + */ + public ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration() { + return this.conditionalDefaultRouteConfiguration; + } + + /** + * Set the conditionalDefaultRouteConfiguration property: Conditional Default Route Configuration properties. + * + * @param conditionalDefaultRouteConfiguration the conditionalDefaultRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withConditionalDefaultRouteConfiguration( + ConditionalDefaultRouteProperties conditionalDefaultRouteConfiguration) { + this.conditionalDefaultRouteConfiguration = conditionalDefaultRouteConfiguration; + return this; + } + + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -331,36 +410,6 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (useOptionB() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property useOptionB in model NetworkToNetworkInterconnectProperties")); - } - 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectProperties.class); - /** * {@inheritDoc} */ @@ -374,10 +423,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("layer2Configuration", this.layer2Configuration); jsonWriter.writeJsonField("optionBLayer3Configuration", this.optionBLayer3Configuration); jsonWriter.writeJsonField("npbStaticRouteConfiguration", this.npbStaticRouteConfiguration); + jsonWriter.writeJsonField("staticRouteConfiguration", this.staticRouteConfiguration); jsonWriter.writeJsonField("importRoutePolicy", this.importRoutePolicy); jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); jsonWriter.writeStringField("egressAclId", this.egressAclId); jsonWriter.writeStringField("ingressAclId", this.ingressAclId); + jsonWriter.writeStringField("microBfdState", this.microBfdState == null ? null : this.microBfdState.toString()); + jsonWriter.writeJsonField("conditionalDefaultRouteConfiguration", this.conditionalDefaultRouteConfiguration); return jsonWriter.writeEndObject(); } @@ -411,10 +463,13 @@ public static NetworkToNetworkInterconnectProperties fromJson(JsonReader jsonRea = Layer2Configuration.fromJson(reader); } else if ("optionBLayer3Configuration".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.optionBLayer3Configuration - = NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.fromJson(reader); + = OptionBLayer3Configuration.fromJson(reader); } else if ("npbStaticRouteConfiguration".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.npbStaticRouteConfiguration = NpbStaticRouteConfiguration.fromJson(reader); + } else if ("staticRouteConfiguration".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.staticRouteConfiguration + = NniStaticRouteConfiguration.fromJson(reader); } else if ("importRoutePolicy".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.importRoutePolicy = ImportRoutePolicyInformation.fromJson(reader); @@ -425,6 +480,15 @@ public static NetworkToNetworkInterconnectProperties fromJson(JsonReader jsonRea deserializedNetworkToNetworkInterconnectProperties.egressAclId = reader.getString(); } else if ("ingressAclId".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.ingressAclId = reader.getString(); + } else if ("microBfdState".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.microBfdState + = MicroBfdState.fromString(reader.getString()); + } else if ("conditionalDefaultRouteConfiguration".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.conditionalDefaultRouteConfiguration + = ConditionalDefaultRouteProperties.fromJson(reader); + } else if ("lastOperation".equals(fieldName)) { + deserializedNetworkToNetworkInterconnectProperties.lastOperation + = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedNetworkToNetworkInterconnectProperties.configurationState = ConfigurationState.fromString(reader.getString()); 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 deleted file mode 100644 index 08fa9a6640f8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Common properties for Layer3Configuration. - */ -@Fluent -public final class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration extends OptionBLayer3Configuration { - /* - * ASN of CE devices for CE/PE connectivity. - */ - private Long fabricAsn; - - /** - * Creates an instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration class. - */ - public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() { - } - - /** - * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. - * - * @return the fabricAsn value. - */ - @Override - public Long fabricAsn() { - return this.fabricAsn; - } - - /** - * {@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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); - jsonWriter.writeNumberField("peerASN", peerAsn()); - jsonWriter.writeNumberField("vlanId", vlanId()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration. - */ - public static NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - = new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withPrimaryIpv4Prefix(reader.getString()); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withPrimaryIpv6Prefix(reader.getString()); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withSecondaryIpv4Prefix(reader.getString()); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withSecondaryIpv6Prefix(reader.getString()); - } else if ("peerASN".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("vlanId".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - .withVlanId(reader.getNullable(JsonReader::getInt)); - } else if ("fabricASN".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.fabricAsn - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; - }); - } -} 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 009edf979870..29c67e1c601e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface NetworkToNetworkInterconnects { /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -30,8 +28,6 @@ Response getWithResponse(String resourceGroupName, String networkToNetworkInterconnectName, Context context); /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -46,8 +42,6 @@ NetworkToNetworkInterconnect get(String resourceGroupName, String networkFabricN String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -60,8 +54,6 @@ NetworkToNetworkInterconnect get(String resourceGroupName, String networkFabricN void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -76,8 +68,6 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo Context 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. @@ -85,13 +75,12 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkToNetworkInterconnect list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable listByNetworkFabric(String resourceGroupName, String 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. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -100,15 +89,14 @@ void delete(String resourceGroupName, String networkFabricName, String networkTo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response of a NetworkToNetworkInterconnect list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName, Context context); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -117,15 +105,13 @@ PagedIterable listByNetworkFabric(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, UpdateAdministrativeState body); /** - * Implements the operation to the underlying resources. - * - * Updates the NPB Static Route BFD Administrative State. + * Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkFabricName Name of the Network Fabric. @@ -135,15 +121,12 @@ CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(String resourceGroupName, - String networkFabricName, String networkToNetworkInterconnectName, UpdateAdministrativeState body, - Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState(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. @@ -153,14 +136,12 @@ CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeStat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body); + NniBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest 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. @@ -171,14 +152,12 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String 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 common response for the state updates. + * @return the response. */ - CommonPostActionResponseForStateUpdate updateAdministrativeState(String resourceGroupName, String networkFabricName, - String networkToNetworkInterconnectName, UpdateAdministrativeState body, Context context); + NniBfdAdministrativeStateResponse updateBfdAdministrativeState(String resourceGroupName, String networkFabricName, + String networkToNetworkInterconnectName, NniBfdAdministrativeStateRequest body, Context context); /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param id the resource ID. @@ -190,8 +169,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource NetworkToNetworkInterconnect getById(String id); /** - * Configuration used to setup CE-PE connectivity. - * * Implements NetworkToNetworkInterconnects GET method. * * @param id the resource ID. @@ -204,8 +181,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource Response getByIdWithResponse(String id, Context context); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param id the resource ID. @@ -216,8 +191,6 @@ CommonPostActionResponseForStateUpdate updateAdministrativeState(String resource void deleteById(String id); /** - * Deletes a NetworkToNetworkInterconnects. - * * Implements NetworkToNetworkInterconnects DELETE method. * * @param id the resource ID. 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 deleted file mode 100644 index b9609f484dff..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; -import java.io.IOException; -import java.util.List; - -/** - * List of Network To Network Interconnects. - */ -@Fluent -public final class NetworkToNetworkInterconnectsList implements JsonSerializable { - /* - * List of NetworkToNetworkInterconnects resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of NetworkToNetworkInterconnectsList class. - */ - public NetworkToNetworkInterconnectsList() { - } - - /** - * Get the value property: List of NetworkToNetworkInterconnects resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of NetworkToNetworkInterconnects resources. - * - * @param value the value value to set. - * @return the NetworkToNetworkInterconnectsList object itself. - */ - public NetworkToNetworkInterconnectsList 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 NetworkToNetworkInterconnectsList object itself. - */ - public NetworkToNetworkInterconnectsList 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkToNetworkInterconnectsList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkToNetworkInterconnectsList if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the NetworkToNetworkInterconnectsList. - */ - public static NetworkToNetworkInterconnectsList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkToNetworkInterconnectsList deserializedNetworkToNetworkInterconnectsList - = new NetworkToNetworkInterconnectsList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkToNetworkInterconnectInner.fromJson(reader1)); - deserializedNetworkToNetworkInterconnectsList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkToNetworkInterconnectsList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkToNetworkInterconnectsList; - }); - } -} 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 index ab1195463801..e37a62ef780f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class NfcSku extends ExpandableStringEnum { /** - * Static value Basic for NfcSku. + * NfcSku-Basic. */ public static final NfcSku BASIC = fromString("Basic"); /** - * Static value Standard for NfcSku. + * NfcSku-Standard. */ public static final NfcSku STANDARD = fromString("Standard"); /** - * Static value HighPerformance for NfcSku. + * NfcSku-HighPerformance. */ public static final NfcSku HIGH_PERFORMANCE = fromString("HighPerformance"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateRequest.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateRequest.java new file mode 100644 index 000000000000..b01139404277 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateRequest.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NNI Bidirectional Forwarding Detection (BFD) Administrative State request. + */ +@Fluent +public final class NniBfdAdministrativeStateRequest implements JsonSerializable { + /* + * Route Type. Choose either Static or OptionA. + */ + private RouteType routeType; + + /* + * State. Select either enable or disable. + */ + private BfdAdministrativeState administrativeState; + + /** + * Creates an instance of NniBfdAdministrativeStateRequest class. + */ + public NniBfdAdministrativeStateRequest() { + } + + /** + * Get the routeType property: Route Type. Choose either Static or OptionA. + * + * @return the routeType value. + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: Route Type. Choose either Static or OptionA. + * + * @param routeType the routeType value to set. + * @return the NniBfdAdministrativeStateRequest object itself. + */ + public NniBfdAdministrativeStateRequest withRouteType(RouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Get the administrativeState property: State. Select either enable or disable. + * + * @return the administrativeState value. + */ + public BfdAdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Set the administrativeState property: State. Select either enable or disable. + * + * @param administrativeState the administrativeState value to set. + * @return the NniBfdAdministrativeStateRequest object itself. + */ + public NniBfdAdministrativeStateRequest withAdministrativeState(BfdAdministrativeState administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("routeType", this.routeType == null ? null : this.routeType.toString()); + jsonWriter.writeStringField("administrativeState", + this.administrativeState == null ? null : this.administrativeState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniBfdAdministrativeStateRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniBfdAdministrativeStateRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniBfdAdministrativeStateRequest. + */ + public static NniBfdAdministrativeStateRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniBfdAdministrativeStateRequest deserializedNniBfdAdministrativeStateRequest + = new NniBfdAdministrativeStateRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("routeType".equals(fieldName)) { + deserializedNniBfdAdministrativeStateRequest.routeType = RouteType.fromString(reader.getString()); + } else if ("administrativeState".equals(fieldName)) { + deserializedNniBfdAdministrativeStateRequest.administrativeState + = BfdAdministrativeState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniBfdAdministrativeStateRequest; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateResponse.java new file mode 100644 index 000000000000..01b6b4889984 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateResponse.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NniBfdAdministrativeStateResponseInner; + +/** + * An immutable client-side representation of NniBfdAdministrativeStateResponse. + */ +public interface NniBfdAdministrativeStateResponse { + /** + * Gets the routeType property: Route Type. Choose either Static or OptionA. + * + * @return the routeType value. + */ + RouteType routeType(); + + /** + * Gets the administrativeState property: State. Select either enable or disable. + * + * @return the administrativeState value. + */ + BfdAdministrativeState administrativeState(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.NniBfdAdministrativeStateResponseInner object. + * + * @return the inner object. + */ + NniBfdAdministrativeStateResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java new file mode 100644 index 000000000000..85e3b6d12a54 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BGP Monitoring Protocol (BMP) patch properties. + */ +@Fluent +public final class NniBmpPatchProperties implements JsonSerializable { + /* + * (BGP Monitoring Protocol (BMP) configuration state. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of NniBmpPatchProperties class. + */ + public NniBmpPatchProperties() { + } + + /** + * Get the configurationState property: (BGP Monitoring Protocol (BMP) configuration state. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: (BGP Monitoring Protocol (BMP) configuration state. + * + * @param configurationState the configurationState value to set. + * @return the NniBmpPatchProperties object itself. + */ + public NniBmpPatchProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniBmpPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniBmpPatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniBmpPatchProperties. + */ + public static NniBmpPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniBmpPatchProperties deserializedNniBmpPatchProperties = new NniBmpPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedNniBmpPatchProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniBmpPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java new file mode 100644 index 000000000000..05175495ad55 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * BGP Monitoring Protocol (BMP) properties. + */ +@Fluent +public final class NniBmpProperties implements JsonSerializable { + /* + * BGP Monitoring Protocol (BMP) Configuration State. + */ + private BmpConfigurationState configurationState; + + /** + * Creates an instance of NniBmpProperties class. + */ + public NniBmpProperties() { + } + + /** + * Get the configurationState property: BGP Monitoring Protocol (BMP) Configuration State. + * + * @return the configurationState value. + */ + public BmpConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Set the configurationState property: BGP Monitoring Protocol (BMP) Configuration State. + * + * @param configurationState the configurationState value to set. + * @return the NniBmpProperties object itself. + */ + public NniBmpProperties withConfigurationState(BmpConfigurationState configurationState) { + this.configurationState = configurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("configurationState", + this.configurationState == null ? null : this.configurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniBmpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniBmpProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NniBmpProperties. + */ + public static NniBmpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniBmpProperties deserializedNniBmpProperties = new NniBmpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("configurationState".equals(fieldName)) { + deserializedNniBmpProperties.configurationState + = BmpConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNniBmpProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java new file mode 100644 index 000000000000..93fc41ad3da9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for NNI. + */ +@Fluent +public final class NniStaticRouteConfiguration implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of NniStaticRouteConfiguration class. + */ + public NniStaticRouteConfiguration() { + } + + /** + * 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 NniStaticRouteConfiguration object itself. + */ + public NniStaticRouteConfiguration 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 NniStaticRouteConfiguration object itself. + */ + public NniStaticRouteConfiguration 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 NniStaticRouteConfiguration object itself. + */ + public NniStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniStaticRouteConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniStaticRouteConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniStaticRouteConfiguration. + */ + public static NniStaticRouteConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniStaticRouteConfiguration deserializedNniStaticRouteConfiguration = new NniStaticRouteConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedNniStaticRouteConfiguration.bfdConfiguration = BfdConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedNniStaticRouteConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); + deserializedNniStaticRouteConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedNniStaticRouteConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java new file mode 100644 index 000000000000..232a0f5a68fe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties for NNI. + */ +@Fluent +public final class NniStaticRoutePatchConfiguration implements JsonSerializable { + /* + * Bidirectional Forwarding Detection (BFD) configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of NniStaticRoutePatchConfiguration class. + */ + public NniStaticRoutePatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: Bidirectional Forwarding Detection (BFD) configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: Bidirectional Forwarding Detection (BFD) configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the NniStaticRoutePatchConfiguration object itself. + */ + public NniStaticRoutePatchConfiguration withBfdConfiguration(BfdPatchConfiguration 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 NniStaticRoutePatchConfiguration object itself. + */ + public NniStaticRoutePatchConfiguration 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 NniStaticRoutePatchConfiguration object itself. + */ + public NniStaticRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NniStaticRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NniStaticRoutePatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NniStaticRoutePatchConfiguration. + */ + public static NniStaticRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NniStaticRoutePatchConfiguration deserializedNniStaticRoutePatchConfiguration + = new NniStaticRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedNniStaticRoutePatchConfiguration.bfdConfiguration + = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNniStaticRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNniStaticRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedNniStaticRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java index e95f652111d8..d2d7673e5024 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class NniType extends ExpandableStringEnum { /** - * Static value CE for NniType. + * NniType-CE(Customer Edge). */ public static final NniType CE = fromString("CE"); /** - * Static value NPB for NniType. + * NniType-NPB(Network Packet Broker). */ public static final NniType NPB = fromString("NPB"); 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 index 9604331ae659..b4f7177e0f59 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -98,23 +98,6 @@ public NpbStaticRouteConfiguration withIpv6Routes(List ip 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()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java new file mode 100644 index 000000000000..9453d87a410e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * NPB Static Route Configuration properties. + */ +@Fluent +public final class NpbStaticRouteConfigurationPatch implements JsonSerializable { + /* + * BFD Configuration properties. + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of NpbStaticRouteConfigurationPatch class. + */ + public NpbStaticRouteConfigurationPatch() { + } + + /** + * Get the bfdConfiguration property: BFD Configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD Configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the NpbStaticRouteConfigurationPatch object itself. + */ + public NpbStaticRouteConfigurationPatch withBfdConfiguration(BfdPatchConfiguration 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 NpbStaticRouteConfigurationPatch object itself. + */ + public NpbStaticRouteConfigurationPatch 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 NpbStaticRouteConfigurationPatch object itself. + */ + public NpbStaticRouteConfigurationPatch withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NpbStaticRouteConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NpbStaticRouteConfigurationPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NpbStaticRouteConfigurationPatch. + */ + public static NpbStaticRouteConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NpbStaticRouteConfigurationPatch deserializedNpbStaticRouteConfigurationPatch + = new NpbStaticRouteConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedNpbStaticRouteConfigurationPatch.bfdConfiguration + = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNpbStaticRouteConfigurationPatch.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedNpbStaticRouteConfigurationPatch.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedNpbStaticRouteConfigurationPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java index 28e7db56a137..1625c085909f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java index f73637abeff1..388cb0ab727c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for and operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable list(); /** - * Returns list of all operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 deleted file mode 100644 index 3e7f461d4404..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peering optionA properties. - */ -@Fluent -public class OptionAProperties implements JsonSerializable { - /* - * MTU to use for option A peering. - */ - private Integer mtu; - - /* - * Vlan Id.Example : 501 - */ - private Integer vlanId; - - /* - * Peer ASN number.Example : 28 - */ - private Long peerAsn; - - /* - * BFD Configuration properties. - */ - private BfdConfiguration bfdConfiguration; - - /** - * Creates an instance of OptionAProperties class. - */ - public OptionAProperties() { - } - - /** - * 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 OptionAProperties object itself. - */ - public OptionAProperties withMtu(Integer mtu) { - this.mtu = mtu; - return this; - } - - /** - * Get the vlanId property: Vlan Id.Example : 501. - * - * @return the vlanId value. - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId property: Vlan Id.Example : 501. - * - * @param vlanId the vlanId value to set. - * @return the OptionAProperties object itself. - */ - public OptionAProperties withVlanId(Integer vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * 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 OptionAProperties object itself. - */ - public OptionAProperties 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 OptionAProperties object itself. - */ - public OptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { - this.bfdConfiguration = bfdConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", this.mtu); - jsonWriter.writeNumberField("vlanId", this.vlanId); - jsonWriter.writeNumberField("peerASN", this.peerAsn); - jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OptionAProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OptionAProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OptionAProperties. - */ - public static OptionAProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OptionAProperties deserializedOptionAProperties = new OptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); - } else if ("vlanId".equals(fieldName)) { - deserializedOptionAProperties.vlanId = reader.getNullable(JsonReader::getInt); - } else if ("peerASN".equals(fieldName)) { - deserializedOptionAProperties.peerAsn = reader.getNullable(JsonReader::getLong); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedOptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java index b085827cd891..8598b8e53fc5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java @@ -1,34 +1,71 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * OptionB Layer3 Configuration properties. */ @Fluent -public class OptionBLayer3Configuration extends Layer3IpPrefixProperties { +public final class OptionBLayer3Configuration implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + /* * ASN of PE devices for CE/PE connectivity.Example : 28 */ - private Long peerAsn; + private long peerASN; /* * VLAN for CE/PE Layer 3 connectivity.Example : 501 */ - private Integer vlanId; + private int vlanId; /* * ASN of CE devices for CE/PE connectivity. */ - private Long fabricAsn; + private Long fabricASN; + + /* + * Provider Edge (PE) Loopback IP Address. + */ + private List peLoopbackIpAddress; + + /* + * BGP Monitoring Protocol (BMP) Configuration. + */ + private NniBmpProperties bmpConfiguration; + + /* + * OptionB Layer3 prefix limit configuration. + */ + private List prefixLimits; /** * Creates an instance of OptionBLayer3Configuration class. @@ -37,22 +74,102 @@ public OptionBLayer3Configuration() { } /** - * Get the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28. + * 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 OptionBLayer3Configuration object itself. + */ + public OptionBLayer3Configuration 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 OptionBLayer3Configuration object itself. + */ + public OptionBLayer3Configuration 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. * - * @return the peerAsn value. + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the OptionBLayer3Configuration object itself. */ - public Long peerAsn() { - return this.peerAsn; + public OptionBLayer3Configuration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; } /** - * Set the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28. + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. * - * @param peerAsn the peerAsn value to set. + * @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 OptionBLayer3Configuration object itself. */ - public OptionBLayer3Configuration withPeerAsn(Long peerAsn) { - this.peerAsn = peerAsn; + public OptionBLayer3Configuration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * Get the peerASN property: ASN of PE devices for CE/PE connectivity.Example : 28. + * + * @return the peerASN value. + */ + public long peerASN() { + return this.peerASN; + } + + /** + * Set the peerASN property: ASN of PE devices for CE/PE connectivity.Example : 28. + * + * @param peerASN the peerASN value to set. + * @return the OptionBLayer3Configuration object itself. + */ + public OptionBLayer3Configuration withPeerASN(long peerASN) { + this.peerASN = peerASN; return this; } @@ -61,7 +178,7 @@ public OptionBLayer3Configuration withPeerAsn(Long peerAsn) { * * @return the vlanId value. */ - public Integer vlanId() { + public int vlanId() { return this.vlanId; } @@ -71,74 +188,78 @@ public Integer vlanId() { * @param vlanId the vlanId value to set. * @return the OptionBLayer3Configuration object itself. */ - public OptionBLayer3Configuration withVlanId(Integer vlanId) { + public OptionBLayer3Configuration withVlanId(int vlanId) { this.vlanId = vlanId; return this; } /** - * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * Get the fabricASN property: ASN of CE devices for CE/PE connectivity. * - * @return the fabricAsn value. + * @return the fabricASN value. */ - public Long fabricAsn() { - return this.fabricAsn; + public Long fabricASN() { + return this.fabricASN; } /** - * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * Get the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. * - * @param fabricAsn the fabricAsn value to set. - * @return the OptionBLayer3Configuration object itself. + * @return the peLoopbackIpAddress value. */ - OptionBLayer3Configuration withFabricAsn(Long fabricAsn) { - this.fabricAsn = fabricAsn; - return this; + public List peLoopbackIpAddress() { + return this.peLoopbackIpAddress; } /** - * {@inheritDoc} + * Set the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @param peLoopbackIpAddress the peLoopbackIpAddress value to set. + * @return the OptionBLayer3Configuration object itself. */ - @Override - public OptionBLayer3Configuration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + public OptionBLayer3Configuration withPeLoopbackIpAddress(List peLoopbackIpAddress) { + this.peLoopbackIpAddress = peLoopbackIpAddress; return this; } /** - * {@inheritDoc} + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @return the bmpConfiguration value. */ - @Override - public OptionBLayer3Configuration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); - return this; + public NniBmpProperties bmpConfiguration() { + return this.bmpConfiguration; } /** - * {@inheritDoc} + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the OptionBLayer3Configuration object itself. */ - @Override - public OptionBLayer3Configuration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + public OptionBLayer3Configuration withBmpConfiguration(NniBmpProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; return this; } /** - * {@inheritDoc} + * Get the prefixLimits property: OptionB Layer3 prefix limit configuration. + * + * @return the prefixLimits value. */ - @Override - public OptionBLayer3Configuration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); - return this; + public List prefixLimits() { + return this.prefixLimits; } /** - * Validates the instance. + * Set the prefixLimits property: OptionB Layer3 prefix limit configuration. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param prefixLimits the prefixLimits value to set. + * @return the OptionBLayer3Configuration object itself. */ - @Override - public void validate() { + public OptionBLayer3Configuration withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; } /** @@ -147,12 +268,16 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryIpv4Prefix", primaryIpv4Prefix()); - jsonWriter.writeStringField("primaryIpv6Prefix", primaryIpv6Prefix()); - jsonWriter.writeStringField("secondaryIpv4Prefix", secondaryIpv4Prefix()); - jsonWriter.writeStringField("secondaryIpv6Prefix", secondaryIpv6Prefix()); - jsonWriter.writeNumberField("peerASN", this.peerAsn); - jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeLongField("peerASN", this.peerASN); + jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + jsonWriter.writeArrayField("peLoopbackIpAddress", this.peLoopbackIpAddress, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -162,6 +287,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OptionBLayer3Configuration if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OptionBLayer3Configuration. */ public static OptionBLayer3Configuration fromJson(JsonReader jsonReader) throws IOException { @@ -171,20 +297,29 @@ public static OptionBLayer3Configuration fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedOptionBLayer3Configuration.withPrimaryIpv4Prefix(reader.getString()); + if ("peerASN".equals(fieldName)) { + deserializedOptionBLayer3Configuration.peerASN = reader.getLong(); + } else if ("vlanId".equals(fieldName)) { + deserializedOptionBLayer3Configuration.vlanId = reader.getInt(); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedOptionBLayer3Configuration.primaryIpv4Prefix = reader.getString(); } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedOptionBLayer3Configuration.withPrimaryIpv6Prefix(reader.getString()); + deserializedOptionBLayer3Configuration.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedOptionBLayer3Configuration.withSecondaryIpv4Prefix(reader.getString()); + deserializedOptionBLayer3Configuration.secondaryIpv4Prefix = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedOptionBLayer3Configuration.withSecondaryIpv6Prefix(reader.getString()); - } else if ("peerASN".equals(fieldName)) { - deserializedOptionBLayer3Configuration.peerAsn = reader.getNullable(JsonReader::getLong); - } else if ("vlanId".equals(fieldName)) { - deserializedOptionBLayer3Configuration.vlanId = reader.getNullable(JsonReader::getInt); + deserializedOptionBLayer3Configuration.secondaryIpv6Prefix = reader.getString(); } else if ("fabricASN".equals(fieldName)) { - deserializedOptionBLayer3Configuration.fabricAsn = reader.getNullable(JsonReader::getLong); + deserializedOptionBLayer3Configuration.fabricASN = reader.getNullable(JsonReader::getLong); + } else if ("peLoopbackIpAddress".equals(fieldName)) { + List peLoopbackIpAddress = reader.readArray(reader1 -> reader1.getString()); + deserializedOptionBLayer3Configuration.peLoopbackIpAddress = peLoopbackIpAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedOptionBLayer3Configuration.bmpConfiguration = NniBmpProperties.fromJson(reader); + } else if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> OptionBLayer3PrefixLimitProperties.fromJson(reader1)); + deserializedOptionBLayer3Configuration.prefixLimits = prefixLimits; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java new file mode 100644 index 000000000000..f315b49182d5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Common properties for Layer3Configuration. + */ +@Fluent +public final class OptionBLayer3ConfigurationPatchProperties + implements JsonSerializable { + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + + /* + * ASN of PE devices for CE/PE connectivity.Example : 28 + */ + private Long peerASN; + + /* + * VLAN for CE/PE Layer 3 connectivity.Example : 501 + */ + private Integer vlanId; + + /* + * ASN of CE devices for CE/PE connectivity. + */ + private Long fabricASN; + + /* + * Provider Edge (PE) Loopback IP Address. + */ + private List peLoopbackIpAddress; + + /* + * BGP Monitoring Protocol (BMP) Configuration. + */ + private NniBmpPatchProperties bmpConfiguration; + + /* + * OptionB Layer3 prefix limit configuration. + */ + private List prefixLimits; + + /** + * Creates an instance of OptionBLayer3ConfigurationPatchProperties class. + */ + public OptionBLayer3ConfigurationPatchProperties() { + } + + /** + * 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 OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties 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 OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties 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 OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties 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 OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * Get the peerASN property: ASN of PE devices for CE/PE connectivity.Example : 28. + * + * @return the peerASN value. + */ + public Long peerASN() { + return this.peerASN; + } + + /** + * Set the peerASN property: ASN of PE devices for CE/PE connectivity.Example : 28. + * + * @param peerASN the peerASN value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the fabricASN property: ASN of CE devices for CE/PE connectivity. + * + * @return the fabricASN value. + */ + public Long fabricASN() { + return this.fabricASN; + } + + /** + * Get the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @return the peLoopbackIpAddress value. + */ + public List peLoopbackIpAddress() { + return this.peLoopbackIpAddress; + } + + /** + * Set the peLoopbackIpAddress property: Provider Edge (PE) Loopback IP Address. + * + * @param peLoopbackIpAddress the peLoopbackIpAddress value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withPeLoopbackIpAddress(List peLoopbackIpAddress) { + this.peLoopbackIpAddress = peLoopbackIpAddress; + return this; + } + + /** + * Get the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @return the bmpConfiguration value. + */ + public NniBmpPatchProperties bmpConfiguration() { + return this.bmpConfiguration; + } + + /** + * Set the bmpConfiguration property: BGP Monitoring Protocol (BMP) Configuration. + * + * @param bmpConfiguration the bmpConfiguration value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties withBmpConfiguration(NniBmpPatchProperties bmpConfiguration) { + this.bmpConfiguration = bmpConfiguration; + return this; + } + + /** + * Get the prefixLimits property: OptionB Layer3 prefix limit configuration. + * + * @return the prefixLimits value. + */ + public List prefixLimits() { + return this.prefixLimits; + } + + /** + * Set the prefixLimits property: OptionB Layer3 prefix limit configuration. + * + * @param prefixLimits the prefixLimits value to set. + * @return the OptionBLayer3ConfigurationPatchProperties object itself. + */ + public OptionBLayer3ConfigurationPatchProperties + withPrefixLimits(List prefixLimits) { + this.prefixLimits = prefixLimits; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + jsonWriter.writeNumberField("peerASN", this.peerASN); + jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeArrayField("peLoopbackIpAddress", this.peLoopbackIpAddress, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("bmpConfiguration", this.bmpConfiguration); + jsonWriter.writeArrayField("prefixLimits", this.prefixLimits, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OptionBLayer3ConfigurationPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OptionBLayer3ConfigurationPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OptionBLayer3ConfigurationPatchProperties. + */ + public static OptionBLayer3ConfigurationPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OptionBLayer3ConfigurationPatchProperties deserializedOptionBLayer3ConfigurationPatchProperties + = new OptionBLayer3ConfigurationPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.primaryIpv4Prefix = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.primaryIpv6Prefix = reader.getString(); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.secondaryIpv4Prefix = reader.getString(); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.secondaryIpv6Prefix = reader.getString(); + } else if ("peerASN".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.peerASN + = reader.getNullable(JsonReader::getLong); + } else if ("vlanId".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.vlanId + = reader.getNullable(JsonReader::getInt); + } else if ("fabricASN".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.fabricASN + = reader.getNullable(JsonReader::getLong); + } else if ("peLoopbackIpAddress".equals(fieldName)) { + List peLoopbackIpAddress = reader.readArray(reader1 -> reader1.getString()); + deserializedOptionBLayer3ConfigurationPatchProperties.peLoopbackIpAddress = peLoopbackIpAddress; + } else if ("bmpConfiguration".equals(fieldName)) { + deserializedOptionBLayer3ConfigurationPatchProperties.bmpConfiguration + = NniBmpPatchProperties.fromJson(reader); + } else if ("prefixLimits".equals(fieldName)) { + List prefixLimits + = reader.readArray(reader1 -> OptionBLayer3PrefixLimitPatchProperties.fromJson(reader1)); + deserializedOptionBLayer3ConfigurationPatchProperties.prefixLimits = prefixLimits; + } else { + reader.skipChildren(); + } + } + + return deserializedOptionBLayer3ConfigurationPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..eb0c3c00959f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * OptionB Layer3 prefix limit patch properties. + */ +@Fluent +public final class OptionBLayer3PrefixLimitPatchProperties + implements JsonSerializable { + /* + * Maximum number of routes allowed. + */ + private Integer maximumRoutes; + + /** + * Creates an instance of OptionBLayer3PrefixLimitPatchProperties class. + */ + public OptionBLayer3PrefixLimitPatchProperties() { + } + + /** + * Get the maximumRoutes property: Maximum number of routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum number of routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the OptionBLayer3PrefixLimitPatchProperties object itself. + */ + public OptionBLayer3PrefixLimitPatchProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OptionBLayer3PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OptionBLayer3PrefixLimitPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OptionBLayer3PrefixLimitPatchProperties. + */ + public static OptionBLayer3PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OptionBLayer3PrefixLimitPatchProperties deserializedOptionBLayer3PrefixLimitPatchProperties + = new OptionBLayer3PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedOptionBLayer3PrefixLimitPatchProperties.maximumRoutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedOptionBLayer3PrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java new file mode 100644 index 000000000000..ff54cadb1a42 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * OptionB Layer3 prefix limit properties. + */ +@Fluent +public final class OptionBLayer3PrefixLimitProperties implements JsonSerializable { + /* + * Maximum number of routes allowed. + */ + private Integer maximumRoutes; + + /** + * Creates an instance of OptionBLayer3PrefixLimitProperties class. + */ + public OptionBLayer3PrefixLimitProperties() { + } + + /** + * Get the maximumRoutes property: Maximum number of routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum number of routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the OptionBLayer3PrefixLimitProperties object itself. + */ + public OptionBLayer3PrefixLimitProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OptionBLayer3PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OptionBLayer3PrefixLimitProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OptionBLayer3PrefixLimitProperties. + */ + public static OptionBLayer3PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OptionBLayer3PrefixLimitProperties deserializedOptionBLayer3PrefixLimitProperties + = new OptionBLayer3PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedOptionBLayer3PrefixLimitProperties.maximumRoutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedOptionBLayer3PrefixLimitProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java index 6ed0f533a4df..4b36de86bf56 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java index 910225e6b517..242e48158c3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class PeeringOption extends ExpandableStringEnum { /** - * Static value OptionA for PeeringOption. + * PeeringOption-OptionA. */ public static final PeeringOption OPTIONA = fromString("OptionA"); /** - * Static value OptionB for PeeringOption. + * PeeringOption-OptionB. */ public static final PeeringOption OPTIONB = fromString("OptionB"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java new file mode 100644 index 000000000000..43287b69552a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Police rate configuration properties. + */ +@Fluent +public final class PoliceRateConfigurationProperties implements JsonSerializable { + /* + * Rate limit in bits per second. + */ + private BitRate bitRate; + + /* + * Burst size in packets. + */ + private BurstSize burstSize; + + /** + * Creates an instance of PoliceRateConfigurationProperties class. + */ + public PoliceRateConfigurationProperties() { + } + + /** + * Get the bitRate property: Rate limit in bits per second. + * + * @return the bitRate value. + */ + public BitRate bitRate() { + return this.bitRate; + } + + /** + * Set the bitRate property: Rate limit in bits per second. + * + * @param bitRate the bitRate value to set. + * @return the PoliceRateConfigurationProperties object itself. + */ + public PoliceRateConfigurationProperties withBitRate(BitRate bitRate) { + this.bitRate = bitRate; + return this; + } + + /** + * Get the burstSize property: Burst size in packets. + * + * @return the burstSize value. + */ + public BurstSize burstSize() { + return this.burstSize; + } + + /** + * Set the burstSize property: Burst size in packets. + * + * @param burstSize the burstSize value to set. + * @return the PoliceRateConfigurationProperties object itself. + */ + public PoliceRateConfigurationProperties withBurstSize(BurstSize burstSize) { + this.burstSize = burstSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bitRate", this.bitRate); + jsonWriter.writeJsonField("burstSize", this.burstSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoliceRateConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoliceRateConfigurationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PoliceRateConfigurationProperties. + */ + public static PoliceRateConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoliceRateConfigurationProperties deserializedPoliceRateConfigurationProperties + = new PoliceRateConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bitRate".equals(fieldName)) { + deserializedPoliceRateConfigurationProperties.bitRate = BitRate.fromJson(reader); + } else if ("burstSize".equals(fieldName)) { + deserializedPoliceRateConfigurationProperties.burstSize = BurstSize.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPoliceRateConfigurationProperties; + }); + } +} 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 index e4638372eec2..4544eadaa9ab 100644 --- 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 @@ -1,10 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.util.ExpandableEnum; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Map; @@ -15,30 +20,31 @@ /** * Polling interval in seconds. */ -public final class PollingIntervalInSeconds implements ExpandableEnum { +public final class PollingIntervalInSeconds + implements ExpandableEnum, JsonSerializable { private static final Map VALUES = new ConcurrentHashMap<>(); private static final Function NEW_INSTANCE = PollingIntervalInSeconds::new; /** - * Static value 30 for PollingIntervalInSeconds. + * 30 PollingIntervalInSeconds. */ - public static final PollingIntervalInSeconds THREE_ZERO = fromValue(30); + public static final PollingIntervalInSeconds THIRTY = fromValue(30); /** - * Static value 60 for PollingIntervalInSeconds. + * 60 PollingIntervalInSeconds. */ - public static final PollingIntervalInSeconds SIX_ZERO = fromValue(60); + public static final PollingIntervalInSeconds SIXTY = fromValue(60); /** - * Static value 90 for PollingIntervalInSeconds. + * 90 PollingIntervalInSeconds. */ - public static final PollingIntervalInSeconds NINE_ZERO = fromValue(90); + public static final PollingIntervalInSeconds NINETY = fromValue(90); /** - * Static value 120 for PollingIntervalInSeconds. + * 120 PollingIntervalInSeconds. */ - public static final PollingIntervalInSeconds ONE_TWO_ZERO = fromValue(120); + public static final PollingIntervalInSeconds ONE_TWENTY = fromValue(120); private final Integer value; @@ -51,9 +57,12 @@ private PollingIntervalInSeconds(Integer value) { * * @param value a value to look for. * @return the corresponding PollingIntervalInSeconds. + * @throws IllegalArgumentException if value is null. */ public static PollingIntervalInSeconds fromValue(Integer value) { - Objects.requireNonNull(value, "'value' cannot be null."); + if (value == null) { + throw new IllegalArgumentException("'value' cannot be null."); + } return VALUES.computeIfAbsent(value, NEW_INSTANCE); } @@ -76,6 +85,35 @@ public Integer getValue() { return this.value; } + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + return jsonWriter.writeInt(getValue()); + } + + /** + * Reads an instance of PollingIntervalInSeconds from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PollingIntervalInSeconds if the JsonReader was pointing to an instance of it, or null if + * the JsonReader was pointing to JSON null. + * @throws IOException If an error occurs while reading the PollingIntervalInSeconds. + * @throws IllegalStateException If unexpected JSON token is found. + */ + public static PollingIntervalInSeconds fromJson(JsonReader jsonReader) throws IOException { + JsonToken nextToken = jsonReader.nextToken(); + if (nextToken == JsonToken.NULL) { + return null; + } + if (nextToken != JsonToken.NUMBER) { + throw new IllegalStateException( + String.format("Unexpected JSON token for %s deserialization: %s", JsonToken.NUMBER, nextToken)); + } + return PollingIntervalInSeconds.fromValue(jsonReader.getInt()); + } + @Override public String toString() { return Objects.toString(this.value); 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 index a75293caa975..bef8ca6c8898 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class PollingType extends ExpandableStringEnum { /** - * Static value Pull for PollingType. + * PollingType-Pull. */ public static final PollingType PULL = fromString("Pull"); /** - * Static value Push for PollingType. + * PollingType-Push. */ public static final PollingType PUSH = fromString("Push"); 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 index 07931e51e643..654ef068daf3 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +16,7 @@ * Port condition that needs to be matched. */ @Fluent -public class PortCondition implements JsonSerializable { +public final class PortCondition implements JsonSerializable { /* * Port type that needs to be matched. */ @@ -124,20 +123,6 @@ public PortCondition withPortGroupNames(List portGroupNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (layer4Protocol() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property layer4Protocol in model PortCondition")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PortCondition.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java new file mode 100644 index 000000000000..9fd8402278f3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Port condition that needs to be matched. + */ +@Fluent +public final class PortConditionPatch implements JsonSerializable { + /* + * Port type that needs to be matched. + */ + private PortType portType; + + /* + * Layer4 protocol type that needs to be matched. + */ + private Layer4Protocol layer4Protocol; + + /* + * List of the Ports that need to be matched. + */ + private List ports; + + /* + * List of the port Group Names that need to be matched. + */ + private List portGroupNames; + + /** + * Creates an instance of PortConditionPatch class. + */ + public PortConditionPatch() { + } + + /** + * 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 PortConditionPatch object itself. + */ + public PortConditionPatch 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 PortConditionPatch object itself. + */ + public PortConditionPatch 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 PortConditionPatch object itself. + */ + public PortConditionPatch withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the portGroupNames property: List of the port Group Names that need to be matched. + * + * @return the portGroupNames value. + */ + public List portGroupNames() { + return this.portGroupNames; + } + + /** + * Set the portGroupNames property: List of the port Group Names that need to be matched. + * + * @param portGroupNames the portGroupNames value to set. + * @return the PortConditionPatch object itself. + */ + public PortConditionPatch withPortGroupNames(List portGroupNames) { + this.portGroupNames = portGroupNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("portType", this.portType == null ? null : this.portType.toString()); + jsonWriter.writeStringField("layer4Protocol", + this.layer4Protocol == null ? null : this.layer4Protocol.toString()); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("portGroupNames", this.portGroupNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortConditionPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PortConditionPatch. + */ + public static PortConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortConditionPatch deserializedPortConditionPatch = new PortConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("portType".equals(fieldName)) { + deserializedPortConditionPatch.portType = PortType.fromString(reader.getString()); + } else if ("layer4Protocol".equals(fieldName)) { + deserializedPortConditionPatch.layer4Protocol = Layer4Protocol.fromString(reader.getString()); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedPortConditionPatch.ports = ports; + } else if ("portGroupNames".equals(fieldName)) { + List portGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPortConditionPatch.portGroupNames = portGroupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPortConditionPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java new file mode 100644 index 000000000000..767d402166c1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Port Group Properties. + */ +@Fluent +public final class PortGroupPatchProperties implements JsonSerializable { + /* + * The name of the port group. + */ + private String name; + + /* + * List of the ports that need to be matched. + */ + private List ports; + + /** + * Creates an instance of PortGroupPatchProperties class. + */ + public PortGroupPatchProperties() { + } + + /** + * 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 PortGroupPatchProperties object itself. + */ + public PortGroupPatchProperties withName(String name) { + this.name = name; + 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 PortGroupPatchProperties object itself. + */ + public PortGroupPatchProperties withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PortGroupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PortGroupPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PortGroupPatchProperties. + */ + public static PortGroupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PortGroupPatchProperties deserializedPortGroupPatchProperties = new PortGroupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPortGroupPatchProperties.name = reader.getString(); + } else if ("ports".equals(fieldName)) { + List ports = reader.readArray(reader1 -> reader1.getString()); + deserializedPortGroupPatchProperties.ports = ports; + } else { + reader.skipChildren(); + } + } + + return deserializedPortGroupPatchProperties; + }); + } +} 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 index 771695980075..7d996b12886e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public PortGroupProperties withPorts(List ports) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index ccc5bc9b2e14..4ed02f0ceb2a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class PortType extends ExpandableStringEnum { /** - * Static value SourcePort for PortType. + * PortType SourcePort. */ public static final PortType SOURCE_PORT = fromString("SourcePort"); /** - * Static value DestinationPort for PortType. + * PortType DestinationPort. */ public static final PortType DESTINATION_PORT = fromString("DestinationPort"); + /** + * PortType Bidirectional. + */ + public static final PortType BIDIRECTIONAL = fromString("Bidirectional"); + /** * Creates a new instance of PortType value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java new file mode 100644 index 000000000000..43d457f723ef --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Prefix Limit Patch properties. + */ +@Fluent +public final class PrefixLimitPatchProperties implements JsonSerializable { + /* + * Maximum routes allowed. + */ + private Integer maximumRoutes; + + /* + * Limit at which route prefixes a warning is generate. + */ + private Integer threshold; + + /* + * Idle time expiry in seconds. + */ + private Integer idleTimeExpiry; + + /** + * Creates an instance of PrefixLimitPatchProperties class. + */ + public PrefixLimitPatchProperties() { + } + + /** + * Get the maximumRoutes property: Maximum routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the PrefixLimitPatchProperties object itself. + */ + public PrefixLimitPatchProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * Get the threshold property: Limit at which route prefixes a warning is generate. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Limit at which route prefixes a warning is generate. + * + * @param threshold the threshold value to set. + * @return the PrefixLimitPatchProperties object itself. + */ + public PrefixLimitPatchProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * Get the idleTimeExpiry property: Idle time expiry in seconds. + * + * @return the idleTimeExpiry value. + */ + public Integer idleTimeExpiry() { + return this.idleTimeExpiry; + } + + /** + * Set the idleTimeExpiry property: Idle time expiry in seconds. + * + * @param idleTimeExpiry the idleTimeExpiry value to set. + * @return the PrefixLimitPatchProperties object itself. + */ + public PrefixLimitPatchProperties withIdleTimeExpiry(Integer idleTimeExpiry) { + this.idleTimeExpiry = idleTimeExpiry; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + jsonWriter.writeNumberField("threshold", this.threshold); + jsonWriter.writeNumberField("idleTimeExpiry", this.idleTimeExpiry); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrefixLimitPatchProperties. + */ + public static PrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrefixLimitPatchProperties deserializedPrefixLimitPatchProperties = new PrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedPrefixLimitPatchProperties.maximumRoutes = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedPrefixLimitPatchProperties.threshold = reader.getNullable(JsonReader::getInt); + } else if ("idleTimeExpiry".equals(fieldName)) { + deserializedPrefixLimitPatchProperties.idleTimeExpiry = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java new file mode 100644 index 000000000000..7df256dc9fe0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Prefix Limit properties. + */ +@Fluent +public final class PrefixLimitProperties implements JsonSerializable { + /* + * Maximum routes allowed. + */ + private Integer maximumRoutes; + + /* + * Limit at which route prefixes a warning is generate. + */ + private Integer threshold; + + /* + * Idle Time Expiry in seconds, default is 60. + */ + private Integer idleTimeExpiry; + + /** + * Creates an instance of PrefixLimitProperties class. + */ + public PrefixLimitProperties() { + } + + /** + * Get the maximumRoutes property: Maximum routes allowed. + * + * @return the maximumRoutes value. + */ + public Integer maximumRoutes() { + return this.maximumRoutes; + } + + /** + * Set the maximumRoutes property: Maximum routes allowed. + * + * @param maximumRoutes the maximumRoutes value to set. + * @return the PrefixLimitProperties object itself. + */ + public PrefixLimitProperties withMaximumRoutes(Integer maximumRoutes) { + this.maximumRoutes = maximumRoutes; + return this; + } + + /** + * Get the threshold property: Limit at which route prefixes a warning is generate. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Limit at which route prefixes a warning is generate. + * + * @param threshold the threshold value to set. + * @return the PrefixLimitProperties object itself. + */ + public PrefixLimitProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * Get the idleTimeExpiry property: Idle Time Expiry in seconds, default is 60. + * + * @return the idleTimeExpiry value. + */ + public Integer idleTimeExpiry() { + return this.idleTimeExpiry; + } + + /** + * Set the idleTimeExpiry property: Idle Time Expiry in seconds, default is 60. + * + * @param idleTimeExpiry the idleTimeExpiry value to set. + * @return the PrefixLimitProperties object itself. + */ + public PrefixLimitProperties withIdleTimeExpiry(Integer idleTimeExpiry) { + this.idleTimeExpiry = idleTimeExpiry; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maximumRoutes", this.maximumRoutes); + jsonWriter.writeNumberField("threshold", this.threshold); + jsonWriter.writeNumberField("idleTimeExpiry", this.idleTimeExpiry); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrefixLimitProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrefixLimitProperties. + */ + public static PrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrefixLimitProperties deserializedPrefixLimitProperties = new PrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maximumRoutes".equals(fieldName)) { + deserializedPrefixLimitProperties.maximumRoutes = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedPrefixLimitProperties.threshold = reader.getNullable(JsonReader::getInt); + } else if ("idleTimeExpiry".equals(fieldName)) { + deserializedPrefixLimitProperties.idleTimeExpiry = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPrefixLimitProperties; + }); + } +} 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 index 1558ca07434c..d1b53d04fa7a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class PrefixType extends ExpandableStringEnum { /** - * Static value Prefix for PrefixType. + * PrefixType Prefix. */ public static final PrefixType PREFIX = fromString("Prefix"); /** - * Static value LongestPrefix for PrefixType. + * PrefixType LongestPrefix. */ public static final PrefixType LONGEST_PREFIX = fromString("LongestPrefix"); 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 e0b83fe63e0d..302b23c2d82a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,32 +12,32 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Static value Accepted for ProvisioningState. + * Accepted Provisioning State. */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Succeeded for ProvisioningState. + * Succeeded Provisioning State. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for ProvisioningState. + * Updating Provisioning State. */ public static final ProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for ProvisioningState. + * Deleting Provisioning State. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for ProvisioningState. + * Failed Provisioning State. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ProvisioningState. + * Canceled Provisioning State. */ public static final ProvisioningState CANCELED = fromString("Canceled"); 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 index b69c5c51385d..8d7c37449fd6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -47,14 +47,6 @@ public RebootProperties withRebootType(RebootType rebootType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 582b51f4c749..84efd8c20271 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,22 +12,22 @@ */ public final class RebootType extends ExpandableStringEnum { /** - * Static value GracefulRebootWithZTP for RebootType. + * RebootType GracefulRebootWithZTP. */ public static final RebootType GRACEFUL_REBOOT_WITH_ZTP = fromString("GracefulRebootWithZTP"); /** - * Static value GracefulRebootWithoutZTP for RebootType. + * RebootType GracefulRebootWithoutZTP. */ public static final RebootType GRACEFUL_REBOOT_WITHOUT_ZTP = fromString("GracefulRebootWithoutZTP"); /** - * Static value UngracefulRebootWithZTP for RebootType. + * RebootType UngracefulRebootWithZTP. */ public static final RebootType UNGRACEFUL_REBOOT_WITH_ZTP = fromString("UngracefulRebootWithZTP"); /** - * Static value UngracefulRebootWithoutZTP for RebootType. + * RebootType UngracefulRebootWithoutZTP. */ public static final RebootType UNGRACEFUL_REBOOT_WITHOUT_ZTP = fromString("UngracefulRebootWithoutZTP"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java index 564c1514c174..4862a1439e0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class RedistributeConnectedSubnets extends ExpandableStringEnum { /** - * Static value True for RedistributeConnectedSubnets. + * RedistributeConnectedSubnets-True. */ public static final RedistributeConnectedSubnets TRUE = fromString("True"); /** - * Static value False for RedistributeConnectedSubnets. + * RedistributeConnectedSubnets-False. */ public static final RedistributeConnectedSubnets FALSE = fromString("False"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java index 02c504a3e2a2..3f00c2b1461c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class RedistributeStaticRoutes extends ExpandableStringEnum { /** - * Static value True for RedistributeStaticRoutes. + * RedistributeStaticRoutes-True. */ public static final RedistributeStaticRoutes TRUE = fromString("True"); /** - * Static value False for RedistributeStaticRoutes. + * RedistributeStaticRoutes-False. */ public static final RedistributeStaticRoutes FALSE = fromString("False"); 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 c5e6907151a8..ad4de2be57e9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -13,8 +13,6 @@ */ public interface RoutePolicies { /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -29,8 +27,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S Context context); /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -43,8 +39,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S RoutePolicy getByResourceGroup(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -56,8 +50,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void deleteByResourceGroup(String resourceGroupName, String routePolicyName); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -70,21 +62,17 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S void delete(String resourceGroupName, String routePolicyName, Context context); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List RoutePolicies by resource group. - * * Implements RoutePolicies list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -92,37 +80,31 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List RoutePolicies by subscription. - * * Implements RoutePolicies 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 RoutePolicies as paginated response with {@link PagedIterable}. + * @return the response of a RoutePolicy list operation as paginated response with {@link PagedIterable}. */ 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. @@ -131,14 +113,12 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -148,7 +128,7 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context); @@ -161,7 +141,7 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String routePolicyName); @@ -174,14 +154,12 @@ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ 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. @@ -189,13 +167,11 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ 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. @@ -204,14 +180,12 @@ ValidateConfigurationResponse validateConfiguration(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String routePolicyName, Context context); /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param id the resource ID. @@ -223,8 +197,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN RoutePolicy getById(String id); /** - * Gets a Route Policy. - * * Implements Route Policy GET method. * * @param id the resource ID. @@ -237,8 +209,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN Response getByIdWithResponse(String id, Context context); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param id the resource ID. @@ -249,8 +219,6 @@ CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupN void deleteById(String id); /** - * Deletes a Route Policy. - * * Implements Route Policy DELETE method. * * @param id the resource ID. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java deleted file mode 100644 index e894b9ed5140..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePoliciesListResult.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; -import java.io.IOException; -import java.util.List; - -/** - * List of RoutePolicies. - */ -@Fluent -public final class RoutePoliciesListResult implements JsonSerializable { - /* - * List of RoutePolicy resources. - */ - private List value; - - /* - * Url to follow for getting next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of RoutePoliciesListResult class. - */ - public RoutePoliciesListResult() { - } - - /** - * Get the value property: List of RoutePolicy resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of RoutePolicy resources. - * - * @param value the value value to set. - * @return the RoutePoliciesListResult object itself. - */ - public RoutePoliciesListResult 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 RoutePoliciesListResult object itself. - */ - public RoutePoliciesListResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RoutePoliciesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RoutePoliciesListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RoutePoliciesListResult. - */ - public static RoutePoliciesListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RoutePoliciesListResult deserializedRoutePoliciesListResult = new RoutePoliciesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RoutePolicyInner.fromJson(reader1)); - deserializedRoutePoliciesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRoutePoliciesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRoutePoliciesListResult; - }); - } -} 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 017ef104b849..90f893ff9a69 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; -import java.util.List; import java.util.Map; /** @@ -51,69 +50,18 @@ public interface RoutePolicy { 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 Network Fabric. - * - * @return the networkFabricId value. - */ - 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: 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 defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - CommunityActionTypes defaultAction(); - - /** - * Gets the statements property: Route Policy statements. + * Gets the properties property: The RoutePolicy properties. * - * @return the statements value. + * @return the properties value. */ - List statements(); + RoutePolicyProperties properties(); /** - * Gets the annotation property: Switch configuration description. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the annotation value. + * @return the systemData value. */ - String annotation(); + SystemData systemData(); /** * Gets the region of the resource. @@ -147,7 +95,7 @@ public interface RoutePolicy { * The entirety of the RoutePolicy definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } /** @@ -191,28 +139,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + WithProperties withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the RoutePolicy definition allowing to specify networkFabricId. + * The stage of the RoutePolicy definition allowing to specify properties. */ - interface WithNetworkFabricId { + interface WithProperties { /** - * Specifies the networkFabricId property: Arm Resource ID of Network Fabric.. + * Specifies the properties property: The RoutePolicy properties. * - * @param networkFabricId Arm Resource ID of Network Fabric. + * @param properties The RoutePolicy properties. * @return the next definition stage. */ - WithCreate withNetworkFabricId(String networkFabricId); + WithCreate withProperties(RoutePolicyProperties properties); } /** * 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.WithAddressFamilyType, - DefinitionStages.WithDefaultAction, DefinitionStages.WithStatements, DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -241,62 +188,6 @@ 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 defaultAction. - */ - interface WithDefaultAction { - /** - * Specifies the defaultAction property: Default action that needs to be applied when no condition is - * matched. Example: Permit | Deny.. - * - * @param defaultAction Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * @return the next definition stage. - */ - WithCreate withDefaultAction(CommunityActionTypes defaultAction); - } - - /** - * 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 { - /** - * Specifies the annotation property: Switch configuration description.. - * - * @param annotation Switch configuration description. - * @return the next definition stage. - */ - WithCreate withAnnotation(String annotation); - } } /** @@ -309,7 +200,7 @@ interface WithAnnotation { /** * The template for RoutePolicy update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithDefaultAction, UpdateStages.WithStatements { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -335,7 +226,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -344,31 +235,16 @@ interface WithTags { } /** - * The stage of the RoutePolicy update allowing to specify defaultAction. + * The stage of the RoutePolicy update allowing to specify properties. */ - interface WithDefaultAction { + interface WithProperties { /** - * Specifies the defaultAction property: Default action that needs to be applied when no condition is - * matched. Example: Permit | Deny.. + * Specifies the properties property: The RoutePolicy patchable properties.. * - * @param defaultAction Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. + * @param properties The RoutePolicy patchable properties. * @return the next definition stage. */ - Update withDefaultAction(CommunityActionTypes defaultAction); - } - - /** - * 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); + Update withProperties(RoutePolicyPatchableProperties properties); } } @@ -388,21 +264,17 @@ interface WithStatements { 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); /** - * Executes enable operation to the underlying resources. - * * Updated the admin state for this Route Policy. * * @param body Request payload. @@ -410,7 +282,7 @@ interface WithStatements { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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. + * @return the response. */ CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); @@ -419,7 +291,7 @@ interface WithStatements { * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ ValidateConfigurationResponse validateConfiguration(); @@ -430,31 +302,27 @@ interface WithStatements { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the response. */ 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. + * @return the response. */ 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. + * @return the response. */ 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 index 026a27dddf36..cc83a8f13d41 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class RoutePolicyActionType extends ExpandableStringEnum { /** - * Static value Permit for RoutePolicyActionType. + * RoutePolicyActionType-Permit. */ public static final RoutePolicyActionType PERMIT = fromString("Permit"); /** - * Static value Deny for RoutePolicyActionType. + * RoutePolicyActionType-Deny. */ public static final RoutePolicyActionType DENY = fromString("Deny"); /** - * Static value Continue for RoutePolicyActionType. + * RoutePolicyActionType-Continue. */ public static final RoutePolicyActionType CONTINUE = fromString("Continue"); 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 index 39d42ef5d7e1..677ea1571e74 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,12 +12,12 @@ */ public final class RoutePolicyConditionType extends ExpandableStringEnum { /** - * Static value Or for RoutePolicyConditionType. + * RoutePolicyConditionType-Or. */ public static final RoutePolicyConditionType OR = fromString("Or"); /** - * Static value And for RoutePolicyConditionType. + * RoutePolicyConditionType-And. */ public static final RoutePolicyConditionType AND = fromString("And"); 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 c7bf64ffba7b..38640bc74ae5 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 @@ -1,27 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyPatchableProperties; import java.io.IOException; -import java.util.List; import java.util.Map; /** * The Route Policy patch resource definition. */ @Fluent -public final class RoutePolicyPatch extends TagsUpdate { +public final class RoutePolicyPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + /* * The RoutePolicy patchable properties. */ - private RoutePolicyPatchableProperties innerProperties; + private RoutePolicyPatchableProperties properties; /** * Creates an instance of RoutePolicyPatch class. @@ -30,91 +34,53 @@ public RoutePolicyPatch() { } /** - * Get the innerProperties property: The RoutePolicy patchable properties. + * Get the tags property: Resource tags. * - * @return the innerProperties value. - */ - private RoutePolicyPatchableProperties innerProperties() { - return this.innerProperties; - } - - /** - * {@inheritDoc} + * @return the tags value. */ - @Override - public RoutePolicyPatch withTags(Map tags) { - super.withTags(tags); - return this; + public Map tags() { + return this.tags; } /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. + * Set the tags property: Resource tags. * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.innerProperties() == null ? null : this.innerProperties().defaultAction(); - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. + * @param tags the tags value to set. * @return the RoutePolicyPatch object itself. */ - public RoutePolicyPatch withDefaultAction(CommunityActionTypes defaultAction) { - if (this.innerProperties() == null) { - this.innerProperties = new RoutePolicyPatchableProperties(); - } - this.innerProperties().withDefaultAction(defaultAction); + public RoutePolicyPatch withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the statements property: Route Policy statements. + * Get the properties property: The RoutePolicy patchable properties. * - * @return the statements value. + * @return the properties value. */ - public List statements() { - return this.innerProperties() == null ? null : this.innerProperties().statements(); + public RoutePolicyPatchableProperties properties() { + return this.properties; } /** - * Set the statements property: Route Policy statements. + * Set the properties property: The RoutePolicy patchable properties. * - * @param statements the statements value to set. + * @param properties the properties value to set. * @return the RoutePolicyPatch object itself. */ - public RoutePolicyPatch withStatements(List statements) { - if (this.innerProperties() == null) { - this.innerProperties = new RoutePolicyPatchableProperties(); - } - this.innerProperties().withStatements(statements); + public RoutePolicyPatch withProperties(RoutePolicyPatchableProperties properties) { + this.properties = properties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -135,9 +101,9 @@ public static RoutePolicyPatch fromJson(JsonReader jsonReader) throws IOExceptio if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRoutePolicyPatch.withTags(tags); + deserializedRoutePolicyPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedRoutePolicyPatch.innerProperties = RoutePolicyPatchableProperties.fromJson(reader); + deserializedRoutePolicyPatch.properties = RoutePolicyPatchableProperties.fromJson(reader); } else { reader.skipChildren(); } 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/models/RoutePolicyPatchableProperties.java similarity index 80% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatchableProperties.java index b7146d7cd523..0466484ce4f4 100644 --- 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/models/RoutePolicyPatchableProperties.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import java.io.IOException; import java.util.List; @@ -18,7 +16,7 @@ * Route Policy patchable properties. */ @Fluent -public class RoutePolicyPatchableProperties implements JsonSerializable { +public final class RoutePolicyPatchableProperties implements JsonSerializable { /* * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. */ @@ -27,7 +25,7 @@ public class RoutePolicyPatchableProperties implements JsonSerializable statements; + private List statements; /** * Creates an instance of RoutePolicyPatchableProperties class. @@ -62,7 +60,7 @@ public RoutePolicyPatchableProperties withDefaultAction(CommunityActionTypes def * * @return the statements value. */ - public List statements() { + public List statements() { return this.statements; } @@ -72,22 +70,11 @@ public List statements() { * @param statements the statements value to set. * @return the RoutePolicyPatchableProperties object itself. */ - public RoutePolicyPatchableProperties withStatements(List statements) { + 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()); - } - } - /** * {@inheritDoc} */ @@ -119,8 +106,8 @@ public static RoutePolicyPatchableProperties fromJson(JsonReader jsonReader) thr deserializedRoutePolicyPatchableProperties.defaultAction = CommunityActionTypes.fromString(reader.getString()); } else if ("statements".equals(fieldName)) { - List statements - = reader.readArray(reader1 -> RoutePolicyStatementProperties.fromJson(reader1)); + List statements + = reader.readArray(reader1 -> RoutePolicyStatementPatchProperties.fromJson(reader1)); deserializedRoutePolicyPatchableProperties.statements = statements; } else { reader.skipChildren(); 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/models/RoutePolicyProperties.java similarity index 82% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyProperties.java index b85e0b372b2d..05deee3cf6cb 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/models/RoutePolicyProperties.java @@ -1,21 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.managednetworkfabric.fluent.models; +package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -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.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import java.io.IOException; import java.util.List; @@ -23,7 +16,22 @@ * RoutePolicyProperties defines the resource properties. */ @Fluent -public final class RoutePolicyProperties extends AnnotationResource { +public final class RoutePolicyProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + */ + private CommunityActionTypes defaultAction; + + /* + * Route Policy statements. + */ + private List statements; + /* * Arm Resource ID of Network Fabric. */ @@ -34,6 +42,11 @@ public final class RoutePolicyProperties extends AnnotationResource { */ private AddressFamilyType addressFamilyType; + /* + * Details of the last operation performed on the resource + */ + private LastOperationProperties lastOperation; + /* * Configuration state of the resource. */ @@ -49,20 +62,72 @@ public final class RoutePolicyProperties extends AnnotationResource { */ private AdministrativeState administrativeState; - /* - * Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + /** + * Creates an instance of RoutePolicyProperties class. */ - private CommunityActionTypes defaultAction; + public RoutePolicyProperties() { + } - /* - * Route Policy statements. + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. */ - private List statements; + public String annotation() { + return this.annotation; + } /** - * Creates an instance of RoutePolicyProperties class. + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the RoutePolicyProperties object itself. */ - public RoutePolicyProperties() { + public RoutePolicyProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @return the defaultAction value. + */ + public CommunityActionTypes defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: + * Permit | Deny. + * + * @param defaultAction the defaultAction value to set. + * @return the RoutePolicyProperties object itself. + */ + public RoutePolicyProperties withDefaultAction(CommunityActionTypes defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * 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; } /** @@ -107,6 +172,15 @@ public RoutePolicyProperties withAddressFamilyType(AddressFamilyType addressFami return this; } + /** + * Get the lastOperation property: Details of the last operation performed on the resource. + * + * @return the lastOperation value. + */ + public LastOperationProperties lastOperation() { + return this.lastOperation; + } + /** * Get the configurationState property: Configuration state of the resource. * @@ -134,88 +208,18 @@ public AdministrativeState administrativeState() { return this.administrativeState; } - /** - * Get the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @return the defaultAction value. - */ - public CommunityActionTypes defaultAction() { - return this.defaultAction; - } - - /** - * Set the defaultAction property: Default action that needs to be applied when no condition is matched. Example: - * Permit | Deny. - * - * @param defaultAction the defaultAction value to set. - * @return the RoutePolicyProperties object itself. - */ - public RoutePolicyProperties withDefaultAction(CommunityActionTypes defaultAction) { - this.defaultAction = defaultAction; - return this; - } - - /** - * 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) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (networkFabricId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property networkFabricId in model RoutePolicyProperties")); - } - if (statements() != null) { - statements().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RoutePolicyProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); + jsonWriter.writeArrayField("statements", this.statements, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("networkFabricId", this.networkFabricId); + jsonWriter.writeStringField("annotation", this.annotation); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); jsonWriter.writeStringField("addressFamilyType", this.addressFamilyType == null ? null : this.addressFamilyType.toString()); - jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); - jsonWriter.writeArrayField("statements", this.statements, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -235,13 +239,22 @@ public static RoutePolicyProperties fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedRoutePolicyProperties.withAnnotation(reader.getString()); + if ("statements".equals(fieldName)) { + List statements + = reader.readArray(reader1 -> RoutePolicyStatementProperties.fromJson(reader1)); + deserializedRoutePolicyProperties.statements = statements; } else if ("networkFabricId".equals(fieldName)) { deserializedRoutePolicyProperties.networkFabricId = reader.getString(); + } else if ("annotation".equals(fieldName)) { + deserializedRoutePolicyProperties.annotation = reader.getString(); + } else if ("defaultAction".equals(fieldName)) { + deserializedRoutePolicyProperties.defaultAction + = CommunityActionTypes.fromString(reader.getString()); } else if ("addressFamilyType".equals(fieldName)) { deserializedRoutePolicyProperties.addressFamilyType = AddressFamilyType.fromString(reader.getString()); + } else if ("lastOperation".equals(fieldName)) { + deserializedRoutePolicyProperties.lastOperation = LastOperationProperties.fromJson(reader); } else if ("configurationState".equals(fieldName)) { deserializedRoutePolicyProperties.configurationState = ConfigurationState.fromString(reader.getString()); @@ -251,13 +264,6 @@ public static RoutePolicyProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("administrativeState".equals(fieldName)) { deserializedRoutePolicyProperties.administrativeState = AdministrativeState.fromString(reader.getString()); - } else if ("defaultAction".equals(fieldName)) { - deserializedRoutePolicyProperties.defaultAction - = CommunityActionTypes.fromString(reader.getString()); - } else if ("statements".equals(fieldName)) { - List statements - = reader.readArray(reader1 -> RoutePolicyStatementProperties.fromJson(reader1)); - deserializedRoutePolicyProperties.statements = statements; } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java new file mode 100644 index 000000000000..b6d9f728a742 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Route Policy Statement properties. + */ +@Fluent +public final class RoutePolicyStatementPatchProperties + implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + + /* + * Sequence to insert to/delete from existing route. + */ + private long sequenceNumber; + + /* + * Route policy condition properties. + */ + private StatementConditionPatchProperties condition; + + /* + * Route policy action properties. + */ + private StatementActionPatchProperties action; + + /** + * Creates an instance of RoutePolicyStatementPatchProperties class. + */ + public RoutePolicyStatementPatchProperties() { + } + + /** + * 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 RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** + * Get the sequenceNumber property: Sequence to insert to/delete from existing route. + * + * @return the sequenceNumber value. + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence to insert to/delete from existing route. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the condition property: Route policy condition properties. + * + * @return the condition value. + */ + public StatementConditionPatchProperties condition() { + return this.condition; + } + + /** + * Set the condition property: Route policy condition properties. + * + * @param condition the condition value to set. + * @return the RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withCondition(StatementConditionPatchProperties condition) { + this.condition = condition; + return this; + } + + /** + * Get the action property: Route policy action properties. + * + * @return the action value. + */ + public StatementActionPatchProperties action() { + return this.action; + } + + /** + * Set the action property: Route policy action properties. + * + * @param action the action value to set. + * @return the RoutePolicyStatementPatchProperties object itself. + */ + public RoutePolicyStatementPatchProperties withAction(StatementActionPatchProperties action) { + this.action = action; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeLongField("sequenceNumber", this.sequenceNumber); + jsonWriter.writeJsonField("condition", this.condition); + jsonWriter.writeJsonField("action", this.action); + jsonWriter.writeStringField("annotation", this.annotation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePolicyStatementPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePolicyStatementPatchProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoutePolicyStatementPatchProperties. + */ + public static RoutePolicyStatementPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePolicyStatementPatchProperties deserializedRoutePolicyStatementPatchProperties + = new RoutePolicyStatementPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sequenceNumber".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.sequenceNumber = reader.getLong(); + } else if ("condition".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.condition + = StatementConditionPatchProperties.fromJson(reader); + } else if ("action".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.action + = StatementActionPatchProperties.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedRoutePolicyStatementPatchProperties.annotation = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePolicyStatementPatchProperties; + }); + } +} 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 77eb1f0d5c65..cebe0c8465ce 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 @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +15,12 @@ * Route Policy Statement properties. */ @Fluent -public final class RoutePolicyStatementProperties extends AnnotationResource { +public final class RoutePolicyStatementProperties implements JsonSerializable { + /* + * Switch configuration description. + */ + private String annotation; + /* * Sequence to insert to/delete from existing route. */ @@ -37,6 +42,26 @@ public final class RoutePolicyStatementProperties extends AnnotationResource { public RoutePolicyStatementProperties() { } + /** + * 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 RoutePolicyStatementProperties object itself. + */ + public RoutePolicyStatementProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + /** * Get the sequenceNumber property: Sequence to insert to/delete from existing route. * @@ -97,50 +122,16 @@ public RoutePolicyStatementProperties withAction(StatementActionProperties actio return this; } - /** - * {@inheritDoc} - */ - @Override - public RoutePolicyStatementProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (condition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property condition in model RoutePolicyStatementProperties")); - } else { - condition().validate(); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property action in model RoutePolicyStatementProperties")); - } else { - action().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RoutePolicyStatementProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("annotation", annotation()); jsonWriter.writeLongField("sequenceNumber", this.sequenceNumber); jsonWriter.writeJsonField("condition", this.condition); jsonWriter.writeJsonField("action", this.action); + jsonWriter.writeStringField("annotation", this.annotation); return jsonWriter.writeEndObject(); } @@ -161,15 +152,15 @@ public static RoutePolicyStatementProperties fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("annotation".equals(fieldName)) { - deserializedRoutePolicyStatementProperties.withAnnotation(reader.getString()); - } else if ("sequenceNumber".equals(fieldName)) { + if ("sequenceNumber".equals(fieldName)) { deserializedRoutePolicyStatementProperties.sequenceNumber = reader.getLong(); } else if ("condition".equals(fieldName)) { deserializedRoutePolicyStatementProperties.condition = StatementConditionProperties.fromJson(reader); } else if ("action".equals(fieldName)) { deserializedRoutePolicyStatementProperties.action = StatementActionProperties.fromJson(reader); + } else if ("annotation".equals(fieldName)) { + deserializedRoutePolicyStatementProperties.annotation = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java new file mode 100644 index 000000000000..41e627034f61 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * VRP Limit patch configuration. + */ +@Fluent +public final class RoutePrefixLimitPatchProperties implements JsonSerializable { + /* + * Hard limit for the routes. + */ + private Integer hardLimit; + + /* + * Threshold for the routes. + */ + private Integer threshold; + + /** + * Creates an instance of RoutePrefixLimitPatchProperties class. + */ + public RoutePrefixLimitPatchProperties() { + } + + /** + * Get the hardLimit property: Hard limit for the routes. + * + * @return the hardLimit value. + */ + public Integer hardLimit() { + return this.hardLimit; + } + + /** + * Set the hardLimit property: Hard limit for the routes. + * + * @param hardLimit the hardLimit value to set. + * @return the RoutePrefixLimitPatchProperties object itself. + */ + public RoutePrefixLimitPatchProperties withHardLimit(Integer hardLimit) { + this.hardLimit = hardLimit; + return this; + } + + /** + * Get the threshold property: Threshold for the routes. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Threshold for the routes. + * + * @param threshold the threshold value to set. + * @return the RoutePrefixLimitPatchProperties object itself. + */ + public RoutePrefixLimitPatchProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("hardLimit", this.hardLimit); + jsonWriter.writeNumberField("threshold", this.threshold); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePrefixLimitPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePrefixLimitPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoutePrefixLimitPatchProperties. + */ + public static RoutePrefixLimitPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePrefixLimitPatchProperties deserializedRoutePrefixLimitPatchProperties + = new RoutePrefixLimitPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hardLimit".equals(fieldName)) { + deserializedRoutePrefixLimitPatchProperties.hardLimit = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedRoutePrefixLimitPatchProperties.threshold = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePrefixLimitPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java new file mode 100644 index 000000000000..231c6fc762c3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Layer3 Route prefix limit configuration. + */ +@Fluent +public final class RoutePrefixLimitProperties implements JsonSerializable { + /* + * Hard limit for the routes. + */ + private Integer hardLimit; + + /* + * Threshold for the routes. + */ + private Integer threshold; + + /** + * Creates an instance of RoutePrefixLimitProperties class. + */ + public RoutePrefixLimitProperties() { + } + + /** + * Get the hardLimit property: Hard limit for the routes. + * + * @return the hardLimit value. + */ + public Integer hardLimit() { + return this.hardLimit; + } + + /** + * Set the hardLimit property: Hard limit for the routes. + * + * @param hardLimit the hardLimit value to set. + * @return the RoutePrefixLimitProperties object itself. + */ + public RoutePrefixLimitProperties withHardLimit(Integer hardLimit) { + this.hardLimit = hardLimit; + return this; + } + + /** + * Get the threshold property: Threshold for the routes. + * + * @return the threshold value. + */ + public Integer threshold() { + return this.threshold; + } + + /** + * Set the threshold property: Threshold for the routes. + * + * @param threshold the threshold value to set. + * @return the RoutePrefixLimitProperties object itself. + */ + public RoutePrefixLimitProperties withThreshold(Integer threshold) { + this.threshold = threshold; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("hardLimit", this.hardLimit); + jsonWriter.writeNumberField("threshold", this.threshold); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoutePrefixLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoutePrefixLimitProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RoutePrefixLimitProperties. + */ + public static RoutePrefixLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoutePrefixLimitProperties deserializedRoutePrefixLimitProperties = new RoutePrefixLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hardLimit".equals(fieldName)) { + deserializedRoutePrefixLimitProperties.hardLimit = reader.getNullable(JsonReader::getInt); + } else if ("threshold".equals(fieldName)) { + deserializedRoutePrefixLimitProperties.threshold = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedRoutePrefixLimitProperties; + }); + } +} 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 index 3098dda5ea4f..44887558c492 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -123,14 +123,6 @@ public RouteTargetInformation withExportIpv6RouteTargets(List exportIpv6 return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java new file mode 100644 index 000000000000..af79afca3238 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Route Target Configuration. + */ +@Fluent +public final class RouteTargetPatchInformation implements JsonSerializable { + /* + * Route Targets to be applied for incoming routes into CE. + */ + private List importIpv4RouteTargets; + + /* + * Route Targets to be applied for incoming routes from CE. + */ + private List importIpv6RouteTargets; + + /* + * Route Targets to be applied for outgoing routes into CE. + */ + private List exportIpv4RouteTargets; + + /* + * Route Targets to be applied for outgoing routes from CE. + */ + private List exportIpv6RouteTargets; + + /** + * Creates an instance of RouteTargetPatchInformation class. + */ + public RouteTargetPatchInformation() { + } + + /** + * 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 RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation 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 RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation 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 RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation 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 RouteTargetPatchInformation object itself. + */ + public RouteTargetPatchInformation withExportIpv6RouteTargets(List exportIpv6RouteTargets) { + this.exportIpv6RouteTargets = exportIpv6RouteTargets; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("importIpv4RouteTargets", this.importIpv4RouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("importIpv6RouteTargets", this.importIpv6RouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportIpv4RouteTargets", this.exportIpv4RouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportIpv6RouteTargets", this.exportIpv6RouteTargets, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RouteTargetPatchInformation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RouteTargetPatchInformation if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RouteTargetPatchInformation. + */ + public static RouteTargetPatchInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RouteTargetPatchInformation deserializedRouteTargetPatchInformation = new RouteTargetPatchInformation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importIpv4RouteTargets".equals(fieldName)) { + List importIpv4RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.importIpv4RouteTargets = importIpv4RouteTargets; + } else if ("importIpv6RouteTargets".equals(fieldName)) { + List importIpv6RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.importIpv6RouteTargets = importIpv6RouteTargets; + } else if ("exportIpv4RouteTargets".equals(fieldName)) { + List exportIpv4RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.exportIpv4RouteTargets = exportIpv4RouteTargets; + } else if ("exportIpv6RouteTargets".equals(fieldName)) { + List exportIpv6RouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedRouteTargetPatchInformation.exportIpv6RouteTargets = exportIpv6RouteTargets; + } else { + reader.skipChildren(); + } + } + + return deserializedRouteTargetPatchInformation; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java new file mode 100644 index 000000000000..39ae553fe04b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Route type to be used. + */ +public final class RouteType extends ExpandableStringEnum { + /** + * RouteType-Static. + */ + public static final RouteType STATIC = fromString("Static"); + + /** + * RouteType-OptionA. + */ + public static final RouteType OPTIONA = fromString("OptionA"); + + /** + * Creates a new instance of RouteType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RouteType() { + } + + /** + * Creates or finds a RouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RouteType. + */ + public static RouteType fromString(String name) { + return fromString(name, RouteType.class); + } + + /** + * Gets known RouteType values. + * + * @return known RouteType values. + */ + public static Collection values() { + return values(RouteType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java new file mode 100644 index 000000000000..2f1f3d528ab7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify Rule condition. + */ +public final class RuleCondition extends ExpandableStringEnum { + /** + * And Rule-Condition. + */ + public static final RuleCondition AND = fromString("And"); + + /** + * Or Rule-Condition. + */ + public static final RuleCondition OR = fromString("Or"); + + /** + * Creates a new instance of RuleCondition value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuleCondition() { + } + + /** + * Creates or finds a RuleCondition from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuleCondition. + */ + public static RuleCondition fromString(String name) { + return fromString(name, RuleCondition.class); + } + + /** + * Gets known RuleCondition values. + * + * @return known RuleCondition values. + */ + public static Collection values() { + return values(RuleCondition.class); + } +} 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 index 0bb8a01abe9b..46332f81d540 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -28,6 +27,26 @@ public final class RuleProperties implements JsonSerializable { */ private List addressList; + /* + * Specify rule condition. + */ + private RuleCondition condition; + + /* + * List of Addresses to be allowed or denied. + */ + private List destinationAddressList; + + /* + * List of source IPv4 and IPv6 address to be allowed or denied. + */ + private List sourceAddressList; + + /* + * List of header Name and source addresses associated with the header. + */ + private List headerAddressList; + /** * Creates an instance of RuleProperties class. */ @@ -75,22 +94,84 @@ public RuleProperties withAddressList(List addressList) { } /** - * Validates the instance. + * Get the condition property: Specify rule condition. + * + * @return the condition value. + */ + public RuleCondition condition() { + return this.condition; + } + + /** + * Set the condition property: Specify rule condition. + * + * @param condition the condition value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withCondition(RuleCondition condition) { + this.condition = condition; + return this; + } + + /** + * Get the destinationAddressList property: List of Addresses to be allowed or denied. + * + * @return the destinationAddressList value. + */ + public List destinationAddressList() { + return this.destinationAddressList; + } + + /** + * Set the destinationAddressList property: List of Addresses to be allowed or denied. + * + * @param destinationAddressList the destinationAddressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withDestinationAddressList(List destinationAddressList) { + this.destinationAddressList = destinationAddressList; + return this; + } + + /** + * Get the sourceAddressList property: List of source IPv4 and IPv6 address to be allowed or denied. + * + * @return the sourceAddressList value. + */ + public List sourceAddressList() { + return this.sourceAddressList; + } + + /** + * Set the sourceAddressList property: List of source IPv4 and IPv6 address to be allowed or denied. + * + * @param sourceAddressList the sourceAddressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withSourceAddressList(List sourceAddressList) { + this.sourceAddressList = sourceAddressList; + return this; + } + + /** + * Get the headerAddressList property: List of header Name and source addresses associated with the header. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model RuleProperties")); - } - if (addressList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property addressList in model RuleProperties")); - } + * @return the headerAddressList value. + */ + public List headerAddressList() { + return this.headerAddressList; } - private static final ClientLogger LOGGER = new ClientLogger(RuleProperties.class); + /** + * Set the headerAddressList property: List of header Name and source addresses associated with the header. + * + * @param headerAddressList the headerAddressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withHeaderAddressList(List headerAddressList) { + this.headerAddressList = headerAddressList; + return this; + } /** * {@inheritDoc} @@ -100,6 +181,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); jsonWriter.writeArrayField("addressList", this.addressList, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("condition", this.condition == null ? null : this.condition.toString()); + jsonWriter.writeArrayField("destinationAddressList", this.destinationAddressList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("sourceAddressList", this.sourceAddressList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("headerAddressList", this.headerAddressList, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -124,6 +212,18 @@ public static RuleProperties fromJson(JsonReader jsonReader) throws IOException } else if ("addressList".equals(fieldName)) { List addressList = reader.readArray(reader1 -> reader1.getString()); deserializedRuleProperties.addressList = addressList; + } else if ("condition".equals(fieldName)) { + deserializedRuleProperties.condition = RuleCondition.fromString(reader.getString()); + } else if ("destinationAddressList".equals(fieldName)) { + List destinationAddressList = reader.readArray(reader1 -> reader1.getString()); + deserializedRuleProperties.destinationAddressList = destinationAddressList; + } else if ("sourceAddressList".equals(fieldName)) { + List sourceAddressList = reader.readArray(reader1 -> reader1.getString()); + deserializedRuleProperties.sourceAddressList = sourceAddressList; + } else if ("headerAddressList".equals(fieldName)) { + List headerAddressList + = reader.readArray(reader1 -> HeaderAddressProperties.fromJson(reader1)); + deserializedRuleProperties.headerAddressList = headerAddressList; } else { reader.skipChildren(); } 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 index c4dab671b860..f873891c701d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,15 +12,20 @@ */ public final class SourceDestinationType extends ExpandableStringEnum { /** - * Static value SourceIP for SourceDestinationType. + * SourceDestinationType SourceIP. */ public static final SourceDestinationType SOURCE_IP = fromString("SourceIP"); /** - * Static value DestinationIP for SourceDestinationType. + * SourceDestinationType DestinationIP. */ public static final SourceDestinationType DESTINATION_IP = fromString("DestinationIP"); + /** + * SourceDestinationType Bidirectional. + */ + public static final SourceDestinationType BIDIRECTIONAL = fromString("Bidirectional"); + /** * Creates a new instance of SourceDestinationType value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java new file mode 100644 index 000000000000..f6cca2575aa4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Route policy action properties. + */ +@Fluent +public final class StatementActionPatchProperties implements JsonSerializable { + /* + * Local Preference of the route policy. + */ + private Long localPreference; + + /* + * Action type. Example: Permit | Deny | Continue. + */ + private RoutePolicyActionType actionType; + + /* + * IP Community Properties. + */ + private ActionIpCommunityPatchProperties ipCommunityProperties; + + /* + * IP Extended Community Properties. + */ + private ActionIpExtendedCommunityPatchProperties ipExtendedCommunityProperties; + + /** + * Creates an instance of StatementActionPatchProperties class. + */ + public StatementActionPatchProperties() { + } + + /** + * Get the localPreference property: Local Preference of the route policy. + * + * @return the localPreference value. + */ + public Long localPreference() { + return this.localPreference; + } + + /** + * Set the localPreference property: Local Preference of the route policy. + * + * @param localPreference the localPreference value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties withLocalPreference(Long localPreference) { + this.localPreference = localPreference; + return this; + } + + /** + * Get the actionType property: Action type. Example: Permit | Deny | Continue. + * + * @return the actionType value. + */ + public RoutePolicyActionType actionType() { + return this.actionType; + } + + /** + * Set the actionType property: Action type. Example: Permit | Deny | Continue. + * + * @param actionType the actionType value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties withActionType(RoutePolicyActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the ipCommunityProperties property: IP Community Properties. + * + * @return the ipCommunityProperties value. + */ + public ActionIpCommunityPatchProperties ipCommunityProperties() { + return this.ipCommunityProperties; + } + + /** + * Set the ipCommunityProperties property: IP Community Properties. + * + * @param ipCommunityProperties the ipCommunityProperties value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties + withIpCommunityProperties(ActionIpCommunityPatchProperties ipCommunityProperties) { + this.ipCommunityProperties = ipCommunityProperties; + return this; + } + + /** + * Get the ipExtendedCommunityProperties property: IP Extended Community Properties. + * + * @return the ipExtendedCommunityProperties value. + */ + public ActionIpExtendedCommunityPatchProperties ipExtendedCommunityProperties() { + return this.ipExtendedCommunityProperties; + } + + /** + * Set the ipExtendedCommunityProperties property: IP Extended Community Properties. + * + * @param ipExtendedCommunityProperties the ipExtendedCommunityProperties value to set. + * @return the StatementActionPatchProperties object itself. + */ + public StatementActionPatchProperties + withIpExtendedCommunityProperties(ActionIpExtendedCommunityPatchProperties ipExtendedCommunityProperties) { + this.ipExtendedCommunityProperties = ipExtendedCommunityProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); + jsonWriter.writeNumberField("localPreference", this.localPreference); + jsonWriter.writeJsonField("ipCommunityProperties", this.ipCommunityProperties); + jsonWriter.writeJsonField("ipExtendedCommunityProperties", this.ipExtendedCommunityProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StatementActionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StatementActionPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the StatementActionPatchProperties. + */ + public static StatementActionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StatementActionPatchProperties deserializedStatementActionPatchProperties + = new StatementActionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionType".equals(fieldName)) { + deserializedStatementActionPatchProperties.actionType + = RoutePolicyActionType.fromString(reader.getString()); + } else if ("localPreference".equals(fieldName)) { + deserializedStatementActionPatchProperties.localPreference + = reader.getNullable(JsonReader::getLong); + } else if ("ipCommunityProperties".equals(fieldName)) { + deserializedStatementActionPatchProperties.ipCommunityProperties + = ActionIpCommunityPatchProperties.fromJson(reader); + } else if ("ipExtendedCommunityProperties".equals(fieldName)) { + deserializedStatementActionPatchProperties.ipExtendedCommunityProperties + = ActionIpExtendedCommunityPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStatementActionPatchProperties; + }); + } +} 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 54917bb87e0e..734d5c4394bf 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -124,27 +123,6 @@ public ActionIpExtendedCommunityProperties ipExtendedCommunityProperties() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actionType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property actionType in model StatementActionProperties")); - } - if (ipCommunityProperties() != null) { - ipCommunityProperties().validate(); - } - if (ipExtendedCommunityProperties() != null) { - ipExtendedCommunityProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StatementActionProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java new file mode 100644 index 000000000000..ec5570eea4e7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Route policy statement condition properties. + */ +@Fluent +public final class StatementConditionPatchProperties implements JsonSerializable { + /* + * List of IP Community resource IDs. + */ + private List ipCommunityIds; + + /* + * List of IP Extended Community resource IDs. + */ + private List ipExtendedCommunityIds; + + /* + * Type of the condition used. + */ + private RoutePolicyConditionType type; + + /* + * Arm Resource Id of IpPrefix. + */ + private String ipPrefixId; + + /** + * Creates an instance of StatementConditionPatchProperties class. + */ + public StatementConditionPatchProperties() { + } + + /** + * Get the ipCommunityIds property: List of IP Community resource IDs. + * + * @return the ipCommunityIds value. + */ + public List ipCommunityIds() { + return this.ipCommunityIds; + } + + /** + * Set the ipCommunityIds property: List of IP Community resource IDs. + * + * @param ipCommunityIds the ipCommunityIds value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withIpCommunityIds(List ipCommunityIds) { + this.ipCommunityIds = ipCommunityIds; + return this; + } + + /** + * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * + * @return the ipExtendedCommunityIds value. + */ + public List ipExtendedCommunityIds() { + return this.ipExtendedCommunityIds; + } + + /** + * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * + * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withIpExtendedCommunityIds(List ipExtendedCommunityIds) { + this.ipExtendedCommunityIds = ipExtendedCommunityIds; + return this; + } + + /** + * 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 StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withType(RoutePolicyConditionType type) { + this.type = type; + return this; + } + + /** + * Get the ipPrefixId property: Arm Resource Id of IpPrefix. + * + * @return the ipPrefixId value. + */ + public String ipPrefixId() { + return this.ipPrefixId; + } + + /** + * Set the ipPrefixId property: Arm Resource Id of IpPrefix. + * + * @param ipPrefixId the ipPrefixId value to set. + * @return the StatementConditionPatchProperties object itself. + */ + public StatementConditionPatchProperties withIpPrefixId(String ipPrefixId) { + this.ipPrefixId = ipPrefixId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("ipCommunityIds", this.ipCommunityIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipExtendedCommunityIds", this.ipExtendedCommunityIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("ipPrefixId", this.ipPrefixId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StatementConditionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StatementConditionPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StatementConditionPatchProperties. + */ + public static StatementConditionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StatementConditionPatchProperties deserializedStatementConditionPatchProperties + = new StatementConditionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipCommunityIds".equals(fieldName)) { + List ipCommunityIds = reader.readArray(reader1 -> reader1.getString()); + deserializedStatementConditionPatchProperties.ipCommunityIds = ipCommunityIds; + } else if ("ipExtendedCommunityIds".equals(fieldName)) { + List ipExtendedCommunityIds = reader.readArray(reader1 -> reader1.getString()); + deserializedStatementConditionPatchProperties.ipExtendedCommunityIds = ipExtendedCommunityIds; + } else if ("type".equals(fieldName)) { + deserializedStatementConditionPatchProperties.type + = RoutePolicyConditionType.fromString(reader.getString()); + } else if ("ipPrefixId".equals(fieldName)) { + deserializedStatementConditionPatchProperties.ipPrefixId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStatementConditionPatchProperties; + }); + } +} 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 016fe4864401..dd5354707f7e 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,17 @@ * Route policy statement condition properties. */ @Fluent -public final class StatementConditionProperties extends IpCommunityIdList { +public final class StatementConditionProperties implements JsonSerializable { + /* + * List of IP Community resource IDs. + */ + private List ipCommunityIds; + + /* + * List of IP Extended Community resource IDs. + */ + private List ipExtendedCommunityIds; + /* * Type of the condition used. */ @@ -26,11 +37,6 @@ public final class StatementConditionProperties extends IpCommunityIdList { */ private String ipPrefixId; - /* - * List of IP Extended Community resource IDs. - */ - private List ipExtendedCommunityIds; - /** * Creates an instance of StatementConditionProperties class. */ @@ -38,81 +44,83 @@ public StatementConditionProperties() { } /** - * Get the type property: Type of the condition used. + * Get the ipCommunityIds property: List of IP Community resource IDs. * - * @return the type value. + * @return the ipCommunityIds value. */ - public RoutePolicyConditionType type() { - return this.type; + public List ipCommunityIds() { + return this.ipCommunityIds; } /** - * Set the type property: Type of the condition used. + * Set the ipCommunityIds property: List of IP Community resource IDs. * - * @param type the type value to set. + * @param ipCommunityIds the ipCommunityIds value to set. * @return the StatementConditionProperties object itself. */ - public StatementConditionProperties withType(RoutePolicyConditionType type) { - this.type = type; + public StatementConditionProperties withIpCommunityIds(List ipCommunityIds) { + this.ipCommunityIds = ipCommunityIds; return this; } /** - * Get the ipPrefixId property: Arm Resource Id of IpPrefix. + * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. * - * @return the ipPrefixId value. + * @return the ipExtendedCommunityIds value. */ - public String ipPrefixId() { - return this.ipPrefixId; + public List ipExtendedCommunityIds() { + return this.ipExtendedCommunityIds; } /** - * Set the ipPrefixId property: Arm Resource Id of IpPrefix. + * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. * - * @param ipPrefixId the ipPrefixId value to set. + * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set. * @return the StatementConditionProperties object itself. */ - public StatementConditionProperties withIpPrefixId(String ipPrefixId) { - this.ipPrefixId = ipPrefixId; + public StatementConditionProperties withIpExtendedCommunityIds(List ipExtendedCommunityIds) { + this.ipExtendedCommunityIds = ipExtendedCommunityIds; return this; } /** - * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * Get the type property: Type of the condition used. * - * @return the ipExtendedCommunityIds value. + * @return the type value. */ - public List ipExtendedCommunityIds() { - return this.ipExtendedCommunityIds; + public RoutePolicyConditionType type() { + return this.type; } /** - * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs. + * Set the type property: Type of the condition used. * - * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set. + * @param type the type value to set. * @return the StatementConditionProperties object itself. */ - public StatementConditionProperties withIpExtendedCommunityIds(List ipExtendedCommunityIds) { - this.ipExtendedCommunityIds = ipExtendedCommunityIds; + public StatementConditionProperties withType(RoutePolicyConditionType type) { + this.type = type; return this; } /** - * {@inheritDoc} + * Get the ipPrefixId property: Arm Resource Id of IpPrefix. + * + * @return the ipPrefixId value. */ - @Override - public StatementConditionProperties withIpCommunityIds(List ipCommunityIds) { - super.withIpCommunityIds(ipCommunityIds); - return this; + public String ipPrefixId() { + return this.ipPrefixId; } /** - * Validates the instance. + * Set the ipPrefixId property: Arm Resource Id of IpPrefix. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param ipPrefixId the ipPrefixId value to set. + * @return the StatementConditionProperties object itself. */ - @Override - public void validate() { + public StatementConditionProperties withIpPrefixId(String ipPrefixId) { + this.ipPrefixId = ipPrefixId; + return this; } /** @@ -121,12 +129,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipCommunityIds", ipCommunityIds(), + jsonWriter.writeArrayField("ipCommunityIds", this.ipCommunityIds, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("ipPrefixId", this.ipPrefixId); jsonWriter.writeArrayField("ipExtendedCommunityIds", this.ipExtendedCommunityIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("ipPrefixId", this.ipPrefixId); return jsonWriter.writeEndObject(); } @@ -147,15 +155,15 @@ public static StatementConditionProperties fromJson(JsonReader jsonReader) throw if ("ipCommunityIds".equals(fieldName)) { List ipCommunityIds = reader.readArray(reader1 -> reader1.getString()); - deserializedStatementConditionProperties.withIpCommunityIds(ipCommunityIds); + deserializedStatementConditionProperties.ipCommunityIds = ipCommunityIds; + } else if ("ipExtendedCommunityIds".equals(fieldName)) { + List ipExtendedCommunityIds = reader.readArray(reader1 -> reader1.getString()); + deserializedStatementConditionProperties.ipExtendedCommunityIds = ipExtendedCommunityIds; } else if ("type".equals(fieldName)) { deserializedStatementConditionProperties.type = RoutePolicyConditionType.fromString(reader.getString()); } else if ("ipPrefixId".equals(fieldName)) { deserializedStatementConditionProperties.ipPrefixId = reader.getString(); - } else if ("ipExtendedCommunityIds".equals(fieldName)) { - List ipExtendedCommunityIds = reader.readArray(reader1 -> reader1.getString()); - deserializedStatementConditionProperties.ipExtendedCommunityIds = ipExtendedCommunityIds; } else { reader.skipChildren(); } 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 a049d7d7124a..aac0553dba17 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * Static Route Configuration properties. */ @Fluent -public class StaticRouteConfiguration implements JsonSerializable { +public final class StaticRouteConfiguration implements JsonSerializable { /* * BFD configuration properties */ @@ -32,6 +32,11 @@ public class StaticRouteConfiguration implements JsonSerializable ipv6Routes; + /* + * Extension. Example: NoExtension | NPB. + */ + private Extension extension; + /** * Creates an instance of StaticRouteConfiguration class. */ @@ -99,20 +104,23 @@ public StaticRouteConfiguration withIpv6Routes(List ipv6R } /** - * Validates the instance. + * 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. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param extension the extension value to set. + * @return the StaticRouteConfiguration object itself. */ - public void validate() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - if (ipv4Routes() != null) { - ipv4Routes().forEach(e -> e.validate()); - } - if (ipv6Routes() != null) { - ipv6Routes().forEach(e -> e.validate()); - } + public StaticRouteConfiguration withExtension(Extension extension) { + this.extension = extension; + return this; } /** @@ -124,6 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("extension", this.extension == null ? null : this.extension.toString()); return jsonWriter.writeEndObject(); } @@ -152,6 +161,8 @@ public static StaticRouteConfiguration fromJson(JsonReader jsonReader) throws IO List ipv6Routes = reader.readArray(reader1 -> StaticRouteProperties.fromJson(reader1)); deserializedStaticRouteConfiguration.ipv6Routes = ipv6Routes; + } else if ("extension".equals(fieldName)) { + deserializedStaticRouteConfiguration.extension = Extension.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java new file mode 100644 index 000000000000..ec400d4dbe4a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Static Route Configuration properties. + */ +@Fluent +public final class StaticRoutePatchConfiguration implements JsonSerializable { + /* + * BFD configuration properties + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + private List ipv6Routes; + + /** + * Creates an instance of StaticRoutePatchConfiguration class. + */ + public StaticRoutePatchConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the StaticRoutePatchConfiguration object itself. + */ + public StaticRoutePatchConfiguration withBfdConfiguration(BfdPatchConfiguration 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 StaticRoutePatchConfiguration object itself. + */ + public StaticRoutePatchConfiguration 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 StaticRoutePatchConfiguration object itself. + */ + public StaticRoutePatchConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeArrayField("ipv4Routes", this.ipv4Routes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("ipv6Routes", this.ipv6Routes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRoutePatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRoutePatchConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StaticRoutePatchConfiguration. + */ + public static StaticRoutePatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRoutePatchConfiguration deserializedStaticRoutePatchConfiguration + = new StaticRoutePatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bfdConfiguration".equals(fieldName)) { + deserializedStaticRoutePatchConfiguration.bfdConfiguration = BfdPatchConfiguration.fromJson(reader); + } else if ("ipv4Routes".equals(fieldName)) { + List ipv4Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedStaticRoutePatchConfiguration.ipv4Routes = ipv4Routes; + } else if ("ipv6Routes".equals(fieldName)) { + List ipv6Routes + = reader.readArray(reader1 -> StaticRoutePatchProperties.fromJson(reader1)); + deserializedStaticRoutePatchConfiguration.ipv6Routes = ipv6Routes; + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRoutePatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java new file mode 100644 index 000000000000..2863e1d9d4ed --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Route Properties. + */ +@Fluent +public final class StaticRoutePatchProperties implements JsonSerializable { + /* + * Prefix of the route. + */ + private String prefix; + + /* + * List of next hop addresses. + */ + private List nextHop; + + /** + * Creates an instance of StaticRoutePatchProperties class. + */ + public StaticRoutePatchProperties() { + } + + /** + * Get the prefix property: Prefix of the route. + * + * @return the prefix value. + */ + public String prefix() { + return this.prefix; + } + + /** + * Set the prefix property: Prefix of the route. + * + * @param prefix the prefix value to set. + * @return the StaticRoutePatchProperties object itself. + */ + public StaticRoutePatchProperties withPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Get the nextHop property: List of next hop addresses. + * + * @return the nextHop value. + */ + public List nextHop() { + return this.nextHop; + } + + /** + * Set the nextHop property: List of next hop addresses. + * + * @param nextHop the nextHop value to set. + * @return the StaticRoutePatchProperties object itself. + */ + public StaticRoutePatchProperties withNextHop(List nextHop) { + this.nextHop = nextHop; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("prefix", this.prefix); + jsonWriter.writeArrayField("nextHop", this.nextHop, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRoutePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRoutePatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the StaticRoutePatchProperties. + */ + public static StaticRoutePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRoutePatchProperties deserializedStaticRoutePatchProperties = new StaticRoutePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("prefix".equals(fieldName)) { + deserializedStaticRoutePatchProperties.prefix = reader.getString(); + } else if ("nextHop".equals(fieldName)) { + List nextHop = reader.readArray(reader1 -> reader1.getString()); + deserializedStaticRoutePatchProperties.nextHop = nextHop; + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRoutePatchProperties; + }); + } +} 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 9a64fbc1a62d..491d6b17ab87 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -74,24 +73,6 @@ public StaticRouteProperties withNextHop(List nextHop) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (prefix() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property prefix in model StaticRouteProperties")); - } - if (nextHop() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property nextHop in model StaticRouteProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StaticRouteProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java new file mode 100644 index 000000000000..9730b3b7d80a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Static Route - route policy properties. + */ +@Fluent +public final class StaticRouteRoutePolicy implements JsonSerializable { + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + private L3ExportRoutePolicy exportRoutePolicy; + + /** + * Creates an instance of StaticRouteRoutePolicy class. + */ + public StaticRouteRoutePolicy() { + } + + /** + * 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 StaticRouteRoutePolicy object itself. + */ + public StaticRouteRoutePolicy withExportRoutePolicy(L3ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRouteRoutePolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRouteRoutePolicy if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the StaticRouteRoutePolicy. + */ + public static StaticRouteRoutePolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRouteRoutePolicy deserializedStaticRouteRoutePolicy = new StaticRouteRoutePolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportRoutePolicy".equals(fieldName)) { + deserializedStaticRouteRoutePolicy.exportRoutePolicy = L3ExportRoutePolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRouteRoutePolicy; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java new file mode 100644 index 000000000000..08118a06e103 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Static Route - route policy properties. + */ +@Fluent +public final class StaticRouteRoutePolicyPatch implements JsonSerializable { + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + private L3ExportRoutePolicyPatch exportRoutePolicy; + + /** + * Creates an instance of StaticRouteRoutePolicyPatch class. + */ + public StaticRouteRoutePolicyPatch() { + } + + /** + * Get the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @return the exportRoutePolicy value. + */ + public L3ExportRoutePolicyPatch 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 StaticRouteRoutePolicyPatch object itself. + */ + public StaticRouteRoutePolicyPatch withExportRoutePolicy(L3ExportRoutePolicyPatch exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("exportRoutePolicy", this.exportRoutePolicy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StaticRouteRoutePolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StaticRouteRoutePolicyPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StaticRouteRoutePolicyPatch. + */ + public static StaticRouteRoutePolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StaticRouteRoutePolicyPatch deserializedStaticRouteRoutePolicyPatch = new StaticRouteRoutePolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportRoutePolicy".equals(fieldName)) { + deserializedStaticRouteRoutePolicyPatch.exportRoutePolicy + = L3ExportRoutePolicyPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStaticRouteRoutePolicyPatch; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java new file mode 100644 index 000000000000..9d144f4d07e1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Station Configuration State. + */ +public final class StationConfigurationState extends ExpandableStringEnum { + /** + * StationConfigurationState Enabled. + */ + public static final StationConfigurationState ENABLED = fromString("Enabled"); + + /** + * StationConfigurationState Disabled. + */ + public static final StationConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of StationConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StationConfigurationState() { + } + + /** + * Creates or finds a StationConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding StationConfigurationState. + */ + public static StationConfigurationState fromString(String name) { + return fromString(name, StationConfigurationState.class); + } + + /** + * Gets known StationConfigurationState values. + * + * @return known StationConfigurationState values. + */ + public static Collection values() { + return values(StationConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java new file mode 100644 index 000000000000..8309b1d8e65f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Station Connection Mode. + */ +public final class StationConnectionMode extends ExpandableStringEnum { + /** + * StationConnectionMode Active. + */ + public static final StationConnectionMode ACTIVE = fromString("Active"); + + /** + * StationConnectionMode Passive. + */ + public static final StationConnectionMode PASSIVE = fromString("Passive"); + + /** + * Creates a new instance of StationConnectionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StationConnectionMode() { + } + + /** + * Creates or finds a StationConnectionMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding StationConnectionMode. + */ + public static StationConnectionMode fromString(String name) { + return fromString(name, StationConnectionMode.class); + } + + /** + * Gets known StationConnectionMode values. + * + * @return known StationConnectionMode values. + */ + public static Collection values() { + return values(StationConnectionMode.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java new file mode 100644 index 000000000000..268293d5b708 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Station Connection PATCH Properties. + */ +@Fluent +public final class StationConnectionPatchProperties implements JsonSerializable { + /* + * Connection keepalive idle time in seconds + */ + private Integer keepaliveIdleTime; + + /* + * Probe interval in seconds, default value is 60 + */ + private Integer probeInterval; + + /* + * Probe count, default value is 10 + */ + private Integer probeCount; + + /** + * Creates an instance of StationConnectionPatchProperties class. + */ + public StationConnectionPatchProperties() { + } + + /** + * Get the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @return the keepaliveIdleTime value. + */ + public Integer keepaliveIdleTime() { + return this.keepaliveIdleTime; + } + + /** + * Set the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @param keepaliveIdleTime the keepaliveIdleTime value to set. + * @return the StationConnectionPatchProperties object itself. + */ + public StationConnectionPatchProperties withKeepaliveIdleTime(Integer keepaliveIdleTime) { + this.keepaliveIdleTime = keepaliveIdleTime; + return this; + } + + /** + * Get the probeInterval property: Probe interval in seconds, default value is 60. + * + * @return the probeInterval value. + */ + public Integer probeInterval() { + return this.probeInterval; + } + + /** + * Set the probeInterval property: Probe interval in seconds, default value is 60. + * + * @param probeInterval the probeInterval value to set. + * @return the StationConnectionPatchProperties object itself. + */ + public StationConnectionPatchProperties withProbeInterval(Integer probeInterval) { + this.probeInterval = probeInterval; + return this; + } + + /** + * Get the probeCount property: Probe count, default value is 10. + * + * @return the probeCount value. + */ + public Integer probeCount() { + return this.probeCount; + } + + /** + * Set the probeCount property: Probe count, default value is 10. + * + * @param probeCount the probeCount value to set. + * @return the StationConnectionPatchProperties object itself. + */ + public StationConnectionPatchProperties withProbeCount(Integer probeCount) { + this.probeCount = probeCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("keepaliveIdleTime", this.keepaliveIdleTime); + jsonWriter.writeNumberField("probeInterval", this.probeInterval); + jsonWriter.writeNumberField("probeCount", this.probeCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StationConnectionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StationConnectionPatchProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StationConnectionPatchProperties. + */ + public static StationConnectionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StationConnectionPatchProperties deserializedStationConnectionPatchProperties + = new StationConnectionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keepaliveIdleTime".equals(fieldName)) { + deserializedStationConnectionPatchProperties.keepaliveIdleTime + = reader.getNullable(JsonReader::getInt); + } else if ("probeInterval".equals(fieldName)) { + deserializedStationConnectionPatchProperties.probeInterval = reader.getNullable(JsonReader::getInt); + } else if ("probeCount".equals(fieldName)) { + deserializedStationConnectionPatchProperties.probeCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedStationConnectionPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java new file mode 100644 index 000000000000..29310a751918 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Station Connection Properties. + */ +@Fluent +public final class StationConnectionProperties implements JsonSerializable { + /* + * Connection keepalive idle time in seconds + */ + private Integer keepaliveIdleTime; + + /* + * Probe interval in seconds, default value is 60 + */ + private Integer probeInterval; + + /* + * Probe count, default value is 10 + */ + private Integer probeCount; + + /** + * Creates an instance of StationConnectionProperties class. + */ + public StationConnectionProperties() { + } + + /** + * Get the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @return the keepaliveIdleTime value. + */ + public Integer keepaliveIdleTime() { + return this.keepaliveIdleTime; + } + + /** + * Set the keepaliveIdleTime property: Connection keepalive idle time in seconds. + * + * @param keepaliveIdleTime the keepaliveIdleTime value to set. + * @return the StationConnectionProperties object itself. + */ + public StationConnectionProperties withKeepaliveIdleTime(Integer keepaliveIdleTime) { + this.keepaliveIdleTime = keepaliveIdleTime; + return this; + } + + /** + * Get the probeInterval property: Probe interval in seconds, default value is 60. + * + * @return the probeInterval value. + */ + public Integer probeInterval() { + return this.probeInterval; + } + + /** + * Set the probeInterval property: Probe interval in seconds, default value is 60. + * + * @param probeInterval the probeInterval value to set. + * @return the StationConnectionProperties object itself. + */ + public StationConnectionProperties withProbeInterval(Integer probeInterval) { + this.probeInterval = probeInterval; + return this; + } + + /** + * Get the probeCount property: Probe count, default value is 10. + * + * @return the probeCount value. + */ + public Integer probeCount() { + return this.probeCount; + } + + /** + * Set the probeCount property: Probe count, default value is 10. + * + * @param probeCount the probeCount value to set. + * @return the StationConnectionProperties object itself. + */ + public StationConnectionProperties withProbeCount(Integer probeCount) { + this.probeCount = probeCount; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("keepaliveIdleTime", this.keepaliveIdleTime); + jsonWriter.writeNumberField("probeInterval", this.probeInterval); + jsonWriter.writeNumberField("probeCount", this.probeCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StationConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StationConnectionProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StationConnectionProperties. + */ + public static StationConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StationConnectionProperties deserializedStationConnectionProperties = new StationConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keepaliveIdleTime".equals(fieldName)) { + deserializedStationConnectionProperties.keepaliveIdleTime = reader.getNullable(JsonReader::getInt); + } else if ("probeInterval".equals(fieldName)) { + deserializedStationConnectionProperties.probeInterval = reader.getNullable(JsonReader::getInt); + } else if ("probeCount".equals(fieldName)) { + deserializedStationConnectionProperties.probeCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedStationConnectionProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java new file mode 100644 index 000000000000..da8a2300b5ba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Storage account configuration. + */ +@Fluent +public final class StorageAccountConfiguration implements JsonSerializable { + /* + * Network Fabric storage account resource identifier. + */ + private String storageAccountId; + + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelector storageAccountIdentity; + + /** + * Creates an instance of StorageAccountConfiguration class. + */ + public StorageAccountConfiguration() { + } + + /** + * Get the storageAccountId property: Network Fabric storage account resource identifier. + * + * @return the storageAccountId value. + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId property: Network Fabric storage account resource identifier. + * + * @param storageAccountId the storageAccountId value to set. + * @return the StorageAccountConfiguration object itself. + */ + public StorageAccountConfiguration withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @return the storageAccountIdentity value. + */ + public IdentitySelector storageAccountIdentity() { + return this.storageAccountIdentity; + } + + /** + * Set the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @param storageAccountIdentity the storageAccountIdentity value to set. + * @return the StorageAccountConfiguration object itself. + */ + public StorageAccountConfiguration withStorageAccountIdentity(IdentitySelector storageAccountIdentity) { + this.storageAccountIdentity = storageAccountIdentity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountId", this.storageAccountId); + jsonWriter.writeJsonField("storageAccountIdentity", this.storageAccountIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageAccountConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageAccountConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageAccountConfiguration. + */ + public static StorageAccountConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageAccountConfiguration deserializedStorageAccountConfiguration = new StorageAccountConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountId".equals(fieldName)) { + deserializedStorageAccountConfiguration.storageAccountId = reader.getString(); + } else if ("storageAccountIdentity".equals(fieldName)) { + deserializedStorageAccountConfiguration.storageAccountIdentity = IdentitySelector.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageAccountConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java new file mode 100644 index 000000000000..29a8d34a8f9c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Storage account configuration. + */ +@Fluent +public final class StorageAccountPatchConfiguration implements JsonSerializable { + /* + * Network Fabric storage account resource identifier. + */ + private String storageAccountId; + + /* + * The selection of the managed identity to use with this storage account. The identity type must be either system + * assigned or user assigned. + */ + private IdentitySelectorPatch storageAccountIdentity; + + /** + * Creates an instance of StorageAccountPatchConfiguration class. + */ + public StorageAccountPatchConfiguration() { + } + + /** + * Get the storageAccountId property: Network Fabric storage account resource identifier. + * + * @return the storageAccountId value. + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set the storageAccountId property: Network Fabric storage account resource identifier. + * + * @param storageAccountId the storageAccountId value to set. + * @return the StorageAccountPatchConfiguration object itself. + */ + public StorageAccountPatchConfiguration withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + + /** + * Get the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @return the storageAccountIdentity value. + */ + public IdentitySelectorPatch storageAccountIdentity() { + return this.storageAccountIdentity; + } + + /** + * Set the storageAccountIdentity property: The selection of the managed identity to use with this storage account. + * The identity type must be either system assigned or user assigned. + * + * @param storageAccountIdentity the storageAccountIdentity value to set. + * @return the StorageAccountPatchConfiguration object itself. + */ + public StorageAccountPatchConfiguration withStorageAccountIdentity(IdentitySelectorPatch storageAccountIdentity) { + this.storageAccountIdentity = storageAccountIdentity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountId", this.storageAccountId); + jsonWriter.writeJsonField("storageAccountIdentity", this.storageAccountIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageAccountPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageAccountPatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageAccountPatchConfiguration. + */ + public static StorageAccountPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageAccountPatchConfiguration deserializedStorageAccountPatchConfiguration + = new StorageAccountPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountId".equals(fieldName)) { + deserializedStorageAccountPatchConfiguration.storageAccountId = reader.getString(); + } else if ("storageAccountIdentity".equals(fieldName)) { + deserializedStorageAccountPatchConfiguration.storageAccountIdentity + = IdentitySelectorPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageAccountPatchConfiguration; + }); + } +} 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 fa99be93440e..2ef88f06e769 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Supported connector properties. */ -@Fluent +@Immutable public final class SupportedConnectorProperties implements JsonSerializable { /* * Type of connector used. Example: Optical. @@ -29,7 +29,7 @@ public final class SupportedConnectorProperties implements JsonSerializable { /* * Operating system and firmware combined versions. @@ -40,7 +40,7 @@ public final class SupportedVersionProperties implements JsonSerializable { /** - * Static value Drop for TapRuleActionType. + * TapRuleActionType-Drop. */ public static final TapRuleActionType DROP = fromString("Drop"); /** - * Static value Count for TapRuleActionType. + * TapRuleActionType-Count. */ public static final TapRuleActionType COUNT = fromString("Count"); /** - * Static value Log for TapRuleActionType. + * TapRuleActionType-Log. */ public static final TapRuleActionType LOG = fromString("Log"); /** - * Static value Replicate for TapRuleActionType. + * TapRuleActionType-Replicate. */ public static final TapRuleActionType REPLICATE = fromString("Replicate"); /** - * Static value Goto for TapRuleActionType. + * TapRuleActionType-Goto. */ public static final TapRuleActionType GOTO = fromString("Goto"); /** - * Static value Redirect for TapRuleActionType. + * TapRuleActionType-Redirect. */ public static final TapRuleActionType REDIRECT = fromString("Redirect"); /** - * Static value Mirror for TapRuleActionType. + * TapRuleActionType-Mirror. */ public static final TapRuleActionType MIRROR = fromString("Mirror"); 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 dc0c9f8a50d9..c309a7a876ab 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -14,11 +15,21 @@ * Network and credentials configuration currently applied to terminal server. */ @Fluent -public final class TerminalServerConfiguration extends TerminalServerPatchableProperties { +public final class TerminalServerConfiguration implements JsonSerializable { /* - * ARM Resource ID used for the NetworkDevice. + * Username for the terminal server connection. */ - private String networkDeviceId; + private String username; + + /* + * Password for the terminal server connection. + */ + private String password; + + /* + * Serial Number of Terminal server. + */ + private String serialNumber; /* * IPv4 Address Prefix. @@ -40,6 +51,11 @@ public final class TerminalServerConfiguration extends TerminalServerPatchablePr */ private String secondaryIpv6Prefix; + /* + * ARM Resource ID used for the NetworkDevice. + */ + private String networkDeviceId; + /** * Creates an instance of TerminalServerConfiguration class. */ @@ -47,12 +63,63 @@ public TerminalServerConfiguration() { } /** - * Get the networkDeviceId property: ARM Resource ID used for the NetworkDevice. + * Get the username property: Username for the terminal server connection. * - * @return the networkDeviceId value. + * @return the username value. */ - public String networkDeviceId() { - return this.networkDeviceId; + public String username() { + return this.username; + } + + /** + * Set the username property: Username for the terminal server connection. + * + * @param username the username value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: Password for the terminal server connection. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Password for the terminal server connection. + * + * @param password the password value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the serialNumber property: Serial Number of Terminal server. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial Number of Terminal server. + * + * @param serialNumber the serialNumber value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; } /** @@ -136,39 +203,12 @@ public TerminalServerConfiguration withSecondaryIpv6Prefix(String secondaryIpv6P } /** - * {@inheritDoc} - */ - @Override - public TerminalServerConfiguration withUsername(String username) { - super.withUsername(username); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TerminalServerConfiguration withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TerminalServerConfiguration withSerialNumber(String serialNumber) { - super.withSerialNumber(serialNumber); - return this; - } - - /** - * Validates the instance. + * Get the networkDeviceId property: ARM Resource ID used for the NetworkDevice. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the networkDeviceId value. */ - @Override - public void validate() { + public String networkDeviceId() { + return this.networkDeviceId; } /** @@ -177,12 +217,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", username()); - jsonWriter.writeStringField("password", password()); - jsonWriter.writeStringField("serialNumber", serialNumber()); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); return jsonWriter.writeEndObject(); } @@ -193,6 +233,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TerminalServerConfiguration if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the TerminalServerConfiguration. */ public static TerminalServerConfiguration fromJson(JsonReader jsonReader) throws IOException { @@ -203,21 +244,21 @@ public static TerminalServerConfiguration fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("username".equals(fieldName)) { - deserializedTerminalServerConfiguration.withUsername(reader.getString()); + deserializedTerminalServerConfiguration.username = reader.getString(); } else if ("password".equals(fieldName)) { - deserializedTerminalServerConfiguration.withPassword(reader.getString()); - } else if ("serialNumber".equals(fieldName)) { - deserializedTerminalServerConfiguration.withSerialNumber(reader.getString()); - } else if ("networkDeviceId".equals(fieldName)) { - deserializedTerminalServerConfiguration.networkDeviceId = reader.getString(); + deserializedTerminalServerConfiguration.password = reader.getString(); } else if ("primaryIpv4Prefix".equals(fieldName)) { deserializedTerminalServerConfiguration.primaryIpv4Prefix = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedTerminalServerConfiguration.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv4Prefix".equals(fieldName)) { deserializedTerminalServerConfiguration.secondaryIpv4Prefix = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedTerminalServerConfiguration.serialNumber = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedTerminalServerConfiguration.primaryIpv6Prefix = reader.getString(); } else if ("secondaryIpv6Prefix".equals(fieldName)) { deserializedTerminalServerConfiguration.secondaryIpv6Prefix = reader.getString(); + } else if ("networkDeviceId".equals(fieldName)) { + deserializedTerminalServerConfiguration.networkDeviceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java new file mode 100644 index 000000000000..3fddf6b65a67 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Network and credentials configuration already applied to terminal server. + */ +@Fluent +public final class TerminalServerPatchConfiguration implements JsonSerializable { + /* + * Username for the terminal server connection. + */ + private String username; + + /* + * Password for the terminal server connection. + */ + private String password; + + /* + * Serial Number of Terminal server. + */ + private String serialNumber; + + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + + /** + * Creates an instance of TerminalServerPatchConfiguration class. + */ + public TerminalServerPatchConfiguration() { + } + + /** + * Get the username property: Username for the terminal server connection. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Username for the terminal server connection. + * + * @param username the username value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: Password for the terminal server connection. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Password for the terminal server connection. + * + * @param password the password value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the serialNumber property: Serial Number of Terminal server. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Set the serialNumber property: Serial Number of Terminal server. + * + * @param serialNumber the serialNumber value to set. + * @return the TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + return this; + } + + /** + * 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 TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration 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 TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration 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 TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration 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 TerminalServerPatchConfiguration object itself. + */ + public TerminalServerPatchConfiguration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("serialNumber", this.serialNumber); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TerminalServerPatchConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TerminalServerPatchConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TerminalServerPatchConfiguration. + */ + public static TerminalServerPatchConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TerminalServerPatchConfiguration deserializedTerminalServerPatchConfiguration + = new TerminalServerPatchConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.password = reader.getString(); + } else if ("serialNumber".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.serialNumber = reader.getString(); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.primaryIpv4Prefix = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.primaryIpv6Prefix = reader.getString(); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.secondaryIpv4Prefix = reader.getString(); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedTerminalServerPatchConfiguration.secondaryIpv6Prefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTerminalServerPatchConfiguration; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.java deleted file mode 100644 index dd38ad6651d8..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchableProperties.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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Network and credential configuration currently applied on terminal server. - */ -@Fluent -public class TerminalServerPatchableProperties implements JsonSerializable { - /* - * Username for the terminal server connection. - */ - private String username; - - /* - * Password for the terminal server connection. - */ - private String password; - - /* - * Serial Number of Terminal server. - */ - private String serialNumber; - - /** - * Creates an instance of TerminalServerPatchableProperties class. - */ - public TerminalServerPatchableProperties() { - } - - /** - * Get the username property: Username for the terminal server connection. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username for the terminal server connection. - * - * @param username the username value to set. - * @return the TerminalServerPatchableProperties object itself. - */ - public TerminalServerPatchableProperties withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password for the terminal server connection. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password for the terminal server connection. - * - * @param password the password value to set. - * @return the TerminalServerPatchableProperties object itself. - */ - public TerminalServerPatchableProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the serialNumber property: Serial Number of Terminal server. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: Serial Number of Terminal server. - * - * @param serialNumber the serialNumber value to set. - * @return the TerminalServerPatchableProperties object itself. - */ - public TerminalServerPatchableProperties withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("serialNumber", this.serialNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TerminalServerPatchableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TerminalServerPatchableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the TerminalServerPatchableProperties. - */ - public static TerminalServerPatchableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TerminalServerPatchableProperties deserializedTerminalServerPatchableProperties - = new TerminalServerPatchableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - deserializedTerminalServerPatchableProperties.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedTerminalServerPatchableProperties.password = reader.getString(); - } else if ("serialNumber".equals(fieldName)) { - deserializedTerminalServerPatchableProperties.serialNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTerminalServerPatchableProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java new file mode 100644 index 000000000000..027b8479ab48 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Unique Route Distinguisher Configuration State. + */ +public final class UniqueRouteDistinguisherConfigurationState + extends ExpandableStringEnum { + /** + * UniqueRouteDistinguisherConfigurationState Enabled. + */ + public static final UniqueRouteDistinguisherConfigurationState ENABLED = fromString("Enabled"); + + /** + * UniqueRouteDistinguisherConfigurationState Disabled. + */ + public static final UniqueRouteDistinguisherConfigurationState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of UniqueRouteDistinguisherConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UniqueRouteDistinguisherConfigurationState() { + } + + /** + * Creates or finds a UniqueRouteDistinguisherConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding UniqueRouteDistinguisherConfigurationState. + */ + public static UniqueRouteDistinguisherConfigurationState fromString(String name) { + return fromString(name, UniqueRouteDistinguisherConfigurationState.class); + } + + /** + * Gets known UniqueRouteDistinguisherConfigurationState values. + * + * @return known UniqueRouteDistinguisherConfigurationState values. + */ + public static Collection values() { + return values(UniqueRouteDistinguisherConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java new file mode 100644 index 000000000000..70dfdaeaa290 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Unique Route Distinguisher configuration properties. + */ +@Fluent +public final class UniqueRouteDistinguisherPatchProperties + implements JsonSerializable { + /* + * Unique Route Distinguisher configuration state. Default is Enabled. + */ + private UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState; + + /* + * NNI derived unique Route Distinguisher state. Default is Disabled. + */ + private NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState; + + /** + * Creates an instance of UniqueRouteDistinguisherPatchProperties class. + */ + public UniqueRouteDistinguisherPatchProperties() { + } + + /** + * Get the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @return the uniqueRdConfigurationState value. + */ + public UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState() { + return this.uniqueRdConfigurationState; + } + + /** + * Set the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @param uniqueRdConfigurationState the uniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherPatchProperties object itself. + */ + public UniqueRouteDistinguisherPatchProperties + withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState) { + this.uniqueRdConfigurationState = uniqueRdConfigurationState; + return this; + } + + /** + * Get the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @return the nniDerivedUniqueRdConfigurationState value. + */ + public NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState() { + return this.nniDerivedUniqueRdConfigurationState; + } + + /** + * Set the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @param nniDerivedUniqueRdConfigurationState the nniDerivedUniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherPatchProperties object itself. + */ + public UniqueRouteDistinguisherPatchProperties withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState) { + this.nniDerivedUniqueRdConfigurationState = nniDerivedUniqueRdConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uniqueRdConfigurationState", + this.uniqueRdConfigurationState == null ? null : this.uniqueRdConfigurationState.toString()); + jsonWriter.writeStringField("nniDerivedUniqueRdConfigurationState", + this.nniDerivedUniqueRdConfigurationState == null + ? null + : this.nniDerivedUniqueRdConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UniqueRouteDistinguisherPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UniqueRouteDistinguisherPatchProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UniqueRouteDistinguisherPatchProperties. + */ + public static UniqueRouteDistinguisherPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UniqueRouteDistinguisherPatchProperties deserializedUniqueRouteDistinguisherPatchProperties + = new UniqueRouteDistinguisherPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherPatchProperties.uniqueRdConfigurationState + = UniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else if ("nniDerivedUniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherPatchProperties.nniDerivedUniqueRdConfigurationState + = NNIDerivedUniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUniqueRouteDistinguisherPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java new file mode 100644 index 000000000000..253e164ec457 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Unique Route Distinguisher properties. + */ +@Fluent +public final class UniqueRouteDistinguisherProperties implements JsonSerializable { + /* + * Unique Route Distinguisher configuration state. Default is Enabled. + */ + private UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState; + + /* + * List of Unique Route Distinguisher addresses. + */ + private List uniqueRds; + + /* + * NNI derived unique Route Distinguisher state. Default is Disabled. + */ + private NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState; + + /** + * Creates an instance of UniqueRouteDistinguisherProperties class. + */ + public UniqueRouteDistinguisherProperties() { + } + + /** + * Get the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @return the uniqueRdConfigurationState value. + */ + public UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState() { + return this.uniqueRdConfigurationState; + } + + /** + * Set the uniqueRdConfigurationState property: Unique Route Distinguisher configuration state. Default is Enabled. + * + * @param uniqueRdConfigurationState the uniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherProperties object itself. + */ + public UniqueRouteDistinguisherProperties + withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState uniqueRdConfigurationState) { + this.uniqueRdConfigurationState = uniqueRdConfigurationState; + return this; + } + + /** + * Get the uniqueRds property: List of Unique Route Distinguisher addresses. + * + * @return the uniqueRds value. + */ + public List uniqueRds() { + return this.uniqueRds; + } + + /** + * Get the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @return the nniDerivedUniqueRdConfigurationState value. + */ + public NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState() { + return this.nniDerivedUniqueRdConfigurationState; + } + + /** + * Set the nniDerivedUniqueRdConfigurationState property: NNI derived unique Route Distinguisher state. Default is + * Disabled. + * + * @param nniDerivedUniqueRdConfigurationState the nniDerivedUniqueRdConfigurationState value to set. + * @return the UniqueRouteDistinguisherProperties object itself. + */ + public UniqueRouteDistinguisherProperties withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState nniDerivedUniqueRdConfigurationState) { + this.nniDerivedUniqueRdConfigurationState = nniDerivedUniqueRdConfigurationState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uniqueRdConfigurationState", + this.uniqueRdConfigurationState == null ? null : this.uniqueRdConfigurationState.toString()); + jsonWriter.writeStringField("nniDerivedUniqueRdConfigurationState", + this.nniDerivedUniqueRdConfigurationState == null + ? null + : this.nniDerivedUniqueRdConfigurationState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UniqueRouteDistinguisherProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UniqueRouteDistinguisherProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UniqueRouteDistinguisherProperties. + */ + public static UniqueRouteDistinguisherProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UniqueRouteDistinguisherProperties deserializedUniqueRouteDistinguisherProperties + = new UniqueRouteDistinguisherProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherProperties.uniqueRdConfigurationState + = UniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else if ("uniqueRds".equals(fieldName)) { + List uniqueRds = reader.readArray(reader1 -> reader1.getString()); + deserializedUniqueRouteDistinguisherProperties.uniqueRds = uniqueRds; + } else if ("nniDerivedUniqueRdConfigurationState".equals(fieldName)) { + deserializedUniqueRouteDistinguisherProperties.nniDerivedUniqueRdConfigurationState + = NNIDerivedUniqueRouteDistinguisherConfigurationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUniqueRouteDistinguisherProperties; + }); + } +} 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 18a68849f193..2bde83454a6d 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,12 @@ * Update administrative state on list of resources. */ @Fluent -public final class UpdateAdministrativeState extends EnableDisableOnResources { +public final class UpdateAdministrativeState implements JsonSerializable { + /* + * Network Fabrics or Network Rack resource Id. + */ + private List resourceIds; + /* * Administrative state. */ @@ -28,41 +34,43 @@ public UpdateAdministrativeState() { } /** - * Get the state property: Administrative state. + * Get the resourceIds property: Network Fabrics or Network Rack resource Id. * - * @return the state value. + * @return the resourceIds value. */ - public EnableDisableState state() { - return this.state; + public List resourceIds() { + return this.resourceIds; } /** - * Set the state property: Administrative state. + * Set the resourceIds property: Network Fabrics or Network Rack resource Id. * - * @param state the state value to set. + * @param resourceIds the resourceIds value to set. * @return the UpdateAdministrativeState object itself. */ - public UpdateAdministrativeState withState(EnableDisableState state) { - this.state = state; + public UpdateAdministrativeState withResourceIds(List resourceIds) { + this.resourceIds = resourceIds; return this; } /** - * {@inheritDoc} + * Get the state property: Administrative state. + * + * @return the state value. */ - @Override - public UpdateAdministrativeState withResourceIds(List resourceIds) { - super.withResourceIds(resourceIds); - return this; + public EnableDisableState state() { + return this.state; } /** - * Validates the instance. + * Set the state property: Administrative state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param state the state value to set. + * @return the UpdateAdministrativeState object itself. */ - @Override - public void validate() { + public UpdateAdministrativeState withState(EnableDisableState state) { + this.state = state; + return this; } /** @@ -71,7 +79,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("resourceIds", resourceIds(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("resourceIds", this.resourceIds, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); return jsonWriter.writeEndObject(); } @@ -93,7 +101,7 @@ public static UpdateAdministrativeState fromJson(JsonReader jsonReader) throws I if ("resourceIds".equals(fieldName)) { List resourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedUpdateAdministrativeState.withResourceIds(resourceIds); + deserializedUpdateAdministrativeState.resourceIds = resourceIds; } else if ("state".equals(fieldName)) { deserializedUpdateAdministrativeState.state = EnableDisableState.fromString(reader.getString()); } else { 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 index bc626724e047..066ffc44be87 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,12 @@ * Update the administrative state on list of resources. */ @Fluent -public final class UpdateDeviceAdministrativeState extends EnableDisableOnResources { +public final class UpdateDeviceAdministrativeState implements JsonSerializable { + /* + * Network Fabrics or Network Rack resource Id. + */ + private List resourceIds; + /* * Administrative state. */ @@ -28,41 +34,43 @@ public UpdateDeviceAdministrativeState() { } /** - * Get the state property: Administrative state. + * Get the resourceIds property: Network Fabrics or Network Rack resource Id. * - * @return the state value. + * @return the resourceIds value. */ - public DeviceAdministrativeState state() { - return this.state; + public List resourceIds() { + return this.resourceIds; } /** - * Set the state property: Administrative state. + * Set the resourceIds property: Network Fabrics or Network Rack resource Id. * - * @param state the state value to set. + * @param resourceIds the resourceIds value to set. * @return the UpdateDeviceAdministrativeState object itself. */ - public UpdateDeviceAdministrativeState withState(DeviceAdministrativeState state) { - this.state = state; + public UpdateDeviceAdministrativeState withResourceIds(List resourceIds) { + this.resourceIds = resourceIds; return this; } /** - * {@inheritDoc} + * Get the state property: Administrative state. + * + * @return the state value. */ - @Override - public UpdateDeviceAdministrativeState withResourceIds(List resourceIds) { - super.withResourceIds(resourceIds); - return this; + public DeviceAdministrativeState state() { + return this.state; } /** - * Validates the instance. + * Set the state property: Administrative state. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param state the state value to set. + * @return the UpdateDeviceAdministrativeState object itself. */ - @Override - public void validate() { + public UpdateDeviceAdministrativeState withState(DeviceAdministrativeState state) { + this.state = state; + return this; } /** @@ -71,7 +79,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("resourceIds", resourceIds(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("resourceIds", this.resourceIds, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); return jsonWriter.writeEndObject(); } @@ -94,7 +102,7 @@ public static UpdateDeviceAdministrativeState fromJson(JsonReader jsonReader) th if ("resourceIds".equals(fieldName)) { List resourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedUpdateDeviceAdministrativeState.withResourceIds(resourceIds); + deserializedUpdateDeviceAdministrativeState.resourceIds = resourceIds; } else if ("state".equals(fieldName)) { deserializedUpdateDeviceAdministrativeState.state = DeviceAdministrativeState.fromString(reader.getString()); 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 index fd7c1d6b226e..7eac6367f312 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -15,7 +15,7 @@ * Update version properties. */ @Fluent -public class UpdateVersion implements JsonSerializable { +public final class UpdateVersion implements JsonSerializable { /* * Specify the version. */ @@ -47,14 +47,6 @@ public UpdateVersion withVersion(String version) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java index 81d6e40dc7f0..06b62f391656 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java @@ -1,20 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; /** - * The UpgradeNetworkFabricProperties model. + * Model used for Upgrade Network Fabric Properties. */ @Fluent -public final class UpgradeNetworkFabricProperties extends UpdateVersion { +public final class UpgradeNetworkFabricProperties implements JsonSerializable { + /* + * Specify the version. + */ + private String version; + /* * Action to be performed while upgrading the fabric. */ @@ -27,41 +33,43 @@ public UpgradeNetworkFabricProperties() { } /** - * Get the action property: Action to be performed while upgrading the fabric. + * Get the version property: Specify the version. * - * @return the action value. + * @return the version value. */ - public NetworkFabricUpgradeAction action() { - return this.action; + public String version() { + return this.version; } /** - * Set the action property: Action to be performed while upgrading the fabric. + * Set the version property: Specify the version. * - * @param action the action value to set. + * @param version the version value to set. * @return the UpgradeNetworkFabricProperties object itself. */ - public UpgradeNetworkFabricProperties withAction(NetworkFabricUpgradeAction action) { - this.action = action; + public UpgradeNetworkFabricProperties withVersion(String version) { + this.version = version; return this; } /** - * {@inheritDoc} + * Get the action property: Action to be performed while upgrading the fabric. + * + * @return the action value. */ - @Override - public UpgradeNetworkFabricProperties withVersion(String version) { - super.withVersion(version); - return this; + public NetworkFabricUpgradeAction action() { + return this.action; } /** - * Validates the instance. + * Set the action property: Action to be performed while upgrading the fabric. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param action the action value to set. + * @return the UpgradeNetworkFabricProperties object itself. */ - @Override - public void validate() { + public UpgradeNetworkFabricProperties withAction(NetworkFabricUpgradeAction action) { + this.action = action; + return this; } /** @@ -70,7 +78,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", version()); + jsonWriter.writeStringField("version", this.version); jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); return jsonWriter.writeEndObject(); } @@ -92,7 +100,7 @@ public static UpgradeNetworkFabricProperties fromJson(JsonReader jsonReader) thr reader.nextToken(); if ("version".equals(fieldName)) { - deserializedUpgradeNetworkFabricProperties.withVersion(reader.getString()); + deserializedUpgradeNetworkFabricProperties.version = reader.getString(); } else if ("action".equals(fieldName)) { deserializedUpgradeNetworkFabricProperties.action = NetworkFabricUpgradeAction.fromString(reader.getString()); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java new file mode 100644 index 000000000000..600c07c40d56 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * User assigned identity properties. + */ +@Immutable +public final class UserAssignedIdentity implements JsonSerializable { + /* + * The principal ID of the assigned identity. + */ + private String principalId; + + /* + * The client ID of the assigned identity. + */ + private String clientId; + + /** + * Creates an instance of UserAssignedIdentity class. + */ + public UserAssignedIdentity() { + } + + /** + * Get the principalId property: The principal ID of the assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client ID of the assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java new file mode 100644 index 000000000000..e7ac5b28023a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * V4 over V6 BGP session state. + */ +public final class V4OverV6BgpSessionState extends ExpandableStringEnum { + /** + * V4OverV6BgpSessionState-Enabled. + */ + public static final V4OverV6BgpSessionState ENABLED = fromString("Enabled"); + + /** + * V4OverV6BgpSessionState-Disabled. + */ + public static final V4OverV6BgpSessionState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of V4OverV6BgpSessionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public V4OverV6BgpSessionState() { + } + + /** + * Creates or finds a V4OverV6BgpSessionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding V4OverV6BgpSessionState. + */ + public static V4OverV6BgpSessionState fromString(String name) { + return fromString(name, V4OverV6BgpSessionState.class); + } + + /** + * Gets known V4OverV6BgpSessionState values. + * + * @return known V4OverV6BgpSessionState values. + */ + public static Collection values() { + return values(V4OverV6BgpSessionState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java new file mode 100644 index 000000000000..a57c75dbfd0c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * V6 over V4 BGP session state. + */ +public final class V6OverV4BgpSessionState extends ExpandableStringEnum { + /** + * V6OverV4BgpSessionState-Enabled. + */ + public static final V6OverV4BgpSessionState ENABLED = fromString("Enabled"); + + /** + * V6OverV4BgpSessionState-Disabled. + */ + public static final V6OverV4BgpSessionState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of V6OverV4BgpSessionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public V6OverV4BgpSessionState() { + } + + /** + * Creates or finds a V6OverV4BgpSessionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding V6OverV4BgpSessionState. + */ + public static V6OverV4BgpSessionState fromString(String name) { + return fromString(name, V6OverV4BgpSessionState.class); + } + + /** + * Gets known V6OverV4BgpSessionState values. + * + * @return known V6OverV4BgpSessionState values. + */ + public static Collection values() { + return values(V6OverV4BgpSessionState.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 index abd16fb60d40..2a0e4a2547bd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -12,17 +12,17 @@ */ public final class ValidateAction extends ExpandableStringEnum { /** - * Static value Cabling for ValidateAction. + * ValidateAction-Cabling. */ public static final ValidateAction CABLING = fromString("Cabling"); /** - * Static value Configuration for ValidateAction. + * ValidateAction-Configuration. */ public static final ValidateAction CONFIGURATION = fromString("Configuration"); /** - * Static value Connectivity for ValidateAction. + * ValidateAction-Connectivity. */ public static final ValidateAction CONNECTIVITY = fromString("Connectivity"); 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 index cefa8f24ac00..a90fbe4e52cb 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -47,14 +47,6 @@ public ValidateConfigurationProperties withValidateAction(ValidateAction validat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 11ce5afedcbf..fadc479db10a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -11,6 +11,13 @@ * An immutable client-side representation of ValidateConfigurationResponse. */ public interface ValidateConfigurationResponse { + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + /** * Gets the configurationState property: Gets the configuration state. * @@ -25,13 +32,6 @@ public interface ValidateConfigurationResponse { */ String url(); - /** - * Gets the error property: The error object. - * - * @return the error value. - */ - ManagementError error(); - /** * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner * object. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponse.java new file mode 100644 index 000000000000..d4e9bde9c850 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponse.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner; + +/** + * An immutable client-side representation of ViewDeviceConfigurationResponse. + */ +public interface ViewDeviceConfigurationResponse { + /** + * Gets the deviceConfigurationUrl property: Storage URL to the device configuration file. + * + * @return the deviceConfigurationUrl value. + */ + String deviceConfigurationUrl(); + + /** + * Gets the error property: The error object. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner + * object. + * + * @return the inner object. + */ + ViewDeviceConfigurationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java new file mode 100644 index 000000000000..f2efaf21acdc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Vlan group properties. + */ +@Fluent +public final class VlanGroupPatchProperties implements JsonSerializable { + /* + * Vlan group name. + */ + private String name; + + /* + * List of vlans. + */ + private List vlans; + + /** + * Creates an instance of VlanGroupPatchProperties class. + */ + public VlanGroupPatchProperties() { + } + + /** + * 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 VlanGroupPatchProperties object itself. + */ + public VlanGroupPatchProperties 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 VlanGroupPatchProperties object itself. + */ + public VlanGroupPatchProperties withVlans(List vlans) { + this.vlans = vlans; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("vlans", this.vlans, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VlanGroupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VlanGroupPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VlanGroupPatchProperties. + */ + public static VlanGroupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VlanGroupPatchProperties deserializedVlanGroupPatchProperties = new VlanGroupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVlanGroupPatchProperties.name = reader.getString(); + } else if ("vlans".equals(fieldName)) { + List vlans = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanGroupPatchProperties.vlans = vlans; + } else { + reader.skipChildren(); + } + } + + return deserializedVlanGroupPatchProperties; + }); + } +} 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 index fa65343f95de..5dcae72b3551 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -73,14 +73,6 @@ public VlanGroupProperties withVlans(List vlans) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index a4e54fd76fd3..d83e0d006a3e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -18,12 +18,12 @@ @Fluent public final class VlanMatchCondition implements JsonSerializable { /* - * List of vlans that need to be matched. + * List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. */ private List vlans; /* - * List of inner vlans that need to be matched. + * List of inner vlans that need to be matched.Inputs can be single vlan or the range of vlans. */ private List innerVlans; @@ -39,7 +39,7 @@ public VlanMatchCondition() { } /** - * Get the vlans property: List of vlans that need to be matched. + * Get the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. * * @return the vlans value. */ @@ -48,7 +48,7 @@ public List vlans() { } /** - * Set the vlans property: List of vlans that need to be matched. + * Set the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. * * @param vlans the vlans value to set. * @return the VlanMatchCondition object itself. @@ -59,7 +59,8 @@ public VlanMatchCondition withVlans(List vlans) { } /** - * Get the innerVlans property: List of inner vlans that need to be matched. + * Get the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. * * @return the innerVlans value. */ @@ -68,7 +69,8 @@ public List innerVlans() { } /** - * Set the innerVlans property: List of inner vlans that need to be matched. + * Set the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. * * @param innerVlans the innerVlans value to set. * @return the VlanMatchCondition object itself. @@ -98,14 +100,6 @@ public VlanMatchCondition withVlanGroupNames(List vlanGroupNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java new file mode 100644 index 000000000000..0fcd8caddc5a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The vlan match conditions that need to be matched. + */ +@Fluent +public final class VlanMatchConditionPatch implements JsonSerializable { + /* + * List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. + */ + private List vlans; + + /* + * List of inner vlans that need to be matched.Inputs can be single vlan or the range of vlans. + */ + private List innerVlans; + + /* + * List of vlan group names that need to be matched. + */ + private List vlanGroupNames; + + /** + * Creates an instance of VlanMatchConditionPatch class. + */ + public VlanMatchConditionPatch() { + } + + /** + * Get the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. + * + * @return the vlans value. + */ + public List vlans() { + return this.vlans; + } + + /** + * Set the vlans property: List of vlans that need to be matched. Inputs can be single vlan or the range of vlans. + * + * @param vlans the vlans value to set. + * @return the VlanMatchConditionPatch object itself. + */ + public VlanMatchConditionPatch withVlans(List vlans) { + this.vlans = vlans; + return this; + } + + /** + * Get the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. + * + * @return the innerVlans value. + */ + public List innerVlans() { + return this.innerVlans; + } + + /** + * Set the innerVlans property: List of inner vlans that need to be matched.Inputs can be single vlan or the range + * of vlans. + * + * @param innerVlans the innerVlans value to set. + * @return the VlanMatchConditionPatch object itself. + */ + public VlanMatchConditionPatch withInnerVlans(List innerVlans) { + this.innerVlans = innerVlans; + return this; + } + + /** + * Get the vlanGroupNames property: List of vlan group names that need to be matched. + * + * @return the vlanGroupNames value. + */ + public List vlanGroupNames() { + return this.vlanGroupNames; + } + + /** + * Set the vlanGroupNames property: List of vlan group names that need to be matched. + * + * @param vlanGroupNames the vlanGroupNames value to set. + * @return the VlanMatchConditionPatch object itself. + */ + public VlanMatchConditionPatch withVlanGroupNames(List vlanGroupNames) { + this.vlanGroupNames = vlanGroupNames; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("vlans", this.vlans, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("innerVlans", this.innerVlans, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("vlanGroupNames", this.vlanGroupNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VlanMatchConditionPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VlanMatchConditionPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VlanMatchConditionPatch. + */ + public static VlanMatchConditionPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VlanMatchConditionPatch deserializedVlanMatchConditionPatch = new VlanMatchConditionPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vlans".equals(fieldName)) { + List vlans = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanMatchConditionPatch.vlans = vlans; + } else if ("innerVlans".equals(fieldName)) { + List innerVlans = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanMatchConditionPatch.innerVlans = innerVlans; + } else if ("vlanGroupNames".equals(fieldName)) { + List vlanGroupNames = reader.readArray(reader1 -> reader1.getString()); + deserializedVlanMatchConditionPatch.vlanGroupNames = vlanGroupNames; + } else { + reader.skipChildren(); + } + } + + return deserializedVlanMatchConditionPatch; + }); + } +} 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 index bb1086a4b81c..e235cee31842 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -30,12 +30,12 @@ public final class VpnConfigurationPatchableProperties /* * option B properties */ - private OptionBProperties optionBProperties; + private VpnOptionBPatchProperties optionBProperties; /* * option A properties */ - private VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties; + private VpnOptionAPatchProperties optionAProperties; /** * Creates an instance of VpnConfigurationPatchableProperties class. @@ -89,7 +89,7 @@ public VpnConfigurationPatchableProperties withPeeringOption(PeeringOption peeri * * @return the optionBProperties value. */ - public OptionBProperties optionBProperties() { + public VpnOptionBPatchProperties optionBProperties() { return this.optionBProperties; } @@ -99,7 +99,7 @@ public OptionBProperties optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the VpnConfigurationPatchableProperties object itself. */ - public VpnConfigurationPatchableProperties withOptionBProperties(OptionBProperties optionBProperties) { + public VpnConfigurationPatchableProperties withOptionBProperties(VpnOptionBPatchProperties optionBProperties) { this.optionBProperties = optionBProperties; return this; } @@ -109,7 +109,7 @@ public VpnConfigurationPatchableProperties withOptionBProperties(OptionBProperti * * @return the optionAProperties value. */ - public VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties() { + public VpnOptionAPatchProperties optionAProperties() { return this.optionAProperties; } @@ -119,26 +119,11 @@ public VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties() * @param optionAProperties the optionAProperties value to set. * @return the VpnConfigurationPatchableProperties object itself. */ - public VpnConfigurationPatchableProperties - withOptionAProperties(VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties) { + public VpnConfigurationPatchableProperties withOptionAProperties(VpnOptionAPatchProperties 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(); - } - } - /** * {@inheritDoc} */ @@ -175,10 +160,10 @@ public static VpnConfigurationPatchableProperties fromJson(JsonReader jsonReader = PeeringOption.fromString(reader.getString()); } else if ("optionBProperties".equals(fieldName)) { deserializedVpnConfigurationPatchableProperties.optionBProperties - = OptionBProperties.fromJson(reader); + = VpnOptionBPatchProperties.fromJson(reader); } else if ("optionAProperties".equals(fieldName)) { deserializedVpnConfigurationPatchableProperties.optionAProperties - = VpnConfigurationPatchablePropertiesOptionAProperties.fromJson(reader); + = VpnOptionAPatchProperties.fromJson(reader); } else { reader.skipChildren(); } 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 deleted file mode 100644 index c37967b6d8d6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * option A properties. - */ -@Fluent -public final class VpnConfigurationPatchablePropertiesOptionAProperties extends OptionAProperties { - /* - * IPv4 Address Prefix. - */ - private String primaryIpv4Prefix; - - /* - * IPv6 Address Prefix. - */ - private String primaryIpv6Prefix; - - /* - * Secondary IPv4 Address Prefix. - */ - private String secondaryIpv4Prefix; - - /* - * Secondary IPv6 Address Prefix. - */ - 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() { - if (bfdConfiguration() != null) { - bfdConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("mtu", mtu()); - jsonWriter.writeNumberField("vlanId", vlanId()); - jsonWriter.writeNumberField("peerASN", peerAsn()); - jsonWriter.writeJsonField("bfdConfiguration", bfdConfiguration()); - jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); - jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); - jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); - jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VpnConfigurationPatchablePropertiesOptionAProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VpnConfigurationPatchablePropertiesOptionAProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VpnConfigurationPatchablePropertiesOptionAProperties. - */ - public static VpnConfigurationPatchablePropertiesOptionAProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - VpnConfigurationPatchablePropertiesOptionAProperties deserializedVpnConfigurationPatchablePropertiesOptionAProperties - = new VpnConfigurationPatchablePropertiesOptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withMtu(reader.getNullable(JsonReader::getInt)); - } else if ("vlanId".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withVlanId(reader.getNullable(JsonReader::getInt)); - } else if ("peerASN".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.primaryIpv4Prefix - = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.primaryIpv6Prefix - = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.secondaryIpv4Prefix - = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPatchablePropertiesOptionAProperties.secondaryIpv6Prefix - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVpnConfigurationPatchablePropertiesOptionAProperties; - }); - } -} 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 aa65f9f2f325..eb535eaed057 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -35,12 +34,12 @@ public final class VpnConfigurationProperties implements JsonSerializable { - VpnConfigurationPropertiesOptionAProperties deserializedVpnConfigurationPropertiesOptionAProperties - = new VpnConfigurationPropertiesOptionAProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtu".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withMtu(reader.getNullable(JsonReader::getInt)); - } else if ("vlanId".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withVlanId(reader.getNullable(JsonReader::getInt)); - } else if ("peerASN".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withPeerAsn(reader.getNullable(JsonReader::getLong)); - } else if ("bfdConfiguration".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties - .withBfdConfiguration(BfdConfiguration.fromJson(reader)); - } else if ("primaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.primaryIpv4Prefix = reader.getString(); - } else if ("primaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.primaryIpv6Prefix = reader.getString(); - } else if ("secondaryIpv4Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.secondaryIpv4Prefix = reader.getString(); - } else if ("secondaryIpv6Prefix".equals(fieldName)) { - deserializedVpnConfigurationPropertiesOptionAProperties.secondaryIpv6Prefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVpnConfigurationPropertiesOptionAProperties; - }); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java new file mode 100644 index 000000000000..3e800fd34b88 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Peering optionA properties. + */ +@Fluent +public final class VpnOptionAPatchProperties implements JsonSerializable { + /* + * MTU to use for option A peering. + */ + private Integer mtu; + + /* + * Vlan Id.Example : 501 + */ + private Integer vlanId; + + /* + * Peer ASN number.Example : 28 + */ + private Long peerASN; + + /* + * BFD Configuration properties. + */ + private BfdPatchConfiguration bfdConfiguration; + + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + + /** + * Creates an instance of VpnOptionAPatchProperties class. + */ + public VpnOptionAPatchProperties() { + } + + /** + * 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 VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the vlanId property: Vlan Id.Example : 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan Id.Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * 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 VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withPeerASN(Long peerASN) { + this.peerASN = peerASN; + return this; + } + + /** + * Get the bfdConfiguration property: BFD Configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdPatchConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD Configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withBfdConfiguration(BfdPatchConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * 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 VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties 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 VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties 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 VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties 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 VpnOptionAPatchProperties object itself. + */ + public VpnOptionAPatchProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeNumberField("vlanId", this.vlanId); + jsonWriter.writeNumberField("peerASN", this.peerASN); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VpnOptionAPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VpnOptionAPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VpnOptionAPatchProperties. + */ + public static VpnOptionAPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VpnOptionAPatchProperties deserializedVpnOptionAPatchProperties = new VpnOptionAPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mtu".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("vlanId".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.vlanId = reader.getNullable(JsonReader::getInt); + } else if ("peerASN".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.peerASN = reader.getNullable(JsonReader::getLong); + } else if ("bfdConfiguration".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.bfdConfiguration = BfdPatchConfiguration.fromJson(reader); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.primaryIpv4Prefix = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.primaryIpv6Prefix = reader.getString(); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.secondaryIpv4Prefix = reader.getString(); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAPatchProperties.secondaryIpv6Prefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVpnOptionAPatchProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java new file mode 100644 index 000000000000..b9493e5a4eb8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * option A properties. + */ +@Fluent +public final class VpnOptionAProperties implements JsonSerializable { + /* + * MTU to use for option A peering. + */ + private Integer mtu; + + /* + * Vlan Id.Example : 501 + */ + private int vlanId; + + /* + * Peer ASN number.Example : 28 + */ + private long peerASN; + + /* + * BFD Configuration properties. + */ + private BfdConfiguration bfdConfiguration; + + /* + * IPv4 Address Prefix. + */ + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + private String secondaryIpv6Prefix; + + /** + * Creates an instance of VpnOptionAProperties class. + */ + public VpnOptionAProperties() { + } + + /** + * 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the vlanId property: Vlan Id.Example : 501. + * + * @return the vlanId value. + */ + public int vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan Id.Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withVlanId(int vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties 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 VpnOptionAProperties object itself. + */ + public VpnOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("vlanId", this.vlanId); + jsonWriter.writeLongField("peerASN", this.peerASN); + jsonWriter.writeNumberField("mtu", this.mtu); + jsonWriter.writeJsonField("bfdConfiguration", this.bfdConfiguration); + jsonWriter.writeStringField("primaryIpv4Prefix", this.primaryIpv4Prefix); + jsonWriter.writeStringField("primaryIpv6Prefix", this.primaryIpv6Prefix); + jsonWriter.writeStringField("secondaryIpv4Prefix", this.secondaryIpv4Prefix); + jsonWriter.writeStringField("secondaryIpv6Prefix", this.secondaryIpv6Prefix); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VpnOptionAProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VpnOptionAProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VpnOptionAProperties. + */ + public static VpnOptionAProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VpnOptionAProperties deserializedVpnOptionAProperties = new VpnOptionAProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vlanId".equals(fieldName)) { + deserializedVpnOptionAProperties.vlanId = reader.getInt(); + } else if ("peerASN".equals(fieldName)) { + deserializedVpnOptionAProperties.peerASN = reader.getLong(); + } else if ("mtu".equals(fieldName)) { + deserializedVpnOptionAProperties.mtu = reader.getNullable(JsonReader::getInt); + } else if ("bfdConfiguration".equals(fieldName)) { + deserializedVpnOptionAProperties.bfdConfiguration = BfdConfiguration.fromJson(reader); + } else if ("primaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.primaryIpv4Prefix = reader.getString(); + } else if ("primaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.primaryIpv6Prefix = reader.getString(); + } else if ("secondaryIpv4Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.secondaryIpv4Prefix = reader.getString(); + } else if ("secondaryIpv6Prefix".equals(fieldName)) { + deserializedVpnOptionAProperties.secondaryIpv6Prefix = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVpnOptionAProperties; + }); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java new file mode 100644 index 000000000000..651f749fb4ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Option B configuration to be used for Management VPN. + */ +@Fluent +public final class VpnOptionBPatchProperties implements JsonSerializable { + /* + * Route Targets to be applied for incoming routes into CE. This is for backward compatibility. + */ + private List importRouteTargets; + + /* + * Route Targets to be applied for outgoing routes from CE. This is for backward compatibility. + */ + private List exportRouteTargets; + + /* + * Route Targets to be applied. + */ + private RouteTargetPatchInformation routeTargets; + + /** + * Creates an instance of VpnOptionBPatchProperties class. + */ + public VpnOptionBPatchProperties() { + } + + /** + * Get the importRouteTargets property: Route Targets to be applied for incoming routes into CE. This is for + * backward compatibility. + * + * @return the importRouteTargets value. + */ + public List importRouteTargets() { + return this.importRouteTargets; + } + + /** + * 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 VpnOptionBPatchProperties object itself. + */ + public VpnOptionBPatchProperties withImportRouteTargets(List importRouteTargets) { + this.importRouteTargets = importRouteTargets; + return this; + } + + /** + * Get the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. This is for + * backward compatibility. + * + * @return the exportRouteTargets value. + */ + public List exportRouteTargets() { + return this.exportRouteTargets; + } + + /** + * 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 VpnOptionBPatchProperties object itself. + */ + public VpnOptionBPatchProperties withExportRouteTargets(List exportRouteTargets) { + this.exportRouteTargets = exportRouteTargets; + return this; + } + + /** + * Get the routeTargets property: Route Targets to be applied. + * + * @return the routeTargets value. + */ + public RouteTargetPatchInformation routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: Route Targets to be applied. + * + * @param routeTargets the routeTargets value to set. + * @return the VpnOptionBPatchProperties object itself. + */ + public VpnOptionBPatchProperties withRouteTargets(RouteTargetPatchInformation routeTargets) { + this.routeTargets = routeTargets; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("importRouteTargets", this.importRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("exportRouteTargets", this.exportRouteTargets, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("routeTargets", this.routeTargets); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VpnOptionBPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VpnOptionBPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VpnOptionBPatchProperties. + */ + public static VpnOptionBPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VpnOptionBPatchProperties deserializedVpnOptionBPatchProperties = new VpnOptionBPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("importRouteTargets".equals(fieldName)) { + List importRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedVpnOptionBPatchProperties.importRouteTargets = importRouteTargets; + } else if ("exportRouteTargets".equals(fieldName)) { + List exportRouteTargets = reader.readArray(reader1 -> reader1.getString()); + deserializedVpnOptionBPatchProperties.exportRouteTargets = exportRouteTargets; + } else if ("routeTargets".equals(fieldName)) { + deserializedVpnOptionBPatchProperties.routeTargets = RouteTargetPatchInformation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVpnOptionBPatchProperties; + }); + } +} 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/VpnOptionBProperties.java similarity index 71% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBProperties.java index 07a81c05b6fc..a860bb788289 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/VpnOptionBProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,7 +16,7 @@ * Option B configuration to be used for Management VPN. */ @Fluent -public final class OptionBProperties implements JsonSerializable { +public final class VpnOptionBProperties implements JsonSerializable { /* * Route Targets to be applied for incoming routes into CE. This is for backward compatibility. */ @@ -33,9 +33,9 @@ public final class OptionBProperties implements JsonSerializable importRouteTargets() { * backward compatibility. * * @param importRouteTargets the importRouteTargets value to set. - * @return the OptionBProperties object itself. + * @return the VpnOptionBProperties object itself. */ - public OptionBProperties withImportRouteTargets(List importRouteTargets) { + public VpnOptionBProperties withImportRouteTargets(List importRouteTargets) { this.importRouteTargets = importRouteTargets; return this; } @@ -75,9 +75,9 @@ public List exportRouteTargets() { * backward compatibility. * * @param exportRouteTargets the exportRouteTargets value to set. - * @return the OptionBProperties object itself. + * @return the VpnOptionBProperties object itself. */ - public OptionBProperties withExportRouteTargets(List exportRouteTargets) { + public VpnOptionBProperties withExportRouteTargets(List exportRouteTargets) { this.exportRouteTargets = exportRouteTargets; return this; } @@ -95,24 +95,13 @@ public RouteTargetInformation routeTargets() { * Set the routeTargets property: Route Targets to be applied. * * @param routeTargets the routeTargets value to set. - * @return the OptionBProperties object itself. + * @return the VpnOptionBProperties object itself. */ - public OptionBProperties withRouteTargets(RouteTargetInformation routeTargets) { + public VpnOptionBProperties 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(); - } - } - /** * {@inheritDoc} */ @@ -128,34 +117,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of OptionBProperties from the JsonReader. + * Reads an instance of VpnOptionBProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of OptionBProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OptionBProperties. + * @return An instance of VpnOptionBProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VpnOptionBProperties. */ - public static OptionBProperties fromJson(JsonReader jsonReader) throws IOException { + public static VpnOptionBProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - OptionBProperties deserializedOptionBProperties = new OptionBProperties(); + VpnOptionBProperties deserializedVpnOptionBProperties = new VpnOptionBProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("importRouteTargets".equals(fieldName)) { List importRouteTargets = reader.readArray(reader1 -> reader1.getString()); - deserializedOptionBProperties.importRouteTargets = importRouteTargets; + deserializedVpnOptionBProperties.importRouteTargets = importRouteTargets; } else if ("exportRouteTargets".equals(fieldName)) { List exportRouteTargets = reader.readArray(reader1 -> reader1.getString()); - deserializedOptionBProperties.exportRouteTargets = exportRouteTargets; + deserializedVpnOptionBProperties.exportRouteTargets = exportRouteTargets; } else if ("routeTargets".equals(fieldName)) { - deserializedOptionBProperties.routeTargets = RouteTargetInformation.fromJson(reader); + deserializedVpnOptionBProperties.routeTargets = RouteTargetInformation.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedOptionBProperties; + return deserializedVpnOptionBProperties; }); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java index c1f2ed4c1551..8172400d3705 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.models; @@ -16,27 +16,27 @@ */ public final class WellKnownCommunities extends ExpandableStringEnum { /** - * Static value Internet for WellKnownCommunities. + * WellKnownCommunities-Internet. */ public static final WellKnownCommunities INTERNET = fromString("Internet"); /** - * Static value LocalAS for WellKnownCommunities. + * WellKnownCommunities-LocalAS. */ public static final WellKnownCommunities LOCAL_AS = fromString("LocalAS"); /** - * Static value NoAdvertise for WellKnownCommunities. + * WellKnownCommunities-NoAdvertise. */ public static final WellKnownCommunities NO_ADVERTISE = fromString("NoAdvertise"); /** - * Static value NoExport for WellKnownCommunities. + * WellKnownCommunities-NoExport. */ public static final WellKnownCommunities NO_EXPORT = fromString("NoExport"); /** - * Static value GShut for WellKnownCommunities. + * WellKnownCommunities-GShut. */ public static final WellKnownCommunities GSHUT = fromString("GShut"); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java index 11c1cb92e937..7a619e852afe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureNetworkFabricManagementServiceApi. + * Package containing the data models for Fileshares. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric.models; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java index 057a9b8750d3..e7f6cb602b0c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AzureNetworkFabricManagementServiceApi. + * Package containing the classes for Fileshares. * Self service experience for Azure Network Fabric API. */ package com.azure.resourcemanager.managednetworkfabric; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java index b22e210a1dff..2c98a6d67de4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.managednetworkfabric { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.managednetworkfabric.fluent.models to com.azure.core; opens com.azure.resourcemanager.managednetworkfabric.models to com.azure.core; + opens com.azure.resourcemanager.managednetworkfabric.implementation.models to com.azure.core; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_apiview_properties.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_apiview_properties.json new file mode 100644 index 000000000000..daa2b9a111ff --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_apiview_properties.json @@ -0,0 +1,724 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient": "Microsoft.ManagedNetworkFabric.AccessControlLists", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginCreate": "Microsoft.ManagedNetworkFabric.AccessControlLists.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginDelete": "Microsoft.ManagedNetworkFabric.AccessControlLists.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginResync": "Microsoft.ManagedNetworkFabric.AccessControlLists.resync", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.AccessControlLists.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginValidateConfiguration": "Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.create": "Microsoft.ManagedNetworkFabric.AccessControlLists.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.delete": "Microsoft.ManagedNetworkFabric.AccessControlLists.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.AccessControlLists.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.AccessControlLists.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.list": "Microsoft.ManagedNetworkFabric.AccessControlLists.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.AccessControlLists.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.resync": "Microsoft.ManagedNetworkFabric.AccessControlLists.resync", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.update": "Microsoft.ManagedNetworkFabric.AccessControlLists.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.validateConfiguration": "Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient": "Microsoft.ManagedNetworkFabric.ExternalNetworks", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginCreate": "Microsoft.ManagedNetworkFabric.ExternalNetworks.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginDelete": "Microsoft.ManagedNetworkFabric.ExternalNetworks.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdate": "Microsoft.ManagedNetworkFabric.ExternalNetworks.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateBfdAdministrativeState": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.create": "Microsoft.ManagedNetworkFabric.ExternalNetworks.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.delete": "Microsoft.ManagedNetworkFabric.ExternalNetworks.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.get": "Microsoft.ManagedNetworkFabric.ExternalNetworks.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.getWithResponse": "Microsoft.ManagedNetworkFabric.ExternalNetworks.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.listByL3IsolationDomain": "Microsoft.ManagedNetworkFabric.ExternalNetworks.listByL3IsolationDomain", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.update": "Microsoft.ManagedNetworkFabric.ExternalNetworks.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateBfdAdministrativeState": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.FilesharesManagementClient": "Microsoft.ManagedNetworkFabric", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient": "Microsoft.ManagedNetworkFabric.InternalNetworks", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginCreate": "Microsoft.ManagedNetworkFabric.InternalNetworks.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginDelete": "Microsoft.ManagedNetworkFabric.InternalNetworks.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdate": "Microsoft.ManagedNetworkFabric.InternalNetworks.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateBfdAdministrativeState": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateBgpAdministrativeState": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.create": "Microsoft.ManagedNetworkFabric.InternalNetworks.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.delete": "Microsoft.ManagedNetworkFabric.InternalNetworks.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.get": "Microsoft.ManagedNetworkFabric.InternalNetworks.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.getWithResponse": "Microsoft.ManagedNetworkFabric.InternalNetworks.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.listByL3IsolationDomain": "Microsoft.ManagedNetworkFabric.InternalNetworks.listByL3IsolationDomain", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.update": "Microsoft.ManagedNetworkFabric.InternalNetworks.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateBfdAdministrativeState": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateBgpAdministrativeState": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient": "Microsoft.ManagedNetworkFabric.InternetGatewayRules", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginCreate": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginDelete": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.create": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.delete": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.list": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.update": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient": "Microsoft.ManagedNetworkFabric.InternetGateways", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginCreate": "Microsoft.ManagedNetworkFabric.InternetGateways.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginDelete": "Microsoft.ManagedNetworkFabric.InternetGateways.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginUpdate": "Microsoft.ManagedNetworkFabric.InternetGateways.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.create": "Microsoft.ManagedNetworkFabric.InternetGateways.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.delete": "Microsoft.ManagedNetworkFabric.InternetGateways.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.InternetGateways.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.InternetGateways.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.list": "Microsoft.ManagedNetworkFabric.InternetGateways.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.InternetGateways.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.update": "Microsoft.ManagedNetworkFabric.InternetGateways.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient": "Microsoft.ManagedNetworkFabric.IpCommunities", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginCreate": "Microsoft.ManagedNetworkFabric.IpCommunities.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginDelete": "Microsoft.ManagedNetworkFabric.IpCommunities.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.IpCommunities.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.create": "Microsoft.ManagedNetworkFabric.IpCommunities.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.delete": "Microsoft.ManagedNetworkFabric.IpCommunities.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.IpCommunities.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.IpCommunities.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.list": "Microsoft.ManagedNetworkFabric.IpCommunities.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.IpCommunities.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.update": "Microsoft.ManagedNetworkFabric.IpCommunities.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginCreate": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginDelete": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.create": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.delete": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.list": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.update": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient": "Microsoft.ManagedNetworkFabric.IpPrefixes", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginCreate": "Microsoft.ManagedNetworkFabric.IpPrefixes.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginDelete": "Microsoft.ManagedNetworkFabric.IpPrefixes.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.IpPrefixes.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.create": "Microsoft.ManagedNetworkFabric.IpPrefixes.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.delete": "Microsoft.ManagedNetworkFabric.IpPrefixes.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.IpPrefixes.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.IpPrefixes.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.list": "Microsoft.ManagedNetworkFabric.IpPrefixes.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.IpPrefixes.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.update": "Microsoft.ManagedNetworkFabric.IpPrefixes.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient": "Microsoft.ManagedNetworkFabric.L2IsolationDomains", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginCommitConfiguration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginCreate": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginDelete": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginValidateConfiguration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.commitConfiguration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.create": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.delete": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.list": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.update": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.validateConfiguration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient": "Microsoft.ManagedNetworkFabric.L3IsolationDomains", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginCommitConfiguration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginCreate": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginDelete": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginValidateConfiguration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.commitConfiguration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.create": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.delete": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.list": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.update": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.validateConfiguration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient": "Microsoft.ManagedNetworkFabric.NeighborGroups", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginCreate": "Microsoft.ManagedNetworkFabric.NeighborGroups.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginDelete": "Microsoft.ManagedNetworkFabric.NeighborGroups.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NeighborGroups.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.create": "Microsoft.ManagedNetworkFabric.NeighborGroups.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.delete": "Microsoft.ManagedNetworkFabric.NeighborGroups.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NeighborGroups.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NeighborGroups.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.list": "Microsoft.ManagedNetworkFabric.NeighborGroups.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NeighborGroups.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.update": "Microsoft.ManagedNetworkFabric.NeighborGroups.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.get": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.getWithResponse": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.list": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient": "Microsoft.ManagedNetworkFabric.NetworkDevices", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkDevices.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkDevices.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginReboot": "Microsoft.ManagedNetworkFabric.NetworkDevices.reboot", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRefreshConfiguration": "Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRunRoCommand": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRunRwCommand": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkDevices.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpgrade": "Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.create": "Microsoft.ManagedNetworkFabric.NetworkDevices.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.delete": "Microsoft.ManagedNetworkFabric.NetworkDevices.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkDevices.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkDevices.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.list": "Microsoft.ManagedNetworkFabric.NetworkDevices.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkDevices.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.reboot": "Microsoft.ManagedNetworkFabric.NetworkDevices.reboot", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.refreshConfiguration": "Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.runRoCommand": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.runRwCommand": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.update": "Microsoft.ManagedNetworkFabric.NetworkDevices.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.upgrade": "Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.create": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.delete": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.list": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.update": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.get": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.getWithResponse": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.list": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient": "Microsoft.ManagedNetworkFabric.NetworkFabrics", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.armConfigurationDiff": "Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginArmConfigurationDiff": "Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCommitBatchStatus": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCommitConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkFabrics.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkFabrics.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDeprovision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDiscardCommitBatch": "Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginGetTopology": "Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginLockFabric": "Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginProvision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.provision", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginRefreshConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkFabrics.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdateInfraManagementBfdConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdateWorkloadManagementBfdConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpgrade": "Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginValidateConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginViewDeviceConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.commitBatchStatus": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.commitConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.create": "Microsoft.ManagedNetworkFabric.NetworkFabrics.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.delete": "Microsoft.ManagedNetworkFabric.NetworkFabrics.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.deprovision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.discardCommitBatch": "Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkFabrics.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkFabrics.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getTopology": "Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.list": "Microsoft.ManagedNetworkFabric.NetworkFabrics.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkFabrics.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.lockFabric": "Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.provision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.provision", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.refreshConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.update": "Microsoft.ManagedNetworkFabric.NetworkFabrics.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.updateInfraManagementBfdConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.updateWorkloadManagementBfdConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.upgrade": "Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.validateConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.viewDeviceConfiguration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient": "Microsoft.ManagedNetworkFabric.NetworkInterfaces", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.create": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.delete": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.get": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.getWithResponse": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.listByNetworkDevice": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.listByNetworkDevice", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.update": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient": "Microsoft.ManagedNetworkFabric.NetworkMonitors", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkMonitors.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkMonitors.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkMonitors.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.create": "Microsoft.ManagedNetworkFabric.NetworkMonitors.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.delete": "Microsoft.ManagedNetworkFabric.NetworkMonitors.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkMonitors.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkMonitors.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.list": "Microsoft.ManagedNetworkFabric.NetworkMonitors.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkMonitors.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.update": "Microsoft.ManagedNetworkFabric.NetworkMonitors.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.create": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.delete": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.list": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.update": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient": "Microsoft.ManagedNetworkFabric.NetworkRacks", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkRacks.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkRacks.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkRacks.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.create": "Microsoft.ManagedNetworkFabric.NetworkRacks.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.delete": "Microsoft.ManagedNetworkFabric.NetworkRacks.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkRacks.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkRacks.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.list": "Microsoft.ManagedNetworkFabric.NetworkRacks.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkRacks.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.update": "Microsoft.ManagedNetworkFabric.NetworkRacks.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient": "Microsoft.ManagedNetworkFabric.NetworkTapRules", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkTapRules.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkTapRules.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginResync": "Microsoft.ManagedNetworkFabric.NetworkTapRules.resync", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkTapRules.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginValidateConfiguration": "Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.create": "Microsoft.ManagedNetworkFabric.NetworkTapRules.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.delete": "Microsoft.ManagedNetworkFabric.NetworkTapRules.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkTapRules.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkTapRules.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.list": "Microsoft.ManagedNetworkFabric.NetworkTapRules.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkTapRules.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.resync": "Microsoft.ManagedNetworkFabric.NetworkTapRules.resync", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.update": "Microsoft.ManagedNetworkFabric.NetworkTapRules.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.validateConfiguration": "Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient": "Microsoft.ManagedNetworkFabric.NetworkTaps", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkTaps.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkTaps.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginResync": "Microsoft.ManagedNetworkFabric.NetworkTaps.resync", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkTaps.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.create": "Microsoft.ManagedNetworkFabric.NetworkTaps.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.delete": "Microsoft.ManagedNetworkFabric.NetworkTaps.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkTaps.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.NetworkTaps.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.list": "Microsoft.ManagedNetworkFabric.NetworkTaps.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.NetworkTaps.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.resync": "Microsoft.ManagedNetworkFabric.NetworkTaps.resync", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.update": "Microsoft.ManagedNetworkFabric.NetworkTaps.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginCreate": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginDelete": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdate": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateBfdAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.create": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.delete": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.get": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.getWithResponse": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.listByNetworkFabric": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.listByNetworkFabric", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.update": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateBfdAdministrativeState": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient": "Microsoft.ManagedNetworkFabric.Operations", + "com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient.list": "Azure.ResourceManager.Operations.list", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient": "Microsoft.ManagedNetworkFabric.RoutePolicies", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginCommitConfiguration": "Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginCreate": "Microsoft.ManagedNetworkFabric.RoutePolicies.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginDelete": "Microsoft.ManagedNetworkFabric.RoutePolicies.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginUpdate": "Microsoft.ManagedNetworkFabric.RoutePolicies.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginUpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginValidateConfiguration": "Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.commitConfiguration": "Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.create": "Microsoft.ManagedNetworkFabric.RoutePolicies.create", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.delete": "Microsoft.ManagedNetworkFabric.RoutePolicies.delete", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.getByResourceGroup": "Microsoft.ManagedNetworkFabric.RoutePolicies.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.getByResourceGroupWithResponse": "Microsoft.ManagedNetworkFabric.RoutePolicies.get", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.list": "Microsoft.ManagedNetworkFabric.RoutePolicies.listBySubscription", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.listByResourceGroup": "Microsoft.ManagedNetworkFabric.RoutePolicies.listByResourceGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.update": "Microsoft.ManagedNetworkFabric.RoutePolicies.update", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.updateAdministrativeState": "Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.validateConfiguration": "Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner": "Microsoft.ManagedNetworkFabric.AccessControlList", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffResponseInner": "Microsoft.ManagedNetworkFabric.ArmConfigurationDiffResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner": "Microsoft.ManagedNetworkFabric.CommitBatchStatusResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommandsOperationStatusResult", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceRWCommands", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceUpdate", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForStateUpdate", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner": "Microsoft.ManagedNetworkFabric.DiscardCommitBatchResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkBfdAdministrativeStateResponseInner": "Microsoft.ManagedNetworkFabric.ExternalNetworkBfdAdministrativeStateResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner": "Microsoft.ManagedNetworkFabric.ExternalNetwork", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBfdAdministrativeStateResponseInner": "Microsoft.ManagedNetworkFabric.InternalNetworkBfdAdministrativeStateResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner": "Microsoft.ManagedNetworkFabric.InternalNetworkBgpAdministrativeStateResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner": "Microsoft.ManagedNetworkFabric.InternalNetwork", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner": "Microsoft.ManagedNetworkFabric.InternetGateway", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner": "Microsoft.ManagedNetworkFabric.InternetGatewayRule", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner": "Microsoft.ManagedNetworkFabric.IpCommunity", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner": "Microsoft.ManagedNetworkFabric.IpExtendedCommunity", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner": "Microsoft.ManagedNetworkFabric.IpPrefix", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner": "Microsoft.ManagedNetworkFabric.L2IsolationDomain", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner": "Microsoft.ManagedNetworkFabric.L3IsolationDomain", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner": "Microsoft.ManagedNetworkFabric.NeighborGroup", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner": "Microsoft.ManagedNetworkFabric.NetworkDevice", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner": "Microsoft.ManagedNetworkFabric.NetworkDeviceSku", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner": "Microsoft.ManagedNetworkFabric.NetworkFabricController", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner": "Microsoft.ManagedNetworkFabric.NetworkFabric", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner": "Microsoft.ManagedNetworkFabric.NetworkFabricSku", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner": "Microsoft.ManagedNetworkFabric.NetworkInterface", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner": "Microsoft.ManagedNetworkFabric.NetworkMonitor", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner": "Microsoft.ManagedNetworkFabric.NetworkPacketBroker", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner": "Microsoft.ManagedNetworkFabric.NetworkRack", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner": "Microsoft.ManagedNetworkFabric.NetworkTap", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner": "Microsoft.ManagedNetworkFabric.NetworkTapRule", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnect", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.NniBfdAdministrativeStateResponseInner": "Microsoft.ManagedNetworkFabric.NniBfdAdministrativeStateResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner": "Azure.ResourceManager.CommonTypes.Operation", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner": "Microsoft.ManagedNetworkFabric.RoutePolicy", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner": "Microsoft.ManagedNetworkFabric.ValidateConfigurationResponse", + "com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner": "Microsoft.ManagedNetworkFabric.ViewDeviceConfigurationResponse", + "com.azure.resourcemanager.managednetworkfabric.implementation.FilesharesManagementClientBuilder": "Microsoft.ManagedNetworkFabric", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.AccessControlListListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworkListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworkListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayRuleListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunityListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.IpExtendedCommunityListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NeighborGroupListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkuListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricControllerListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkuListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfaceListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkPacketBrokerListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRackListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapRuleListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult": "Azure.ResourceManager.CommonTypes.OperationListResult", + "com.azure.resourcemanager.managednetworkfabric.implementation.models.RoutePolicyListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction": "Microsoft.ManagedNetworkFabric.AccessControlListAction", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch": "Microsoft.ManagedNetworkFabric.AccessControlListActionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition": "Microsoft.ManagedNetworkFabric.AccessControlListMatchCondition", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch": "Microsoft.ManagedNetworkFabric.AccessControlListMatchConditionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration": "Microsoft.ManagedNetworkFabric.AccessControlListMatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch": "Microsoft.ManagedNetworkFabric.AccessControlListMatchConfigurationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch": "Microsoft.ManagedNetworkFabric.AccessControlListPatch", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties": "Microsoft.ManagedNetworkFabric.AccessControlListPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition": "Microsoft.ManagedNetworkFabric.AccessControlListPortCondition", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch": "Microsoft.ManagedNetworkFabric.AccessControlListPortConditionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.AccessControlListProperties": "Microsoft.ManagedNetworkFabric.AccessControlListProperties", + "com.azure.resourcemanager.managednetworkfabric.models.AclActionType": "Microsoft.ManagedNetworkFabric.AclActionType", + "com.azure.resourcemanager.managednetworkfabric.models.AclType": "Microsoft.ManagedNetworkFabric.AclType", + "com.azure.resourcemanager.managednetworkfabric.models.Action": "Microsoft.ManagedNetworkFabric.Action", + "com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties": "Microsoft.ManagedNetworkFabric.ActionIpCommunityPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties": "Microsoft.ManagedNetworkFabric.ActionIpCommunityProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties": "Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties": "Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType": "Microsoft.ManagedNetworkFabric.AddressFamilyType", + "com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState": "Microsoft.ManagedNetworkFabric.AdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute": "Microsoft.ManagedNetworkFabric.AggregateRoute", + "com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration": "Microsoft.ManagedNetworkFabric.AggregateRouteConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.AggregateRoutePatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride": "Microsoft.ManagedNetworkFabric.AllowASOverride", + "com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState": "Microsoft.ManagedNetworkFabric.BfdAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration": "Microsoft.ManagedNetworkFabric.BfdConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration": "Microsoft.ManagedNetworkFabric.BfdPatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState": "Microsoft.ManagedNetworkFabric.BgpAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration": "Microsoft.ManagedNetworkFabric.BgpConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration": "Microsoft.ManagedNetworkFabric.BgpPatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.BitRate": "Microsoft.ManagedNetworkFabric.BitRate", + "com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit": "Microsoft.ManagedNetworkFabric.BitRateUnit", + "com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.BmpConfigurationPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties": "Microsoft.ManagedNetworkFabric.BmpConfigurationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState": "Microsoft.ManagedNetworkFabric.BmpConfigurationState", + "com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy": "Microsoft.ManagedNetworkFabric.BmpExportPolicy", + "com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily": "Microsoft.ManagedNetworkFabric.BmpMonitoredAddressFamily", + "com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty": "Microsoft.ManagedNetworkFabric.BooleanEnumProperty", + "com.azure.resourcemanager.managednetworkfabric.models.BurstSize": "Microsoft.ManagedNetworkFabric.BurstSize", + "com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit": "Microsoft.ManagedNetworkFabric.BurstSizeUnit", + "com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails": "Microsoft.ManagedNetworkFabric.CommitBatchDetails", + "com.azure.resourcemanager.managednetworkfabric.models.CommitBatchState": "Microsoft.ManagedNetworkFabric.CommitBatchState", + "com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest": "Microsoft.ManagedNetworkFabric.CommitBatchStatusRequest", + "com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration": "Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch": "Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfigurationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommands", + "com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes": "Microsoft.ManagedNetworkFabric.CommunityActionTypes", + "com.azure.resourcemanager.managednetworkfabric.models.Condition": "Microsoft.ManagedNetworkFabric.Condition", + "com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties": "Microsoft.ManagedNetworkFabric.ConditionalDefaultRouteProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState": "Microsoft.ManagedNetworkFabric.ConfigurationState", + "com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType": "Microsoft.ManagedNetworkFabric.ConfigurationType", + "com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet": "Microsoft.ManagedNetworkFabric.ConnectedSubnet", + "com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch": "Microsoft.ManagedNetworkFabric.ConnectedSubnetPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy": "Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicy", + "com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicyPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ControllerServices": "Microsoft.ManagedNetworkFabric.ControllerServices", + "com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties": "Microsoft.ManagedNetworkFabric.DestinationPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties": "Microsoft.ManagedNetworkFabric.DestinationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.DestinationType": "Microsoft.ManagedNetworkFabric.DestinationType", + "com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState": "Microsoft.ManagedNetworkFabric.DeviceAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties": "Microsoft.ManagedNetworkFabric.DeviceInterfaceProperties", + "com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand": "Microsoft.ManagedNetworkFabric.DeviceRoCommand", + "com.azure.resourcemanager.managednetworkfabric.models.DeviceRole": "Microsoft.ManagedNetworkFabric.DeviceRole", + "com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand": "Microsoft.ManagedNetworkFabric.DeviceRwCommand", + "com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest": "Microsoft.ManagedNetworkFabric.DiscardCommitBatchRequest", + "com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState": "Microsoft.ManagedNetworkFabric.EnableDisableState", + "com.azure.resourcemanager.managednetworkfabric.models.Encapsulation": "Microsoft.ManagedNetworkFabric.Encapsulation", + "com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType": "Microsoft.ManagedNetworkFabric.EncapsulationType", + "com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy": "Microsoft.ManagedNetworkFabric.ExportRoutePolicy", + "com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation": "Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformation", + "com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch": "Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.ExportRoutePolicyPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation": "Microsoft.ManagedNetworkFabric.ExpressRouteConnectionInformation", + "com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan": "Microsoft.ManagedNetworkFabric.ExtendedVlan", + "com.azure.resourcemanager.managednetworkfabric.models.Extension": "Microsoft.ManagedNetworkFabric.Extension", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.ExternalNetworkBfdAdministrativeStateRequest", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkBmpPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkBmpProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch": "Microsoft.ManagedNetworkFabric.ExternalNetworkPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkPatchPropertiesOptionAProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkPropertiesOptionAProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType": "Microsoft.ManagedNetworkFabric.ExternalNetworkRouteType", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRouteConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRoutePatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties": "Microsoft.ManagedNetworkFabric.FabricLockProperties", + "com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType": "Microsoft.ManagedNetworkFabric.FabricSkuType", + "com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties": "Microsoft.ManagedNetworkFabric.FeatureFlagProperties", + "com.azure.resourcemanager.managednetworkfabric.models.GatewayType": "Microsoft.ManagedNetworkFabric.GatewayType", + "com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties": "Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties": "Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionProperties", + "com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties": "Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties": "Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionProperties", + "com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties": "Microsoft.ManagedNetworkFabric.HeaderAddressProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IPAddressType": "Microsoft.ManagedNetworkFabric.IPAddressType", + "com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.IcmpConfigurationPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties": "Microsoft.ManagedNetworkFabric.IcmpConfigurationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector": "Microsoft.ManagedNetworkFabric.IdentitySelector", + "com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch": "Microsoft.ManagedNetworkFabric.IdentitySelectorPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy": "Microsoft.ManagedNetworkFabric.ImportRoutePolicy", + "com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation": "Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformation", + "com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch": "Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.ImportRoutePolicyPatch", + "com.azure.resourcemanager.managednetworkfabric.models.InterfaceType": "Microsoft.ManagedNetworkFabric.InterfaceType", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.InternalNetworkBfdAdministrativeStateRequest", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.InternalNetworkBgpAdministrativeStateRequest", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkBmpPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkBmpProperties", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch": "Microsoft.ManagedNetworkFabric.InternalNetworkPatch", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkProperties", + "com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType": "Microsoft.ManagedNetworkFabric.InternalNetworkRouteType", + "com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch": "Microsoft.ManagedNetworkFabric.InternetGatewayPatch", + "com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties": "Microsoft.ManagedNetworkFabric.InternetGatewayPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties": "Microsoft.ManagedNetworkFabric.InternetGatewayProperties", + "com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch": "Microsoft.ManagedNetworkFabric.InternetGatewayRulePatch", + "com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties": "Microsoft.ManagedNetworkFabric.InternetGatewayRuleProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList": "Microsoft.ManagedNetworkFabric.IpCommunityIdList", + "com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch": "Microsoft.ManagedNetworkFabric.IpCommunityPatch", + "com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatchableProperties": "Microsoft.ManagedNetworkFabric.IpCommunityPatchableProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpCommunityProperties": "Microsoft.ManagedNetworkFabric.IpCommunityProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule": "Microsoft.ManagedNetworkFabric.IpCommunityRule", + "com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityIdList", + "com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatch", + "com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchProperties": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityRule", + "com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties": "Microsoft.ManagedNetworkFabric.IpGroupPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties": "Microsoft.ManagedNetworkFabric.IpGroupProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition": "Microsoft.ManagedNetworkFabric.IpMatchCondition", + "com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch": "Microsoft.ManagedNetworkFabric.IpMatchConditionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch": "Microsoft.ManagedNetworkFabric.IpPrefixPatch", + "com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchProperties": "Microsoft.ManagedNetworkFabric.IpPrefixPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpPrefixProperties": "Microsoft.ManagedNetworkFabric.IpPrefixProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule": "Microsoft.ManagedNetworkFabric.IpPrefixRule", + "com.azure.resourcemanager.managednetworkfabric.models.IsManagementType": "Microsoft.ManagedNetworkFabric.IsManagementType", + "com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled": "Microsoft.ManagedNetworkFabric.IsMonitoringEnabled", + "com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled": "Microsoft.ManagedNetworkFabric.IsWorkloadManagementNetworkEnabled", + "com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties": "Microsoft.ManagedNetworkFabric.IsolationDomainPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties": "Microsoft.ManagedNetworkFabric.IsolationDomainProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch": "Microsoft.ManagedNetworkFabric.L2IsolationDomainPatch", + "com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatchProperties": "Microsoft.ManagedNetworkFabric.L2IsolationDomainPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties": "Microsoft.ManagedNetworkFabric.L2IsolationDomainProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy": "Microsoft.ManagedNetworkFabric.L3ExportRoutePolicy", + "com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.L3ExportRoutePolicyPatch", + "com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch": "Microsoft.ManagedNetworkFabric.L3IsolationDomainPatch", + "com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties": "Microsoft.ManagedNetworkFabric.L3IsolationDomainPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainProperties": "Microsoft.ManagedNetworkFabric.L3IsolationDomainProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties": "Microsoft.ManagedNetworkFabric.L3OptionBPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties": "Microsoft.ManagedNetworkFabric.L3OptionBProperties", + "com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties": "Microsoft.ManagedNetworkFabric.L3UniqueRouteDistinguisherProperties", + "com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties": "Microsoft.ManagedNetworkFabric.LastOperationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration": "Microsoft.ManagedNetworkFabric.Layer2Configuration", + "com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch": "Microsoft.ManagedNetworkFabric.Layer2ConfigurationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol": "Microsoft.ManagedNetworkFabric.Layer4Protocol", + "com.azure.resourcemanager.managednetworkfabric.models.LockConfigurationState": "Microsoft.ManagedNetworkFabric.LockConfigurationState", + "com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration": "Microsoft.ManagedNetworkFabric.ManagedResourceGroupConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch": "Microsoft.ManagedNetworkFabric.ManagedServiceIdentityPatch", + "com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType": "Microsoft.ManagedNetworkFabric.ManagedServiceIdentitySelectorType", + "com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties": "Microsoft.ManagedNetworkFabric.ManagementNetworkConfigurationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration": "Microsoft.ManagedNetworkFabric.ManagementNetworkPatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState": "Microsoft.ManagedNetworkFabric.MicroBfdState", + "com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState": "Microsoft.ManagedNetworkFabric.NNIDerivedUniqueRouteDistinguisherConfigurationState", + "com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress": "Microsoft.ManagedNetworkFabric.NeighborAddress", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus": "Microsoft.ManagedNetworkFabric.NeighborAddressBfdAdministrativeStatus", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus": "Microsoft.ManagedNetworkFabric.NeighborAddressBgpAdministrativeStatus", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch": "Microsoft.ManagedNetworkFabric.NeighborAddressPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination": "Microsoft.ManagedNetworkFabric.NeighborGroupDestination", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch": "Microsoft.ManagedNetworkFabric.NeighborGroupDestinationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch": "Microsoft.ManagedNetworkFabric.NeighborGroupPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties": "Microsoft.ManagedNetworkFabric.NeighborGroupPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties": "Microsoft.ManagedNetworkFabric.NeighborGroupProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters": "Microsoft.ManagedNetworkFabric.NetworkDevicePatchParameters", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParametersProperties": "Microsoft.ManagedNetworkFabric.NetworkDevicePatchParametersProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties": "Microsoft.ManagedNetworkFabric.NetworkDeviceProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole": "Microsoft.ManagedNetworkFabric.NetworkDeviceRole", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName": "Microsoft.ManagedNetworkFabric.NetworkDeviceRoleName", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkuProperties": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkuProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch": "Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricControllerProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction": "Microsoft.ManagedNetworkFabric.NetworkFabricLockAction", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest": "Microsoft.ManagedNetworkFabric.NetworkFabricLockRequest", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType": "Microsoft.ManagedNetworkFabric.NetworkFabricLockType", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch": "Microsoft.ManagedNetworkFabric.NetworkFabricPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkuProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricSkuProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricUpgradeAction": "Microsoft.ManagedNetworkFabric.NetworkFabricUpgradeAction", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch": "Microsoft.ManagedNetworkFabric.NetworkInterfacePatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatchProperties": "Microsoft.ManagedNetworkFabric.NetworkInterfacePatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties": "Microsoft.ManagedNetworkFabric.NetworkInterfaceProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch": "Microsoft.ManagedNetworkFabric.NetworkMonitorPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkMonitorPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties": "Microsoft.ManagedNetworkFabric.NetworkMonitorProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokerPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokerProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch": "Microsoft.ManagedNetworkFabric.NetworkRackPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties": "Microsoft.ManagedNetworkFabric.NetworkRackProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType": "Microsoft.ManagedNetworkFabric.NetworkRackType", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch": "Microsoft.ManagedNetworkFabric.NetworkTapPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkTapPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapProperties": "Microsoft.ManagedNetworkFabric.NetworkTapProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction": "Microsoft.ManagedNetworkFabric.NetworkTapRuleAction", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch": "Microsoft.ManagedNetworkFabric.NetworkTapRuleActionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchCondition", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConditionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfigurationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch": "Microsoft.ManagedNetworkFabric.NetworkTapRulePatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchProperties": "Microsoft.ManagedNetworkFabric.NetworkTapRulePatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleProperties": "Microsoft.ManagedNetworkFabric.NetworkTapRuleProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatch", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NfcSku": "Microsoft.ManagedNetworkFabric.NfcSku", + "com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.NniBfdAdministrativeStateRequest", + "com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties": "Microsoft.ManagedNetworkFabric.NniBmpPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties": "Microsoft.ManagedNetworkFabric.NniBmpProperties", + "com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.NniStaticRouteConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.NniStaticRoutePatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.NniType": "Microsoft.ManagedNetworkFabric.NniType", + "com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.NpbStaticRouteConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch": "Microsoft.ManagedNetworkFabric.NpbStaticRouteConfigurationPatch", + "com.azure.resourcemanager.managednetworkfabric.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration": "Microsoft.ManagedNetworkFabric.OptionBLayer3Configuration", + "com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.OptionBLayer3ConfigurationPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitProperties", + "com.azure.resourcemanager.managednetworkfabric.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "com.azure.resourcemanager.managednetworkfabric.models.PeeringOption": "Microsoft.ManagedNetworkFabric.PeeringOption", + "com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties": "Microsoft.ManagedNetworkFabric.PoliceRateConfigurationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds": "Microsoft.ManagedNetworkFabric.PollingIntervalInSeconds", + "com.azure.resourcemanager.managednetworkfabric.models.PollingType": "Microsoft.ManagedNetworkFabric.PollingType", + "com.azure.resourcemanager.managednetworkfabric.models.PortCondition": "Microsoft.ManagedNetworkFabric.PortCondition", + "com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch": "Microsoft.ManagedNetworkFabric.PortConditionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties": "Microsoft.ManagedNetworkFabric.PortGroupPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties": "Microsoft.ManagedNetworkFabric.PortGroupProperties", + "com.azure.resourcemanager.managednetworkfabric.models.PortType": "Microsoft.ManagedNetworkFabric.PortType", + "com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.PrefixLimitPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.PrefixLimitProperties", + "com.azure.resourcemanager.managednetworkfabric.models.PrefixType": "Microsoft.ManagedNetworkFabric.PrefixType", + "com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState": "Microsoft.ManagedNetworkFabric.ProvisioningState", + "com.azure.resourcemanager.managednetworkfabric.models.RebootProperties": "Microsoft.ManagedNetworkFabric.RebootProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RebootType": "Microsoft.ManagedNetworkFabric.RebootType", + "com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets": "Microsoft.ManagedNetworkFabric.RedistributeConnectedSubnets", + "com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes": "Microsoft.ManagedNetworkFabric.RedistributeStaticRoutes", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType": "Microsoft.ManagedNetworkFabric.RoutePolicyActionType", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType": "Microsoft.ManagedNetworkFabric.RoutePolicyConditionType", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch": "Microsoft.ManagedNetworkFabric.RoutePolicyPatch", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatchableProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyPatchableProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyStatementPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyStatementProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.RoutePrefixLimitPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties": "Microsoft.ManagedNetworkFabric.RoutePrefixLimitProperties", + "com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation": "Microsoft.ManagedNetworkFabric.RouteTargetInformation", + "com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation": "Microsoft.ManagedNetworkFabric.RouteTargetPatchInformation", + "com.azure.resourcemanager.managednetworkfabric.models.RouteType": "Microsoft.ManagedNetworkFabric.RouteType", + "com.azure.resourcemanager.managednetworkfabric.models.RuleCondition": "Microsoft.ManagedNetworkFabric.RuleCondition", + "com.azure.resourcemanager.managednetworkfabric.models.RuleProperties": "Microsoft.ManagedNetworkFabric.RuleProperties", + "com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType": "Microsoft.ManagedNetworkFabric.SourceDestinationType", + "com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties": "Microsoft.ManagedNetworkFabric.StatementActionPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties": "Microsoft.ManagedNetworkFabric.StatementActionProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties": "Microsoft.ManagedNetworkFabric.StatementConditionPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties": "Microsoft.ManagedNetworkFabric.StatementConditionProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.StaticRouteConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.StaticRoutePatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties": "Microsoft.ManagedNetworkFabric.StaticRoutePatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties": "Microsoft.ManagedNetworkFabric.StaticRouteProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy": "Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicy", + "com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicyPatch", + "com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState": "Microsoft.ManagedNetworkFabric.StationConfigurationState", + "com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode": "Microsoft.ManagedNetworkFabric.StationConnectionMode", + "com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties": "Microsoft.ManagedNetworkFabric.StationConnectionPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties": "Microsoft.ManagedNetworkFabric.StationConnectionProperties", + "com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration": "Microsoft.ManagedNetworkFabric.StorageAccountConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration": "Microsoft.ManagedNetworkFabric.StorageAccountPatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties": "Microsoft.ManagedNetworkFabric.SupportedConnectorProperties", + "com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties": "Microsoft.ManagedNetworkFabric.SupportedVersionProperties", + "com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType": "Microsoft.ManagedNetworkFabric.TapRuleActionType", + "com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration": "Microsoft.ManagedNetworkFabric.TerminalServerConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration": "Microsoft.ManagedNetworkFabric.TerminalServerPatchConfiguration", + "com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState": "Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherConfigurationState", + "com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties": "Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties": "Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherProperties", + "com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.UpdateAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState": "Microsoft.ManagedNetworkFabric.UpdateDeviceAdministrativeState", + "com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion": "Microsoft.ManagedNetworkFabric.UpdateVersion", + "com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties": "Microsoft.ManagedNetworkFabric.UpgradeNetworkFabricProperties", + "com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState": "Microsoft.ManagedNetworkFabric.V4OverV6BgpSessionState", + "com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState": "Microsoft.ManagedNetworkFabric.V6OverV4BgpSessionState", + "com.azure.resourcemanager.managednetworkfabric.models.ValidateAction": "Microsoft.ManagedNetworkFabric.ValidateAction", + "com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties": "Microsoft.ManagedNetworkFabric.ValidateConfigurationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties": "Microsoft.ManagedNetworkFabric.VlanGroupPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties": "Microsoft.ManagedNetworkFabric.VlanGroupProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition": "Microsoft.ManagedNetworkFabric.VlanMatchCondition", + "com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch": "Microsoft.ManagedNetworkFabric.VlanMatchConditionPatch", + "com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties": "Microsoft.ManagedNetworkFabric.VpnConfigurationPatchableProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties": "Microsoft.ManagedNetworkFabric.VpnConfigurationProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties": "Microsoft.ManagedNetworkFabric.VpnOptionAPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties": "Microsoft.ManagedNetworkFabric.VpnOptionAProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties": "Microsoft.ManagedNetworkFabric.VpnOptionBPatchProperties", + "com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties": "Microsoft.ManagedNetworkFabric.VpnOptionBProperties", + "com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities": "Microsoft.ManagedNetworkFabric.WellKnownCommunities" + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json new file mode 100644 index 000000000000..5dd273296b98 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/azure-resourcemanager-managednetworkfabric_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2024-06-15-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient":"Microsoft.ManagedNetworkFabric.AccessControlLists","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginCreate":"Microsoft.ManagedNetworkFabric.AccessControlLists.create","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginDelete":"Microsoft.ManagedNetworkFabric.AccessControlLists.delete","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginResync":"Microsoft.ManagedNetworkFabric.AccessControlLists.resync","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.AccessControlLists.update","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.create":"Microsoft.ManagedNetworkFabric.AccessControlLists.create","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.delete":"Microsoft.ManagedNetworkFabric.AccessControlLists.delete","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.AccessControlLists.get","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.AccessControlLists.get","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.list":"Microsoft.ManagedNetworkFabric.AccessControlLists.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.AccessControlLists.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.resync":"Microsoft.ManagedNetworkFabric.AccessControlLists.resync","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.update":"Microsoft.ManagedNetworkFabric.AccessControlLists.update","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient":"Microsoft.ManagedNetworkFabric.ExternalNetworks","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginCreate":"Microsoft.ManagedNetworkFabric.ExternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginDelete":"Microsoft.ManagedNetworkFabric.ExternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdate":"Microsoft.ManagedNetworkFabric.ExternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.beginUpdateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.create":"Microsoft.ManagedNetworkFabric.ExternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.delete":"Microsoft.ManagedNetworkFabric.ExternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.get":"Microsoft.ManagedNetworkFabric.ExternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.getWithResponse":"Microsoft.ManagedNetworkFabric.ExternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.listByL3IsolationDomain":"Microsoft.ManagedNetworkFabric.ExternalNetworks.listByL3IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.update":"Microsoft.ManagedNetworkFabric.ExternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient.updateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.FilesharesManagementClient":"Microsoft.ManagedNetworkFabric","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient":"Microsoft.ManagedNetworkFabric.InternalNetworks","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginCreate":"Microsoft.ManagedNetworkFabric.InternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginDelete":"Microsoft.ManagedNetworkFabric.InternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdate":"Microsoft.ManagedNetworkFabric.InternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.beginUpdateBgpAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.create":"Microsoft.ManagedNetworkFabric.InternalNetworks.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.delete":"Microsoft.ManagedNetworkFabric.InternalNetworks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.get":"Microsoft.ManagedNetworkFabric.InternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.getWithResponse":"Microsoft.ManagedNetworkFabric.InternalNetworks.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.listByL3IsolationDomain":"Microsoft.ManagedNetworkFabric.InternalNetworks.listByL3IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.update":"Microsoft.ManagedNetworkFabric.InternalNetworks.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient.updateBgpAdministrativeState":"Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient":"Microsoft.ManagedNetworkFabric.InternetGatewayRules","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginCreate":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginDelete":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.create":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.delete":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.list":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient.update":"Microsoft.ManagedNetworkFabric.InternetGatewayRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient":"Microsoft.ManagedNetworkFabric.InternetGateways","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginCreate":"Microsoft.ManagedNetworkFabric.InternetGateways.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginDelete":"Microsoft.ManagedNetworkFabric.InternetGateways.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.beginUpdate":"Microsoft.ManagedNetworkFabric.InternetGateways.update","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.create":"Microsoft.ManagedNetworkFabric.InternetGateways.create","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.delete":"Microsoft.ManagedNetworkFabric.InternetGateways.delete","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGateways.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.InternetGateways.get","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.list":"Microsoft.ManagedNetworkFabric.InternetGateways.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.InternetGateways.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient.update":"Microsoft.ManagedNetworkFabric.InternetGateways.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient":"Microsoft.ManagedNetworkFabric.IpCommunities","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginCreate":"Microsoft.ManagedNetworkFabric.IpCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginDelete":"Microsoft.ManagedNetworkFabric.IpCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.IpCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.create":"Microsoft.ManagedNetworkFabric.IpCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.delete":"Microsoft.ManagedNetworkFabric.IpCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.IpCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.IpCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.list":"Microsoft.ManagedNetworkFabric.IpCommunities.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.IpCommunities.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient.update":"Microsoft.ManagedNetworkFabric.IpCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginCreate":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginDelete":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.create":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.delete":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.list":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient.update":"Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient":"Microsoft.ManagedNetworkFabric.IpPrefixes","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginCreate":"Microsoft.ManagedNetworkFabric.IpPrefixes.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginDelete":"Microsoft.ManagedNetworkFabric.IpPrefixes.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.IpPrefixes.update","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.create":"Microsoft.ManagedNetworkFabric.IpPrefixes.create","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.delete":"Microsoft.ManagedNetworkFabric.IpPrefixes.delete","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.IpPrefixes.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.IpPrefixes.get","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.list":"Microsoft.ManagedNetworkFabric.IpPrefixes.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.IpPrefixes.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient.update":"Microsoft.ManagedNetworkFabric.IpPrefixes.update","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient":"Microsoft.ManagedNetworkFabric.L2IsolationDomains","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginCreate":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginDelete":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.create":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.delete":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.list":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.update":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient":"Microsoft.ManagedNetworkFabric.L3IsolationDomains","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginCreate":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginDelete":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.create":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.create","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.delete":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.get","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.list":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.update":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.update","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient":"Microsoft.ManagedNetworkFabric.NeighborGroups","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NeighborGroups.create","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NeighborGroups.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NeighborGroups.update","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.create":"Microsoft.ManagedNetworkFabric.NeighborGroups.create","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.delete":"Microsoft.ManagedNetworkFabric.NeighborGroups.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NeighborGroups.get","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NeighborGroups.get","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.list":"Microsoft.ManagedNetworkFabric.NeighborGroups.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NeighborGroups.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient.update":"Microsoft.ManagedNetworkFabric.NeighborGroups.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.get":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient.list":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient":"Microsoft.ManagedNetworkFabric.NetworkDevices","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkDevices.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkDevices.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginReboot":"Microsoft.ManagedNetworkFabric.NetworkDevices.reboot","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRefreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRunRoCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginRunRwCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkDevices.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.beginUpgrade":"Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.create":"Microsoft.ManagedNetworkFabric.NetworkDevices.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkDevices.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkDevices.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkDevices.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.list":"Microsoft.ManagedNetworkFabric.NetworkDevices.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkDevices.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.reboot":"Microsoft.ManagedNetworkFabric.NetworkDevices.reboot","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.refreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.runRoCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.runRwCommand":"Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.update":"Microsoft.ManagedNetworkFabric.NetworkDevices.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient.upgrade":"Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.create":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.delete":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.list":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient.update":"Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.get":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient.list":"Microsoft.ManagedNetworkFabric.NetworkFabricSkus.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient":"Microsoft.ManagedNetworkFabric.NetworkFabrics","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.armConfigurationDiff":"Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginArmConfigurationDiff":"Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCommitBatchStatus":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkFabrics.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkFabrics.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDeprovision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginDiscardCommitBatch":"Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginGetTopology":"Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginLockFabric":"Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginProvision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.provision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginRefreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkFabrics.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdateInfraManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpdateWorkloadManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginUpgrade":"Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.beginViewDeviceConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.commitBatchStatus":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.create":"Microsoft.ManagedNetworkFabric.NetworkFabrics.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkFabrics.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.deprovision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.discardCommitBatch":"Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabrics.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkFabrics.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.getTopology":"Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.list":"Microsoft.ManagedNetworkFabric.NetworkFabrics.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkFabrics.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.lockFabric":"Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.provision":"Microsoft.ManagedNetworkFabric.NetworkFabrics.provision","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.refreshConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.update":"Microsoft.ManagedNetworkFabric.NetworkFabrics.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.updateInfraManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.updateWorkloadManagementBfdConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.upgrade":"Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient.viewDeviceConfiguration":"Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient":"Microsoft.ManagedNetworkFabric.NetworkInterfaces","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.create":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.get":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.listByNetworkDevice":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.listByNetworkDevice","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.update":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient":"Microsoft.ManagedNetworkFabric.NetworkMonitors","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkMonitors.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkMonitors.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkMonitors.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.create":"Microsoft.ManagedNetworkFabric.NetworkMonitors.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkMonitors.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkMonitors.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkMonitors.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.list":"Microsoft.ManagedNetworkFabric.NetworkMonitors.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkMonitors.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.update":"Microsoft.ManagedNetworkFabric.NetworkMonitors.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkMonitorsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.create":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.delete":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.list":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient.update":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient":"Microsoft.ManagedNetworkFabric.NetworkRacks","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkRacks.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkRacks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkRacks.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.create":"Microsoft.ManagedNetworkFabric.NetworkRacks.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.delete":"Microsoft.ManagedNetworkFabric.NetworkRacks.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkRacks.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkRacks.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.list":"Microsoft.ManagedNetworkFabric.NetworkRacks.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkRacks.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient.update":"Microsoft.ManagedNetworkFabric.NetworkRacks.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient":"Microsoft.ManagedNetworkFabric.NetworkTapRules","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkTapRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkTapRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginResync":"Microsoft.ManagedNetworkFabric.NetworkTapRules.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkTapRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.create":"Microsoft.ManagedNetworkFabric.NetworkTapRules.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.delete":"Microsoft.ManagedNetworkFabric.NetworkTapRules.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTapRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkTapRules.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.list":"Microsoft.ManagedNetworkFabric.NetworkTapRules.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTapRules.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.resync":"Microsoft.ManagedNetworkFabric.NetworkTapRules.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.update":"Microsoft.ManagedNetworkFabric.NetworkTapRules.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient":"Microsoft.ManagedNetworkFabric.NetworkTaps","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkTaps.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkTaps.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginResync":"Microsoft.ManagedNetworkFabric.NetworkTaps.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkTaps.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.create":"Microsoft.ManagedNetworkFabric.NetworkTaps.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkTaps.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTaps.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.NetworkTaps.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.list":"Microsoft.ManagedNetworkFabric.NetworkTaps.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.NetworkTaps.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.resync":"Microsoft.ManagedNetworkFabric.NetworkTaps.resync","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.update":"Microsoft.ManagedNetworkFabric.NetworkTaps.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginCreate":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginDelete":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdate":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.beginUpdateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.create":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.delete":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.get":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.getWithResponse":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.listByNetworkFabric":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.listByNetworkFabric","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.update":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient.updateBfdAdministrativeState":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient":"Microsoft.ManagedNetworkFabric.Operations","com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient":"Microsoft.ManagedNetworkFabric.RoutePolicies","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginCommitConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginCreate":"Microsoft.ManagedNetworkFabric.RoutePolicies.create","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginDelete":"Microsoft.ManagedNetworkFabric.RoutePolicies.delete","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginUpdate":"Microsoft.ManagedNetworkFabric.RoutePolicies.update","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginUpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.beginValidateConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.commitConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.create":"Microsoft.ManagedNetworkFabric.RoutePolicies.create","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.delete":"Microsoft.ManagedNetworkFabric.RoutePolicies.delete","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.getByResourceGroup":"Microsoft.ManagedNetworkFabric.RoutePolicies.get","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.getByResourceGroupWithResponse":"Microsoft.ManagedNetworkFabric.RoutePolicies.get","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.list":"Microsoft.ManagedNetworkFabric.RoutePolicies.listBySubscription","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.listByResourceGroup":"Microsoft.ManagedNetworkFabric.RoutePolicies.listByResourceGroup","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.update":"Microsoft.ManagedNetworkFabric.RoutePolicies.update","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.updateAdministrativeState":"Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient.validateConfiguration":"Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration","com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner":"Microsoft.ManagedNetworkFabric.AccessControlList","com.azure.resourcemanager.managednetworkfabric.fluent.models.ArmConfigurationDiffResponseInner":"Microsoft.ManagedNetworkFabric.ArmConfigurationDiffResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommitBatchStatusResponseInner":"Microsoft.ManagedNetworkFabric.CommitBatchStatusResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommandsOperationStatusResult","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceRWCommandsInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceRWCommands","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceUpdate","com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForStateUpdate","com.azure.resourcemanager.managednetworkfabric.fluent.models.DiscardCommitBatchResponseInner":"Microsoft.ManagedNetworkFabric.DiscardCommitBatchResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkBfdAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.ExternalNetworkBfdAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner":"Microsoft.ManagedNetworkFabric.ExternalNetwork","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBfdAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.InternalNetworkBfdAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkBgpAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.InternalNetworkBgpAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner":"Microsoft.ManagedNetworkFabric.InternalNetwork","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner":"Microsoft.ManagedNetworkFabric.InternetGateway","com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner":"Microsoft.ManagedNetworkFabric.InternetGatewayRule","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner":"Microsoft.ManagedNetworkFabric.IpCommunity","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner":"Microsoft.ManagedNetworkFabric.IpExtendedCommunity","com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner":"Microsoft.ManagedNetworkFabric.IpPrefix","com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner":"Microsoft.ManagedNetworkFabric.L2IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner":"Microsoft.ManagedNetworkFabric.L3IsolationDomain","com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner":"Microsoft.ManagedNetworkFabric.NeighborGroup","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner":"Microsoft.ManagedNetworkFabric.NetworkDevice","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner":"Microsoft.ManagedNetworkFabric.NetworkDeviceSku","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner":"Microsoft.ManagedNetworkFabric.NetworkFabricController","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner":"Microsoft.ManagedNetworkFabric.NetworkFabric","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner":"Microsoft.ManagedNetworkFabric.NetworkFabricSku","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner":"Microsoft.ManagedNetworkFabric.NetworkInterface","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner":"Microsoft.ManagedNetworkFabric.NetworkMonitor","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner":"Microsoft.ManagedNetworkFabric.NetworkPacketBroker","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner":"Microsoft.ManagedNetworkFabric.NetworkRack","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner":"Microsoft.ManagedNetworkFabric.NetworkTap","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner":"Microsoft.ManagedNetworkFabric.NetworkTapRule","com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnect","com.azure.resourcemanager.managednetworkfabric.fluent.models.NniBfdAdministrativeStateResponseInner":"Microsoft.ManagedNetworkFabric.NniBfdAdministrativeStateResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner":"Microsoft.ManagedNetworkFabric.RoutePolicy","com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner":"Microsoft.ManagedNetworkFabric.ValidateConfigurationResponse","com.azure.resourcemanager.managednetworkfabric.fluent.models.ViewDeviceConfigurationResponseInner":"Microsoft.ManagedNetworkFabric.ViewDeviceConfigurationResponse","com.azure.resourcemanager.managednetworkfabric.implementation.FilesharesManagementClientBuilder":"Microsoft.ManagedNetworkFabric","com.azure.resourcemanager.managednetworkfabric.implementation.models.AccessControlListListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.IpExtendedCommunityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NeighborGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkuListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricControllerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkuListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkPacketBrokerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRackListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.managednetworkfabric.implementation.models.RoutePolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction":"Microsoft.ManagedNetworkFabric.AccessControlListAction","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch":"Microsoft.ManagedNetworkFabric.AccessControlListActionPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition":"Microsoft.ManagedNetworkFabric.AccessControlListMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch":"Microsoft.ManagedNetworkFabric.AccessControlListMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration":"Microsoft.ManagedNetworkFabric.AccessControlListMatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch":"Microsoft.ManagedNetworkFabric.AccessControlListMatchConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch":"Microsoft.ManagedNetworkFabric.AccessControlListPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties":"Microsoft.ManagedNetworkFabric.AccessControlListPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition":"Microsoft.ManagedNetworkFabric.AccessControlListPortCondition","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch":"Microsoft.ManagedNetworkFabric.AccessControlListPortConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.AccessControlListProperties":"Microsoft.ManagedNetworkFabric.AccessControlListProperties","com.azure.resourcemanager.managednetworkfabric.models.AclActionType":"Microsoft.ManagedNetworkFabric.AclActionType","com.azure.resourcemanager.managednetworkfabric.models.AclType":"Microsoft.ManagedNetworkFabric.AclType","com.azure.resourcemanager.managednetworkfabric.models.Action":"Microsoft.ManagedNetworkFabric.Action","com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties":"Microsoft.ManagedNetworkFabric.ActionIpCommunityPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties":"Microsoft.ManagedNetworkFabric.ActionIpCommunityProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties":"Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties":"Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityProperties","com.azure.resourcemanager.managednetworkfabric.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType":"Microsoft.ManagedNetworkFabric.AddressFamilyType","com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState":"Microsoft.ManagedNetworkFabric.AdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute":"Microsoft.ManagedNetworkFabric.AggregateRoute","com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration":"Microsoft.ManagedNetworkFabric.AggregateRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.AggregateRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride":"Microsoft.ManagedNetworkFabric.AllowASOverride","com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState":"Microsoft.ManagedNetworkFabric.BfdAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration":"Microsoft.ManagedNetworkFabric.BfdConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration":"Microsoft.ManagedNetworkFabric.BfdPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState":"Microsoft.ManagedNetworkFabric.BgpAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration":"Microsoft.ManagedNetworkFabric.BgpConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration":"Microsoft.ManagedNetworkFabric.BgpPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.BitRate":"Microsoft.ManagedNetworkFabric.BitRate","com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit":"Microsoft.ManagedNetworkFabric.BitRateUnit","com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.BmpConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties":"Microsoft.ManagedNetworkFabric.BmpConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState":"Microsoft.ManagedNetworkFabric.BmpConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy":"Microsoft.ManagedNetworkFabric.BmpExportPolicy","com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily":"Microsoft.ManagedNetworkFabric.BmpMonitoredAddressFamily","com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty":"Microsoft.ManagedNetworkFabric.BooleanEnumProperty","com.azure.resourcemanager.managednetworkfabric.models.BurstSize":"Microsoft.ManagedNetworkFabric.BurstSize","com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit":"Microsoft.ManagedNetworkFabric.BurstSizeUnit","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails":"Microsoft.ManagedNetworkFabric.CommitBatchDetails","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchState":"Microsoft.ManagedNetworkFabric.CommitBatchState","com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest":"Microsoft.ManagedNetworkFabric.CommitBatchStatusRequest","com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration":"Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch":"Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands":"Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommands","com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes":"Microsoft.ManagedNetworkFabric.CommunityActionTypes","com.azure.resourcemanager.managednetworkfabric.models.Condition":"Microsoft.ManagedNetworkFabric.Condition","com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties":"Microsoft.ManagedNetworkFabric.ConditionalDefaultRouteProperties","com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState":"Microsoft.ManagedNetworkFabric.ConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType":"Microsoft.ManagedNetworkFabric.ConfigurationType","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet":"Microsoft.ManagedNetworkFabric.ConnectedSubnet","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch":"Microsoft.ManagedNetworkFabric.ConnectedSubnetPatch","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy":"Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.ControllerServices":"Microsoft.ManagedNetworkFabric.ControllerServices","com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties":"Microsoft.ManagedNetworkFabric.DestinationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties":"Microsoft.ManagedNetworkFabric.DestinationProperties","com.azure.resourcemanager.managednetworkfabric.models.DestinationType":"Microsoft.ManagedNetworkFabric.DestinationType","com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState":"Microsoft.ManagedNetworkFabric.DeviceAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties":"Microsoft.ManagedNetworkFabric.DeviceInterfaceProperties","com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand":"Microsoft.ManagedNetworkFabric.DeviceRoCommand","com.azure.resourcemanager.managednetworkfabric.models.DeviceRole":"Microsoft.ManagedNetworkFabric.DeviceRole","com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand":"Microsoft.ManagedNetworkFabric.DeviceRwCommand","com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest":"Microsoft.ManagedNetworkFabric.DiscardCommitBatchRequest","com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState":"Microsoft.ManagedNetworkFabric.EnableDisableState","com.azure.resourcemanager.managednetworkfabric.models.Encapsulation":"Microsoft.ManagedNetworkFabric.Encapsulation","com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType":"Microsoft.ManagedNetworkFabric.EncapsulationType","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy":"Microsoft.ManagedNetworkFabric.ExportRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation":"Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformation","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch":"Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformationPatch","com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.ExportRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation":"Microsoft.ManagedNetworkFabric.ExpressRouteConnectionInformation","com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan":"Microsoft.ManagedNetworkFabric.ExtendedVlan","com.azure.resourcemanager.managednetworkfabric.models.Extension":"Microsoft.ManagedNetworkFabric.Extension","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.ExternalNetworkBfdAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkBmpPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkBmpProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch":"Microsoft.ManagedNetworkFabric.ExternalNetworkPatch","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkPatchPropertiesOptionAProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties":"Microsoft.ManagedNetworkFabric.ExternalNetworkPropertiesOptionAProperties","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType":"Microsoft.ManagedNetworkFabric.ExternalNetworkRouteType","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties":"Microsoft.ManagedNetworkFabric.FabricLockProperties","com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType":"Microsoft.ManagedNetworkFabric.FabricSkuType","com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties":"Microsoft.ManagedNetworkFabric.FeatureFlagProperties","com.azure.resourcemanager.managednetworkfabric.models.GatewayType":"Microsoft.ManagedNetworkFabric.GatewayType","com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties":"Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties":"Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties":"Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties":"Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionProperties","com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties":"Microsoft.ManagedNetworkFabric.HeaderAddressProperties","com.azure.resourcemanager.managednetworkfabric.models.IPAddressType":"Microsoft.ManagedNetworkFabric.IPAddressType","com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.IcmpConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties":"Microsoft.ManagedNetworkFabric.IcmpConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector":"Microsoft.ManagedNetworkFabric.IdentitySelector","com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch":"Microsoft.ManagedNetworkFabric.IdentitySelectorPatch","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy":"Microsoft.ManagedNetworkFabric.ImportRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation":"Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformation","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch":"Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformationPatch","com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.ImportRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.InterfaceType":"Microsoft.ManagedNetworkFabric.InterfaceType","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.InternalNetworkBfdAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.InternalNetworkBgpAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkBmpPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkBmpProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch":"Microsoft.ManagedNetworkFabric.InternalNetworkPatch","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties":"Microsoft.ManagedNetworkFabric.InternalNetworkProperties","com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType":"Microsoft.ManagedNetworkFabric.InternalNetworkRouteType","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch":"Microsoft.ManagedNetworkFabric.InternetGatewayPatch","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties":"Microsoft.ManagedNetworkFabric.InternetGatewayPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties":"Microsoft.ManagedNetworkFabric.InternetGatewayProperties","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch":"Microsoft.ManagedNetworkFabric.InternetGatewayRulePatch","com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties":"Microsoft.ManagedNetworkFabric.InternetGatewayRuleProperties","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList":"Microsoft.ManagedNetworkFabric.IpCommunityIdList","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch":"Microsoft.ManagedNetworkFabric.IpCommunityPatch","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatchableProperties":"Microsoft.ManagedNetworkFabric.IpCommunityPatchableProperties","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityProperties":"Microsoft.ManagedNetworkFabric.IpCommunityProperties","com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule":"Microsoft.ManagedNetworkFabric.IpCommunityRule","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityIdList","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatch","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchProperties":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityProperties","com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule":"Microsoft.ManagedNetworkFabric.IpExtendedCommunityRule","com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties":"Microsoft.ManagedNetworkFabric.IpGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties":"Microsoft.ManagedNetworkFabric.IpGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition":"Microsoft.ManagedNetworkFabric.IpMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch":"Microsoft.ManagedNetworkFabric.IpMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch":"Microsoft.ManagedNetworkFabric.IpPrefixPatch","com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchProperties":"Microsoft.ManagedNetworkFabric.IpPrefixPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IpPrefixProperties":"Microsoft.ManagedNetworkFabric.IpPrefixProperties","com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule":"Microsoft.ManagedNetworkFabric.IpPrefixRule","com.azure.resourcemanager.managednetworkfabric.models.IsManagementType":"Microsoft.ManagedNetworkFabric.IsManagementType","com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled":"Microsoft.ManagedNetworkFabric.IsMonitoringEnabled","com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled":"Microsoft.ManagedNetworkFabric.IsWorkloadManagementNetworkEnabled","com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties":"Microsoft.ManagedNetworkFabric.IsolationDomainPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties":"Microsoft.ManagedNetworkFabric.IsolationDomainProperties","com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch":"Microsoft.ManagedNetworkFabric.L2IsolationDomainPatch","com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatchProperties":"Microsoft.ManagedNetworkFabric.L2IsolationDomainPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties":"Microsoft.ManagedNetworkFabric.L2IsolationDomainProperties","com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy":"Microsoft.ManagedNetworkFabric.L3ExportRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.L3ExportRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch":"Microsoft.ManagedNetworkFabric.L3IsolationDomainPatch","com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties":"Microsoft.ManagedNetworkFabric.L3IsolationDomainPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainProperties":"Microsoft.ManagedNetworkFabric.L3IsolationDomainProperties","com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties":"Microsoft.ManagedNetworkFabric.L3OptionBPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties":"Microsoft.ManagedNetworkFabric.L3OptionBProperties","com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties":"Microsoft.ManagedNetworkFabric.L3UniqueRouteDistinguisherProperties","com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties":"Microsoft.ManagedNetworkFabric.LastOperationProperties","com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration":"Microsoft.ManagedNetworkFabric.Layer2Configuration","com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch":"Microsoft.ManagedNetworkFabric.Layer2ConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol":"Microsoft.ManagedNetworkFabric.Layer4Protocol","com.azure.resourcemanager.managednetworkfabric.models.LockConfigurationState":"Microsoft.ManagedNetworkFabric.LockConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration":"Microsoft.ManagedNetworkFabric.ManagedResourceGroupConfiguration","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch":"Microsoft.ManagedNetworkFabric.ManagedServiceIdentityPatch","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType":"Microsoft.ManagedNetworkFabric.ManagedServiceIdentitySelectorType","com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties":"Microsoft.ManagedNetworkFabric.ManagementNetworkConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration":"Microsoft.ManagedNetworkFabric.ManagementNetworkPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState":"Microsoft.ManagedNetworkFabric.MicroBfdState","com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState":"Microsoft.ManagedNetworkFabric.NNIDerivedUniqueRouteDistinguisherConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress":"Microsoft.ManagedNetworkFabric.NeighborAddress","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus":"Microsoft.ManagedNetworkFabric.NeighborAddressBfdAdministrativeStatus","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus":"Microsoft.ManagedNetworkFabric.NeighborAddressBgpAdministrativeStatus","com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch":"Microsoft.ManagedNetworkFabric.NeighborAddressPatch","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination":"Microsoft.ManagedNetworkFabric.NeighborGroupDestination","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch":"Microsoft.ManagedNetworkFabric.NeighborGroupDestinationPatch","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch":"Microsoft.ManagedNetworkFabric.NeighborGroupPatch","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties":"Microsoft.ManagedNetworkFabric.NeighborGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties":"Microsoft.ManagedNetworkFabric.NeighborGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters":"Microsoft.ManagedNetworkFabric.NetworkDevicePatchParameters","com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParametersProperties":"Microsoft.ManagedNetworkFabric.NetworkDevicePatchParametersProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties":"Microsoft.ManagedNetworkFabric.NetworkDeviceProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole":"Microsoft.ManagedNetworkFabric.NetworkDeviceRole","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName":"Microsoft.ManagedNetworkFabric.NetworkDeviceRoleName","com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkuProperties":"Microsoft.ManagedNetworkFabric.NetworkDeviceSkuProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch":"Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricControllerProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction":"Microsoft.ManagedNetworkFabric.NetworkFabricLockAction","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest":"Microsoft.ManagedNetworkFabric.NetworkFabricLockRequest","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType":"Microsoft.ManagedNetworkFabric.NetworkFabricLockType","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch":"Microsoft.ManagedNetworkFabric.NetworkFabricPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkuProperties":"Microsoft.ManagedNetworkFabric.NetworkFabricSkuProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricUpgradeAction":"Microsoft.ManagedNetworkFabric.NetworkFabricUpgradeAction","com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch":"Microsoft.ManagedNetworkFabric.NetworkInterfacePatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatchProperties":"Microsoft.ManagedNetworkFabric.NetworkInterfacePatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties":"Microsoft.ManagedNetworkFabric.NetworkInterfaceProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch":"Microsoft.ManagedNetworkFabric.NetworkMonitorPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkMonitorPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties":"Microsoft.ManagedNetworkFabric.NetworkMonitorProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokerPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties":"Microsoft.ManagedNetworkFabric.NetworkPacketBrokerProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch":"Microsoft.ManagedNetworkFabric.NetworkRackPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties":"Microsoft.ManagedNetworkFabric.NetworkRackProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType":"Microsoft.ManagedNetworkFabric.NetworkRackType","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch":"Microsoft.ManagedNetworkFabric.NetworkTapPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkTapPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapProperties":"Microsoft.ManagedNetworkFabric.NetworkTapProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction":"Microsoft.ManagedNetworkFabric.NetworkTapRuleAction","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch":"Microsoft.ManagedNetworkFabric.NetworkTapRuleActionPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch":"Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch":"Microsoft.ManagedNetworkFabric.NetworkTapRulePatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchProperties":"Microsoft.ManagedNetworkFabric.NetworkTapRulePatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleProperties":"Microsoft.ManagedNetworkFabric.NetworkTapRuleProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatch","com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties":"Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectProperties","com.azure.resourcemanager.managednetworkfabric.models.NfcSku":"Microsoft.ManagedNetworkFabric.NfcSku","com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest":"Microsoft.ManagedNetworkFabric.NniBfdAdministrativeStateRequest","com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties":"Microsoft.ManagedNetworkFabric.NniBmpPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties":"Microsoft.ManagedNetworkFabric.NniBmpProperties","com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.NniStaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.NniStaticRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NniType":"Microsoft.ManagedNetworkFabric.NniType","com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.NpbStaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch":"Microsoft.ManagedNetworkFabric.NpbStaticRouteConfigurationPatch","com.azure.resourcemanager.managednetworkfabric.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration":"Microsoft.ManagedNetworkFabric.OptionBLayer3Configuration","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties":"Microsoft.ManagedNetworkFabric.OptionBLayer3ConfigurationPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.managednetworkfabric.models.PeeringOption":"Microsoft.ManagedNetworkFabric.PeeringOption","com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties":"Microsoft.ManagedNetworkFabric.PoliceRateConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds":"Microsoft.ManagedNetworkFabric.PollingIntervalInSeconds","com.azure.resourcemanager.managednetworkfabric.models.PollingType":"Microsoft.ManagedNetworkFabric.PollingType","com.azure.resourcemanager.managednetworkfabric.models.PortCondition":"Microsoft.ManagedNetworkFabric.PortCondition","com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch":"Microsoft.ManagedNetworkFabric.PortConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties":"Microsoft.ManagedNetworkFabric.PortGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties":"Microsoft.ManagedNetworkFabric.PortGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.PortType":"Microsoft.ManagedNetworkFabric.PortType","com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.PrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties":"Microsoft.ManagedNetworkFabric.PrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.PrefixType":"Microsoft.ManagedNetworkFabric.PrefixType","com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState":"Microsoft.ManagedNetworkFabric.ProvisioningState","com.azure.resourcemanager.managednetworkfabric.models.RebootProperties":"Microsoft.ManagedNetworkFabric.RebootProperties","com.azure.resourcemanager.managednetworkfabric.models.RebootType":"Microsoft.ManagedNetworkFabric.RebootType","com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets":"Microsoft.ManagedNetworkFabric.RedistributeConnectedSubnets","com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes":"Microsoft.ManagedNetworkFabric.RedistributeStaticRoutes","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType":"Microsoft.ManagedNetworkFabric.RoutePolicyActionType","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType":"Microsoft.ManagedNetworkFabric.RoutePolicyConditionType","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch":"Microsoft.ManagedNetworkFabric.RoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatchableProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyPatchableProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyStatementPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties":"Microsoft.ManagedNetworkFabric.RoutePolicyStatementProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties":"Microsoft.ManagedNetworkFabric.RoutePrefixLimitPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties":"Microsoft.ManagedNetworkFabric.RoutePrefixLimitProperties","com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation":"Microsoft.ManagedNetworkFabric.RouteTargetInformation","com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation":"Microsoft.ManagedNetworkFabric.RouteTargetPatchInformation","com.azure.resourcemanager.managednetworkfabric.models.RouteType":"Microsoft.ManagedNetworkFabric.RouteType","com.azure.resourcemanager.managednetworkfabric.models.RuleCondition":"Microsoft.ManagedNetworkFabric.RuleCondition","com.azure.resourcemanager.managednetworkfabric.models.RuleProperties":"Microsoft.ManagedNetworkFabric.RuleProperties","com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType":"Microsoft.ManagedNetworkFabric.SourceDestinationType","com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties":"Microsoft.ManagedNetworkFabric.StatementActionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties":"Microsoft.ManagedNetworkFabric.StatementActionProperties","com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties":"Microsoft.ManagedNetworkFabric.StatementConditionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties":"Microsoft.ManagedNetworkFabric.StatementConditionProperties","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration":"Microsoft.ManagedNetworkFabric.StaticRouteConfiguration","com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration":"Microsoft.ManagedNetworkFabric.StaticRoutePatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties":"Microsoft.ManagedNetworkFabric.StaticRoutePatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties":"Microsoft.ManagedNetworkFabric.StaticRouteProperties","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy":"Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicy","com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch":"Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicyPatch","com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState":"Microsoft.ManagedNetworkFabric.StationConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode":"Microsoft.ManagedNetworkFabric.StationConnectionMode","com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties":"Microsoft.ManagedNetworkFabric.StationConnectionPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties":"Microsoft.ManagedNetworkFabric.StationConnectionProperties","com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration":"Microsoft.ManagedNetworkFabric.StorageAccountConfiguration","com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration":"Microsoft.ManagedNetworkFabric.StorageAccountPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties":"Microsoft.ManagedNetworkFabric.SupportedConnectorProperties","com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties":"Microsoft.ManagedNetworkFabric.SupportedVersionProperties","com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType":"Microsoft.ManagedNetworkFabric.TapRuleActionType","com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration":"Microsoft.ManagedNetworkFabric.TerminalServerConfiguration","com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration":"Microsoft.ManagedNetworkFabric.TerminalServerPatchConfiguration","com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState":"Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherConfigurationState","com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties":"Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties":"Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherProperties","com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState":"Microsoft.ManagedNetworkFabric.UpdateAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState":"Microsoft.ManagedNetworkFabric.UpdateDeviceAdministrativeState","com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion":"Microsoft.ManagedNetworkFabric.UpdateVersion","com.azure.resourcemanager.managednetworkfabric.models.UpgradeNetworkFabricProperties":"Microsoft.ManagedNetworkFabric.UpgradeNetworkFabricProperties","com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState":"Microsoft.ManagedNetworkFabric.V4OverV6BgpSessionState","com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState":"Microsoft.ManagedNetworkFabric.V6OverV4BgpSessionState","com.azure.resourcemanager.managednetworkfabric.models.ValidateAction":"Microsoft.ManagedNetworkFabric.ValidateAction","com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties":"Microsoft.ManagedNetworkFabric.ValidateConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties":"Microsoft.ManagedNetworkFabric.VlanGroupPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties":"Microsoft.ManagedNetworkFabric.VlanGroupProperties","com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition":"Microsoft.ManagedNetworkFabric.VlanMatchCondition","com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch":"Microsoft.ManagedNetworkFabric.VlanMatchConditionPatch","com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties":"Microsoft.ManagedNetworkFabric.VpnConfigurationPatchableProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties":"Microsoft.ManagedNetworkFabric.VpnConfigurationProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties":"Microsoft.ManagedNetworkFabric.VpnOptionAPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties":"Microsoft.ManagedNetworkFabric.VpnOptionAProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties":"Microsoft.ManagedNetworkFabric.VpnOptionBPatchProperties","com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties":"Microsoft.ManagedNetworkFabric.VpnOptionBProperties","com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities":"Microsoft.ManagedNetworkFabric.WellKnownCommunities"},"generatedFiles":["src/main/java/com/azure/resourcemanager/managednetworkfabric/FilesharesManager.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/FilesharesManagementClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkMonitorsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArmConfigurationDiffResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommitBatchStatusResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceRWCommandsInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/DiscardCommitBatchResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkBfdAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBfdAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkBgpAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkMonitorInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NniBfdAdministrativeStateResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ViewDeviceConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArmConfigurationDiffResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommitBatchStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceROCommandsOperationStatusResultImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceRWCommandsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/DiscardCommitBatchResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkBfdAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/FilesharesManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/FilesharesManagementClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBfdAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkBgpAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkMonitorsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NniBfdAdministrativeStateResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ViewDeviceConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/AccessControlListListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/ExternalNetworkListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternalNetworkListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/InternetGatewayRuleListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpCommunityListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpExtendedCommunityListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/IpPrefixListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L2IsolationDomainListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/L3IsolationDomainListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NeighborGroupListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkDeviceSkuListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricControllerListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkFabricSkuListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkInterfaceListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkMonitorListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkPacketBrokerListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkRackListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkTapRuleListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/NetworkToNetworkInterconnectListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/models/RoutePolicyListResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListActionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AllowASOverride.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArmConfigurationDiffResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BitRateUnit.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpExportPolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BmpMonitoredAddressFamily.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BooleanEnumProperty.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSize.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BurstSizeUnit.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchDetails.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommitBatchStatusResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommands.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceROCommandsOperationStatusResult.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceRWCommands.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommunityActionTypes.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionalDefaultRouteProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceInterfaceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRoCommand.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRole.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceRwCommand.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DiscardCommitBatchResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExpressRouteConnectionInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtendedVlan.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBfdAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkBmpProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkRouteType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkStaticRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricLockProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FeatureFlagProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalAccessControlListActionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GlobalNetworkTapRuleActionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/HeaderAddressProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IPAddressType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IcmpConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelector.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IdentitySelectorPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBfdAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBgpAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkBmpProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkRouteType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRuleProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityIdList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatchableProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityIdList.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3UniqueRouteDistinguisherProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LastOperationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2ConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/LockConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedResourceGroupConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentitySelectorType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/MicroBfdState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NNIDerivedUniqueRouteDistinguisherConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv4PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NativeIpv6PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBfdAdministrativeStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressBgpAdministrativeStatus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddressPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestinationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParametersProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleName.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkuProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricLockType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkuProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricUpgradeAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfacePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaceProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaces.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitor.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitorProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkMonitors.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleActionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateRequest.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBfdAdministrativeStateResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniBmpProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniStaticRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NniType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfigurationPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Operations.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3ConfigurationPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Origin.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PeeringOption.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PoliceRateConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeConnectedSubnets.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RedistributeStaticRoutes.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatchableProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePrefixLimitProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetPatchInformation.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRoutePatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicy.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteRoutePolicyPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionMode.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StationConnectionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StorageAccountPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedVersionProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchConfiguration.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherConfigurationState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UniqueRouteDistinguisherProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpgradeNetworkFabricProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V4OverV6BgpSessionState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/V6OverV4BgpSessionState.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ViewDeviceConfigurationResponse.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchConditionPatch.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionAProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBPatchProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnOptionBProperties.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WellKnownCommunities.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/models/package-info.java","src/main/java/com/azure/resourcemanager/managednetworkfabric/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json index 233f8beb82ee..db8a821fe51e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsClientImpl$AccessControlListsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksClientImpl$ExternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksClientImpl$InternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesClientImpl$InternetGatewayRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysClientImpl$InternetGatewaysService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpCommunitiesClientImpl$IpCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpExtendedCommunitiesClientImpl$IpExtendedCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpPrefixesClientImpl$IpPrefixesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L2IsolationDomainsClientImpl$L2IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L3IsolationDomainsClientImpl$L3IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NeighborGroupsClientImpl$NeighborGroupsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDeviceSkusClientImpl$NetworkDeviceSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDevicesClientImpl$NetworkDevicesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricControllersClientImpl$NetworkFabricControllersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusClientImpl$NetworkFabricSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsClientImpl$NetworkFabricsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesClientImpl$NetworkInterfacesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersClientImpl$NetworkPacketBrokersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksClientImpl$NetworkRacksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesClientImpl$NetworkTapRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapsClientImpl$NetworkTapsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkToNetworkInterconnectsClientImpl$NetworkToNetworkInterconnectsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.RoutePoliciesClientImpl$RoutePoliciesService"]] \ No newline at end of file +[["com.azure.resourcemanager.managednetworkfabric.implementation.AccessControlListsClientImpl$AccessControlListsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksClientImpl$ExternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksClientImpl$InternalNetworksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesClientImpl$InternetGatewayRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysClientImpl$InternetGatewaysService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpCommunitiesClientImpl$IpCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpExtendedCommunitiesClientImpl$IpExtendedCommunitiesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.IpPrefixesClientImpl$IpPrefixesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L2IsolationDomainsClientImpl$L2IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.L3IsolationDomainsClientImpl$L3IsolationDomainsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NeighborGroupsClientImpl$NeighborGroupsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDeviceSkusClientImpl$NetworkDeviceSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDevicesClientImpl$NetworkDevicesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricControllersClientImpl$NetworkFabricControllersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusClientImpl$NetworkFabricSkusService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsClientImpl$NetworkFabricsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesClientImpl$NetworkInterfacesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkMonitorsClientImpl$NetworkMonitorsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersClientImpl$NetworkPacketBrokersService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksClientImpl$NetworkRacksService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesClientImpl$NetworkTapRulesService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapsClientImpl$NetworkTapsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.NetworkToNetworkInterconnectsClientImpl$NetworkToNetworkInterconnectsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.managednetworkfabric.implementation.RoutePoliciesClientImpl$RoutePoliciesService"]] \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json index 3bf4de9316fa..0637a088a01e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-managednetworkfabric/reflect-config.json @@ -1 +1 @@ -[{"name":"com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true}] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/resources/azure-resourcemanager-managednetworkfabric.properties @@ -0,0 +1 @@ +version=${project.version} 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 6fa7d636c902..58caae7eaeab 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,14 +8,25 @@ 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.AccessControlListProperties; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; 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.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; @@ -31,60 +42,67 @@ */ public final class AccessControlListsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Create.json */ /** * Sample code: AccessControlLists_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .define("example-acl") .withRegion("eastUs") .withExistingResourceGroup("example-rg") + .withProperties(new AccessControlListProperties().withAnnotation("annotation") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://ACL-Storage-URL") + .withDefaultAction(CommunityActionTypes.PERMIT) + .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")) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("example-counter") + .withRemarkComment("example-remark") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) + .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")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE))) .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("https://ACL-Storage-URL") - .withDefaultAction(CommunityActionTypes.PERMIT) - .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 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(); } 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 5e89394d31d7..b271066f6a3d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class AccessControlListsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Delete.json */ /** * Sample code: AccessControlLists_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 d71ac8ab6c22..4d83c797bd7c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class AccessControlListsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Get.json */ /** * Sample code: AccessControlLists_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void accessControlListsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + accessControlListsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .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 6c523081a702..f1ea1418a795 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class AccessControlListsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_ListByResourceGroup.json */ /** * Sample code: AccessControlLists_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 0b7830954c12..e74c84ef9f45 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class AccessControlListsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_ListBySubscription.json */ /** * Sample code: AccessControlLists_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 8c9d530372cd..9779ce4ac1f8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class AccessControlListsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Resync.json */ /** * Sample code: AccessControlLists_Resync_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsResyncMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index f4d178953055..9e81d6a2411e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class AccessControlListsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_UpdateAdministrativeState.json */ /** * Sample code: AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.accessControlLists() .updateAdministrativeState("example-rg", "example-acl", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 7b5a82ed40bb..07d86abdaba7 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 @@ -1,28 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -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.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; 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.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -32,60 +43,68 @@ */ public final class AccessControlListsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_Update.json */ /** * Sample code: AccessControlLists_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { AccessControlList resource = manager.accessControlLists() .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withAnnotation("annotation") - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("https://microsoft.com/a") - .withDefaultAction(CommunityActionTypes.PERMIT) - .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 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")))))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new AccessControlListPatchProperties().withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://microsoft.com/a") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withMatchConfigurations(Arrays.asList(new AccessControlListMatchConfigurationPatch() + .withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().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 AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))) + .withProtocolNeighbors(Arrays.asList("example-neighbor")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties().withIcmpTypes(Arrays.asList("echo"))))) + .withActions(Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.COUNT) + .withCounterName("example-counter") + .withRemarkComment("example-remark") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(15L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(2L).withUnit(BurstSizeUnit.BYTES))))))) + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("example-portGroup") + .withPorts(Arrays.asList("100-200")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE)) + .withAnnotation("annotation")) .apply(); } 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 index 6c50d0fab390..48d825428f84 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class AccessControlListsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/AccessControlLists_ValidateConfiguration.json */ /** * Sample code: AccessControlLists_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void accessControlListsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/ExternalNetworksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java index c8ea36f11723..6831a32ce7ad 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 @@ -1,16 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -18,54 +28,64 @@ */ public final class ExternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Create.json */ /** * Sample code: ExternalNetworks_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .define("example-externalnetwork") - .withExistingL3IsolationDomain("example-rg", "example-l3domain") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(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") - .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(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")) - .withNetworkToNetworkInterconnectId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") - .withImportRoutePolicyId( - "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .define("example-ext") + .withExistingL3IsolationDomain("example-rg", "example-externalnetwork") + .withProperties(new ExternalNetworkProperties().withAnnotation("annotation") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .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")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("65046:10039")) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .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 ExternalNetworkPropertiesOptionAProperties() + .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(65047L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(14).withThreshold(17).withIdleTimeExpiry(7))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))))) .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 5c0a3f61f6c8..193935c9c7b2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class ExternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Delete.json */ /** * Sample code: ExternalNetworks_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .delete("example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-externalnetwork", "example-ext", 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 27fa7045e65a..d2f55fd9bd33 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class ExternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Get.json */ /** * Sample code: ExternalNetworks_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .getWithResponse("rgL3IsolationDomains", "yhtr", "fltpszzikbalrzaqq", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", 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 index 9df2ace5b9b7..27d1fdeef316 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class ExternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void externalNetworksListByL3IsolationDomainMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-externalnetwork", 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 94f87091608e..60159899896c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,17 @@ */ public final class ExternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void externalNetworksUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.externalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-externalnetwork", + .updateAdministrativeState("example-rg", "example-externalnetwork", "example-ext", 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/ExternalNetworksUpdateBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdAdministrativeStateSamples.java new file mode 100644 index 000000000000..c4ec3c06cb5e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; + +/** + * Samples for ExternalNetworks UpdateBfdAdministrativeState. + */ +public final class ExternalNetworksUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: ExternalNetworks_UpdateBfdAdministrativeState. + * + * @param manager Entry point to FilesharesManager. + */ + public static void externalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.externalNetworks() + .updateBfdAdministrativeState("example-rg", "example-externalnetwork", "example-ext", + new ExternalNetworkBfdAdministrativeStateRequest().withRouteType(ExternalNetworkRouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("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 2c631bc86c21..3c210d1654d4 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 @@ -1,17 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchProperties; 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.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -19,55 +29,72 @@ */ public final class ExternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ExternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/ExternalNetworks_Update.json */ /** * Sample code: ExternalNetworks_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void externalNetworksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + externalNetworksUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { ExternalNetwork resource = manager.externalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-externalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-externalnetwork", "example-ext", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(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 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(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/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .withProperties(new ExternalNetworkPatchProperties().withAnnotation("annotation1") + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withImportRoutePolicy(new ImportRoutePolicyPatch().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 ExportRoutePolicyPatch().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")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new L3OptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10039")) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(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(65047L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(13) + .withThreshold(24) + .withIdleTimeExpiry(8)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(13) + .withThreshold(24) + .withIdleTimeExpiry(8))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("10.0.0.1/14") + .withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("2fff::/64") + .withNextHop(Arrays.asList("3ffe::1")))))) .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 deleted file mode 100644 index 2591e81c78a1..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.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.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/InternalNetworksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java index ef740348772b..d364268a15b2 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 @@ -1,21 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; 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.BmpConfigurationState; 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.InternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -23,62 +31,65 @@ */ public final class InternalNetworksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Create.json */ /** * Sample code: InternalNetworks_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() .define("example-internalnetwork") - .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 InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").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/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .withExistingL3IsolationDomain("example-rg", "example-l3isd") + .withProperties(new InternalNetworkProperties().withAnnotation("annotation") + .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"))) + .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) + .withVlanId(755) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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::"))) + .withBmpConfiguration( + new InternalNetworkBmpProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.1")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1")))) + .withExtension(Extension.NO_EXTENSION)) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays + .asList(new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(23).withThreshold(7).withIdleTimeExpiry(28))))) .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 a40ae29420eb..84f49f4e4cb2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class InternalNetworksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Delete.json */ /** * Sample code: InternalNetworks_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .delete("example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3isd", "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 9d536dc50048..eaa397ae1f33 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,19 +9,17 @@ */ public final class InternalNetworksGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Get.json */ /** * Sample code: InternalNetworks_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", + .getWithResponse("example-rg", "example-l3isd", "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 index cdd7d1381b5b..4c972d5582db 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class InternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_ListByL3IsolationDomain.json */ /** * Sample code: InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internalNetworksListByL3IsolationDomainMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("example-rg", "example-l3isd", 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 ed2436bb3795..6942d0462523 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,17 @@ */ public final class InternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_UpdateAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internalNetworksUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .updateAdministrativeState("example-rg", "example-l3domain", "example-internalnetwork", + .updateAdministrativeState("example-rg", "example-l3isd", "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/InternalNetworksUpdateBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdAdministrativeStateSamples.java new file mode 100644 index 000000000000..d862e3f5cbe4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdAdministrativeStateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType; + +/** + * Samples for InternalNetworks UpdateBfdAdministrativeState. + */ +public final class InternalNetworksUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: InternalNetworks_UpdateBfdAdministrativeState. + * + * @param manager Entry point to FilesharesManager. + */ + public static void internalNetworksUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.internalNetworks() + .updateBfdAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkBfdAdministrativeStateRequest().withRouteType(InternalNetworkRouteType.STATIC) + .withNeighborAddress("10.10.1.10") + .withAdministrativeState(BfdAdministrativeState.fromString("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 72fc24585b0e..a4ab6f45f82b 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 @@ -1,32 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; /** * Samples for InternalNetworks UpdateBgpAdministrativeState. */ public final class InternalNetworksUpdateBgpAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_UpdateBgpAdministrativeState.json */ /** * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.internalNetworks() - .updateBgpAdministrativeState("example-rg", "example-l3domain", "example-internalNetwork", - new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + .updateBgpAdministrativeState("example-rg", "example-l3isd", "example-internalnetwork", + new InternalNetworkBgpAdministrativeStateRequest().withNeighborAddress("10.10.10.10") + .withAdministrativeState(BgpAdministrativeState.fromString("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 eb15ab5c2d5f..fa48f3d9784c 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 @@ -1,21 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; 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.InternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; /** @@ -23,61 +31,65 @@ */ public final class InternalNetworksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternalNetworks_Update.json */ /** * Sample code: InternalNetworks_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internalNetworksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internalNetworksUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { InternalNetwork resource = manager.internalNetworks() - .getWithResponse("example-rg", "example-l3domain", "example-internalnetwork", - com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-l3isd", "example-internalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .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().withIntervalInMilliSeconds(300).withMultiplier(15)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("20.20.20.20/25").withNextHop(Arrays.asList("10.0.0.1")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("2fff::/64").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/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withExportRoutePolicyId( - "/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") + .withProperties(new InternalNetworkPatchProperties().withAnnotation("annotation") + .withMtu(1500) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .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) + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("annotation") + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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 NeighborAddressPatch().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("10.1.0.0"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("10.0.0.10")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(24).withThreshold(6).withIdleTimeExpiry(20))))) .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 deleted file mode 100644 index b99dc80e0645..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.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.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 index 9aa3d37d4d1b..cb55069d28c1 100644 --- 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 @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; @@ -15,25 +18,28 @@ */ public final class InternetGatewayRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Create.json */ /** * Sample code: InternetGatewayRules_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withAnnotation("annotationValue") + .withProperties(new InternetGatewayRuleProperties().withAnnotation("annotationValue") + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("10.10.10.10")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("11.11.10.11")) + .withSourceAddressList(Arrays.asList("10.10.10.10")) + .withHeaderAddressList(Arrays.asList(new HeaderAddressProperties().withHeaderName("abcHeader") + .withAddressList(Arrays.asList("10.10.10.10")))))) + .withTags(mapOf("KeyID", "fakeTokenPlaceholder")) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java index c5846df13129..607b7739f16b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewayRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Delete.json */ /** * Sample code: InternetGatewayRules_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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 index 6bf9831fb832..5f18a747ae7b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewayRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Get.json */ /** * Sample code: InternetGatewayRules_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewayRulesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewayRulesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 701bf4d5adac..4d284184c007 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewayRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_ListByResourceGroup.json */ /** * Sample code: InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 7f41c082b054..000b5c77061b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewayRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_ListBySubscription.json */ /** * Sample code: InternetGatewayRules_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 56a2b344a87c..4e8c023d6902 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,22 +13,20 @@ */ public final class InternetGatewayRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGatewayRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGatewayRules_Update.json */ /** * Sample code: InternetGatewayRules_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewayRulesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { InternetGatewayRule resource = manager.internetGatewayRules() .getByResourceGroupWithResponse("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key3311", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("KeyID", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available 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 index de3bfa76a56b..9d8913d74927 100644 --- 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; import java.util.HashMap; import java.util.Map; @@ -13,28 +14,27 @@ */ public final class InternetGatewaysCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Create.json */ /** * Sample code: InternetGateways_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withInternetGatewayRuleId( - "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") - .withAnnotation("annotation") + .withProperties(new InternetGatewayProperties().withAnnotation("annotation") + .withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .withType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } 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 index 08a90c1b9454..fe726c9b704e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewaysDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Delete.json */ /** * Sample code: InternetGateways_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index a017f36cc2db..288b354672b2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Get.json */ /** * Sample code: InternetGateways_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index c482a7da7846..602e68192ce8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_ListByResourceGroup.json */ /** * Sample code: InternetGateways_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewaysListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/InternetGatewaysListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java index 9ad2e6f48d0b..83dd61bf1dbf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class InternetGatewaysListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_ListBySubscription.json */ /** * Sample code: InternetGateways_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void internetGatewaysListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 index 617b0c403dd9..109a5596efed 100644 --- 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties; import java.util.HashMap; import java.util.Map; @@ -13,24 +14,22 @@ */ public final class InternetGatewaysUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * InternetGateways_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/InternetGateways_Update.json */ /** * Sample code: InternetGateways_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void internetGatewaysUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + internetGatewaysUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { InternetGateway resource = manager.internetGateways() .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key81", "fakeTokenPlaceholder")) - .withInternetGatewayRuleId( - "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new InternetGatewayPatchProperties().withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule")) .apply(); } 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 8475453ea9bb..cf10939f74c5 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; @@ -16,27 +17,25 @@ */ public final class IpCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Create.json */ /** * Sample code: IpCommunities_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities() .define("example-ipcommunity") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyId", "fakeTokenPlaceholder")) - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4155123341L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("1:1")))) - .withAnnotation("annotation") + .withProperties(new IpCommunityProperties().withAnnotation("annotation") + .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1"))))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .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 c60d0dc7b268..917924883d6f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Delete.json */ /** * Sample code: IpCommunities_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 0dee59622374..fede99cb5e70 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Get.json */ /** * Sample code: IpCommunities_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities() .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 fd51483ec074..04c602c28c8a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_ListByResourceGroup.json */ /** * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipCommunitiesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 68303b564f93..b7239fd08a0c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_ListBySubscription.json */ /** * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipCommunitiesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipCommunities().list(com.azure.core.util.Context.NONE); } } 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 c972f6253514..de916aeca547 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 @@ -1,39 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatchableProperties; 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 IpCommunities Update. */ public final class IpCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpCommunities_Update.json */ /** * Sample code: IpCommunities_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipCommunitiesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipCommunitiesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { IpCommunity resource = manager.ipCommunities() .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4155123341L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("1:1")))) + .withTags(mapOf("keyID", "fakeTokenPlaceholder")) + .withProperties(new IpCommunityPatchableProperties() + .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1"))))) .apply(); } + + // Use "Map.of" if available + @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/IpExtendedCommunitiesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java index 9ba3bffa5803..8b70329f2444 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; @@ -15,27 +16,25 @@ */ public final class IpExtendedCommunitiesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Create.json */ /** * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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", "fakeTokenPlaceholder")) - .withAnnotation("annotation") + .withProperties(new IpExtendedCommunityProperties().withAnnotation("annotation") + .withIpExtendedCommunityRules( + Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345"))))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .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 363857694b1c..2f3dcd0329e2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpExtendedCommunitiesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Delete.json */ /** * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities() .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 e66a9748ab18..777fb9e483f9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpExtendedCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Get.json */ /** * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities() .getByResourceGroupWithResponse("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 f49634aa8a51..ecf6e5be05ef 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpExtendedCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_ListByResourceGroup.json */ /** * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 5e706669a972..0dea64aad4e0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpExtendedCommunitiesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_ListBySubscription.json */ /** * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); } } 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 36eaf17af0b1..58a13b9f00a0 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.IpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; @@ -16,27 +17,26 @@ */ public final class IpExtendedCommunitiesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpExtendedCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpExtendedCommunities_Update.json */ /** * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipExtendedCommunitiesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { IpExtendedCommunity resource = manager.ipExtendedCommunities() .getByResourceGroupWithResponse("example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withIpExtendedCommunityRules( - Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4155123341L) - .withRouteTargets(Arrays.asList("1234:2345")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new IpExtendedCommunityPatchProperties().withAnnotation("annotation") + .withIpExtendedCommunityRules( + Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345"))))) .apply(); } 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 f1bc6f473638..a941c013b1ce 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.IpPrefixProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; @@ -16,28 +17,26 @@ */ public final class IpPrefixesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Create.json */ /** * Sample code: IpPrefixes_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipPrefixesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipPrefixesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes() .define("example-ipPrefix") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .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") + .withProperties(new IpPrefixProperties().withAnnotation("annotation") + .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")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .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 ee7d24698807..b40289b133f3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpPrefixesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Delete.json */ /** * Sample code: IpPrefixes_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipPrefixesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipPrefixesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 6628600f2d63..c20c041670bd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpPrefixesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Get.json */ /** * Sample code: IpPrefixes_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void - ipPrefixesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + ipPrefixesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes() .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 db0731cb0959..05b627b7fa07 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpPrefixesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_ListByResourceGroup.json */ /** * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipPrefixesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 2674547fae09..5d743fdf5fdb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class IpPrefixesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_ListBySubscription.json */ /** * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void ipPrefixesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.ipPrefixes().list(com.azure.core.util.Context.NONE); } } 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 30c4c79aa7e5..9d6d3c56b332 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.IpPrefixPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; @@ -17,28 +18,26 @@ */ public final class IpPrefixesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * IpPrefixes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/IpPrefixes_Update.json */ /** * Sample code: IpPrefixes_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void ipPrefixesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + ipPrefixesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { IpPrefix resource = manager.ipPrefixes() .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new IpPrefixPatchProperties().withAnnotation("annotation") + .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")))) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java index 91de835f48dd..0c530464f186 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L2IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_CommitConfiguration.json */ /** * Sample code: L2IsolationDomains_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() .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 d7996ccb169e..656e88f37228 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 @@ -1,9 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties; import java.util.HashMap; import java.util.Map; @@ -12,27 +14,28 @@ */ public final class L2IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Create.json */ /** * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withMtu(1500) - .withAnnotation("annotation") + .withProperties(new L2IsolationDomainProperties().withAnnotation("annotation") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withVlanId(501) + .withMtu(1500) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } 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 95cb6bfc3d08..e56deb1e4135 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L2IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Delete.json */ /** * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().delete("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + 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 44b6a951d6d1..8b3349bd37cc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class L2IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Get.json */ /** * Sample code: L2IsolationDomains_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void l2IsolationDomainsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + l2IsolationDomainsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", 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 84bd1f25f731..2f46ee7009c6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L2IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 079a0d5ff6b5..5bda797efca6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L2IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_ListBySubscription.json */ /** * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); } } 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 6367c9675c21..45cdc20a0624 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,17 @@ */ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L2IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l2IsolationDomains() - .updateAdministrativeState("example-rg", "example-l2Domain", + .updateAdministrativeState("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 76294e1d2bcf..a0cb637c7007 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatchProperties; import java.util.HashMap; import java.util.Map; @@ -13,24 +14,24 @@ */ public final class L2IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_Update.json */ /** * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { L2IsolationDomain resource = manager.l2IsolationDomains() - .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-l2domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withMtu(6000) - .withAnnotation("annotation1") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new L2IsolationDomainPatchProperties().withAnnotation("annotation1") + .withMtu(6000) + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni")) .apply(); } 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 index 3f39fa640ca0..a2aff112b300 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L2IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L2IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l2IsolationDomainsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/L3IsolationDomainsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java index cb00ebbea646..2222ac3da4ba 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L3IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_CommitConfiguration.json */ /** * Sample code: L3IsolationDomains_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 4fc6b18135b0..5b3f3b26a702 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,8 +8,12 @@ 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.L3IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,36 +23,40 @@ */ public final class L3IsolationDomainsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Create.json */ /** * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .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") + .withProperties(new L3IsolationDomainProperties().withAnnotation("annotation") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .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() + .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"))) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy().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") + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withRoutePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(1).withThreshold(90))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } 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 fc974dde42f8..cb073a046afa 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L3IsolationDomainsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Delete.json */ /** * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 a072c73a1813..b6ee21b0acd9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L3IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Get.json */ /** * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void l3IsolationDomainsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + l3IsolationDomainsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains() .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 e89746a75f4d..1a438c83e75d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L3IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_ListByResourceGroup.json */ /** * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 3c7f5b7beb2f..cadbe3f2b6ae 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L3IsolationDomainsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_ListBySubscription.json */ /** * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); } } 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 f322baecfa7b..725765105a49 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_UpdateAdministrativeState.json */ /** - * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: L3IsolationDomains_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.l3IsolationDomains() .updateAdministrativeState("example-rg", "example-l3domain", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 13847fd1fdc9..1c5b2bcdfd46 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 @@ -1,16 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; 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.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -20,34 +23,37 @@ */ public final class L3IsolationDomainsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_Update.json */ /** * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { L3IsolationDomain resource = manager.l3IsolationDomains() .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key4953", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new L3IsolationDomainPatchProperties().withAnnotation("annotation1") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() + .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 ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().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"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().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"))) + .withRoutePrefixLimit(new RoutePrefixLimitPatchProperties().withHardLimit(28).withThreshold(50))) .apply(); } 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 index f58a8b2ec916..0a8ff3f445ab 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class L3IsolationDomainsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/L3IsolationDomains_ValidateConfiguration.json */ /** * Sample code: L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void l3IsolationDomainsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 1bace55a77b1..e23f0c372c96 100644 --- 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -14,27 +15,25 @@ */ public final class NeighborGroupsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Create.json */ /** * Sample code: NeighborGroups_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.neighborGroups() .define("example-neighborGroup") .withRegion("eastus") .withExistingResourceGroup("example-rg") - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) - .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") + .withProperties(new NeighborGroupProperties().withAnnotation("annotation") + .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")))) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java index ccab71461dee..feb4feb465e0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NeighborGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Delete.json */ /** * Sample code: NeighborGroups_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 index 54b99ea1962b..2d52d565045e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NeighborGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Get.json */ /** * Sample code: NeighborGroups_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 8b3bc6fdc1e4..3c963ccf09f0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NeighborGroupsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_ListByResourceGroup.json */ /** * Sample code: NeighborGroups_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void neighborGroupsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/NeighborGroupsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java index cb48d10100d7..d520f07cf52c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NeighborGroupsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_ListBySubscription.json */ /** * Sample code: NeighborGroups_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void neighborGroupsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 index 70f727a26047..421d1fb04496 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -15,27 +16,25 @@ */ public final class NeighborGroupsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NeighborGroups_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NeighborGroups_Update.json */ /** * Sample code: NeighborGroups_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void neighborGroupsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + neighborGroupsUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NeighborGroup resource = manager.neighborGroups() .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key8107", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new NeighborGroupPatchProperties().withAnnotation("Updating") + .withDestination(new NeighborGroupDestinationPatch() + .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")))) .apply(); } 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 855a2eddf350..50bd4f8f5324 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDeviceSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDeviceSkus_Get.json */ /** * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDeviceSkusGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDeviceSkusGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 2b70a18ee89b..e30df546115b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDeviceSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDeviceSkus_ListBySubscription.json */ /** * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDeviceSkusListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); } } 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 27d4837fcf30..120c94c61a74 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties; import java.util.HashMap; import java.util.Map; @@ -12,26 +13,24 @@ */ public final class NetworkDevicesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Create.json */ /** * Sample code: NetworkDevices_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .define("example-device") .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withNetworkDeviceSku("DeviceSku") - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") - .withAnnotation("annotation") + .withProperties(new NetworkDeviceProperties().withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withNetworkDeviceSku("DeviceSku")) + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) .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 9001594e73d8..16b7ced76b55 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDevicesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Delete.json */ /** * Sample code: NetworkDevices_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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/NetworkDevicesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java index 4c0eebda5e4c..4f3446ba08b5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Get.json */ /** * Sample code: NetworkDevices_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .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/NetworkDevicesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java index 1c2663f7ea01..564827da3114 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDevicesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_ListByResourceGroup.json */ /** * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 af78b2622d19..cc20131c3ce7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDevicesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_ListBySubscription.json */ /** * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices().list(com.azure.core.util.Context.NONE); } } 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 6abc0547a5e5..a596c8a878a6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,17 +12,15 @@ */ public final class NetworkDevicesRebootSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Reboot_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Reboot.json */ /** * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesRebootMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesRebootMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .reboot("example-rg", "example-device", new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITH_ZTP), 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 index aade2601e19e..3bb5dbe22c9d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkDevicesRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_RefreshConfiguration.json */ /** * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesRefreshConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/NetworkDevicesRunRoCommandSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRoCommandSamples.java new file mode 100644 index 000000000000..48e22a53d54d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRoCommandSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; + +/** + * Samples for NetworkDevices RunRoCommand. + */ +public final class NetworkDevicesRunRoCommandSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_RunRoCommand.json + */ + /** + * Sample code: NetworkDevices_RunRoCommand_MaximumSet_Gen. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkDevicesRunRoCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkDevices() + .runRoCommand("example-rg", "example-device", new DeviceRoCommand().withCommand("show version"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java new file mode 100644 index 000000000000..00e9ceced786 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRunRwCommandSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; + +/** + * Samples for NetworkDevices RunRwCommand. + */ +public final class NetworkDevicesRunRwCommandSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_RunRwCommand.json + */ + /** + * Sample code: NetworkDevices_RunRwCommand_MaximumSet_Gen. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkDevicesRunRwCommandMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkDevices() + .runRwCommand("example-rg", "example-device", new DeviceRwCommand().withCommand("yzuabghycngqmqtfacvoh"), + 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 index 9edec3d4fd09..9cc9d9c0cdcd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class NetworkDevicesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_UpdateAdministrativeState.json */ /** * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkDevicesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .updateAdministrativeState("example-rg", "example-device", new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList("")) 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 e35805a4ecb2..39283170a3dc 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParametersProperties; import java.util.HashMap; import java.util.Map; @@ -13,25 +14,23 @@ */ public final class NetworkDevicesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Update.json */ /** * Sample code: NetworkDevices_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkDevice resource = manager.networkDevices() .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withHostname("NFA-Device") - .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") - .withAnnotation("annotation") + .withTags(mapOf("KeyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkDevicePatchParametersProperties().withAnnotation("annotation") + .withHostName("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX")) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java index 3a82f37f974d..ecf56b602ed6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,17 +11,15 @@ */ public final class NetworkDevicesUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkDevices_Upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkDevices_Upgrade.json */ /** * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkDevicesUpgradeMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkDevicesUpgradeMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkDevices() .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 5842c254b9c8..3b3df32eb76e 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 @@ -1,50 +1,64 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.NetworkFabricControllerProperties; import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for NetworkFabricControllers Create. */ public final class NetworkFabricControllersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Create.json */ /** * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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") + .withProperties(new NetworkFabricControllerProperties().withAnnotation("annotation") + .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"))) + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) + .withIpv4AddressSpace("172.253.0.0/19") + .withIpv6AddressSpace("::/60") + .withNfcSku(NfcSku.STANDARD)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } + + // Use "Map.of" if available + @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/NetworkFabricControllersDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java index 24fb925c7c2c..b914730d4a9c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricControllersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Delete.json */ /** * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers() .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/NetworkFabricControllersGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java index 256cf9003e9f..425c0ddef835 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricControllersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Get.json */ /** * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers() .getByResourceGroupWithResponse("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 611ddacaa4e9..2263bde98a0c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricControllersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_ListByResourceGroup.json */ /** * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 d8f613b8cd78..707f38e5159e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricControllersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_ListBySubscription.json */ /** * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); } } 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 ca894713c250..cd86f5ea0ad1 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 @@ -1,41 +1,55 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatchProperties; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for NetworkFabricControllers Update. */ public final class NetworkFabricControllersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricControllers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricControllers_Update.json */ /** * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricControllersUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkFabricController resource = manager.networkFabricControllers() .getByResourceGroupWithResponse("example-rg", "example-networkController", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withInfrastructureExpressRouteConnections(Arrays.asList(new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkFabricControllerPatchProperties().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"))) + .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(); } + + // Use "Map.of" if available + @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/NetworkFabricSkusGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java index daf0056c7652..2a0273bf920e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricSkusGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricSkus_Get.json */ /** * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricSkusGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().getWithResponse("example-fabricsku", com.azure.core.util.Context.NONE); + public static void + networkFabricSkusGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabricSkus().getWithResponse("wxample-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 6c0c2c72219e..9d26bd36e216 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricSkusListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabricSkus_ListBySubscription.json */ /** * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricSkusListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java new file mode 100644 index 000000000000..d4bc69dd2097 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsArmConfigurationDiffSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics ArmConfigurationDiff. + */ +public final class NetworkFabricsArmConfigurationDiffSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ArmConfigurationDiff.json + */ + /** + * Sample code: NetworkFabrics_ArmConfigurationDiff_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkFabricsArmConfigurationDiffMaximumSet( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics().armConfigurationDiff("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/NetworkFabricsCommitBatchStatusSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitBatchStatusSamples.java new file mode 100644 index 000000000000..b4620da09323 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitBatchStatusSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; + +/** + * Samples for NetworkFabrics CommitBatchStatus. + */ +public final class NetworkFabricsCommitBatchStatusSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_CommitBatchStatus.json + */ + /** + * Sample code: NetworkFabrics_CommitBatchStatus_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkFabricsCommitBatchStatusMaximumSet( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .commitBatchStatus("example-rg", "example-fabric", + new CommitBatchStatusRequest().withCommitBatchId("batch-id"), com.azure.core.util.Context.NONE); + } +} 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 index a85fabf6062d..75033a9aacbd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,16 @@ */ public final class NetworkFabricsCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_CommitConfiguration.json */ /** * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().commitConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .commitConfiguration("example-rg", "example-networkFabric", 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 13a31eb12217..69e90d64d528 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 @@ -1,17 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,76 +31,97 @@ */ public final class NetworkFabricsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Create.json */ /** * Sample code: NetworkFabrics_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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", "fakeTokenPlaceholder")) - .withFabricVersion("1.x.x") - .withRackCount(4) - .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") - .withAnnotation("annotation") + .withProperties(new NetworkFabricProperties().withAnnotation("annotation") + .withNetworkFabricSku("M4-A400-A100-C16-aa") + .withFabricVersion("version1") + .withStorageAccountConfiguration(new StorageAccountConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelector() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withNetworkFabricControllerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController") + .withRackCount(4) + .withServerCountPerRack(8) + .withIpv4Prefix("10.18.0.0/19") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .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("40.0.0.14/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 VpnOptionBProperties().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 VpnOptionAProperties().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 VpnOptionBProperties().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 VpnOptionAProperties().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")))) + .withHardwareAlertThreshold(74) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED)) + .withStorageArrayCount(1)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) .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 e148bd096111..5a6ad0bf3124 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Delete.json */ /** * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 f7bfdbc535d3..98524f699d0f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsDeprovisionSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_deprovision_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Deprovision.json */ /** - * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. + * Sample code: NetworkFabrics_Deprovision_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsDeprovisionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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/NetworkFabricsDiscardCommitBatchSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDiscardCommitBatchSamples.java new file mode 100644 index 000000000000..630f57e7c521 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDiscardCommitBatchSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; + +/** + * Samples for NetworkFabrics DiscardCommitBatch. + */ +public final class NetworkFabricsDiscardCommitBatchSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_DiscardCommitBatch.json + */ + /** + * Sample code: NetworkFabrics_DiscardCommitBatch. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkFabricsDiscardCommitBatch(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .discardCommitBatch("example-rg", "example-fabric", + new DiscardCommitBatchRequest().withCommitBatchId("batchId1"), 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 b16bf5b3939b..ac0e4ef8d0d4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Get.json */ /** * Sample code: NetworkFabrics_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .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/NetworkFabricsGetTopologySamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java index b07b6392110b..51cb0e951a0d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsGetTopologySamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_GetTopology_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_GetTopology.json */ /** * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsGetTopologyMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 fddf1c97b592..080b842cc24e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ListByResourceGroup.json */ /** * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 da51d5b7a525..3e0a78610a38 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ListBySubscription.json */ /** * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java new file mode 100644 index 000000000000..022fb96b536b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsLockFabricSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; + +/** + * Samples for NetworkFabrics LockFabric. + */ +public final class NetworkFabricsLockFabricSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_LockFabric.json + */ + /** + * Sample code: NetworkFabrics_LockFabric_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkFabricsLockFabricMaximumSet(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .lockFabric("example-rg", "example-networkFabric", + new NetworkFabricLockRequest().withLockType(NetworkFabricLockType.ADMINISTRATIVE) + .withAction(NetworkFabricLockAction.LOCK), + com.azure.core.util.Context.NONE); + } +} 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 f1040c1c34c7..90705db65423 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsProvisionSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_provision_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Provision.json */ /** - * Sample code: NetworkFabrics_provision_MaximumSet_Gen. + * Sample code: NetworkFabrics_Provision_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsProvisionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsProvisionMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 index be02319168c8..7310cb77616c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkFabricsRefreshConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_RefreshConfiguration.json */ /** - * Sample code: NetworkFabrics_refreshConfiguration_MaximumSet_Gen. + * Sample code: NetworkFabrics_RefreshConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsRefreshConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index b59993065833..9c121d502c10 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class NetworkFabricsUpdateInfraManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_UpdateInfraManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsUpdateInfraManagementBfdConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .updateInfraManagementBfdConfiguration("example-rg", "example-fabric", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 b8db0e9c14a9..737735791fb3 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 @@ -1,18 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; 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.NetworkFabricPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -22,75 +32,93 @@ */ public final class NetworkFabricsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Update.json */ /** * Sample code: NetworkFabrics_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkFabric resource = manager.networkFabrics() .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withRackCount(6) - .withServerCountPerRack(10) - .withIpv4Prefix("10.18.0.0/17") - .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") - .withFabricAsn(12345L) - .withTerminalServerConfiguration( - new NetworkFabricPatchablePropertiesTerminalServerConfiguration().withUsername("username1") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkFabricPatchProperties().withAnnotation("annotation1") + .withRackCount(6) + .withServerCountPerRack(10) + .withIpv4Prefix("10.18.0.0/17") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") + .withFabricASN(12345L) + .withStorageAccountConfiguration(new StorageAccountPatchConfiguration().withStorageAccountId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage") + .withStorageAccountIdentity(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id"))) + .withTerminalServerConfiguration(new TerminalServerPatchConfiguration().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") + .withManagementNetworkConfiguration(new ManagementNetworkPatchConfiguration() + .withInfrastructureVpnConfiguration(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 VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(1501) + .withVlanId(3001) + .withPeerASN(1235L) + .withBfdConfiguration( + new BfdPatchConfiguration().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 VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(1500) + .withVlanId(3000) + .withPeerASN(61234L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .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")))) + .withHardwareAlertThreshold(43) + .withControlPlaneAcls(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) + .withTrustedIpPrefixes(Arrays.asList( + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix")) + .withUniqueRdConfiguration(new UniqueRouteDistinguisherPatchProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.ENABLED) + .withNniDerivedUniqueRdConfigurationState( + NNIDerivedUniqueRouteDistinguisherConfigurationState.ENABLED))) + .withIdentity(new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("key872", new UserAssignedIdentity()))) .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 index 0a0c9812981c..d96785327d77 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration.json */ /** * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .updateWorkloadManagementBfdConfiguration("example-rg", "example-fabric", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 index 1d7cbb976820..353a5a6f4b2c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,17 +12,15 @@ */ public final class NetworkFabricsUpgradeSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_upgrade_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_Upgrade.json */ /** - * Sample code: NetworkFabrics_upgrade_MaximumSet_Gen. + * Sample code: NetworkFabrics_Upgrade_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkFabricsUpgradeMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkFabricsUpgradeMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .upgrade("example-rg", "example-fabric", new UpgradeNetworkFabricProperties().withVersion("3.x.x").withAction(NetworkFabricUpgradeAction.START), 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 index 1ea52e029741..5cbd4be9e1a1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,17 +12,15 @@ */ public final class NetworkFabricsValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ValidateConfiguration.json */ /** * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkFabricsValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkFabrics() .validateConfiguration("example-rg", "example-fabric", new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING), diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java new file mode 100644 index 000000000000..8ac66f41e2a8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsViewDeviceConfigurationSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkFabrics ViewDeviceConfiguration. + */ +public final class NetworkFabricsViewDeviceConfigurationSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkFabrics_ViewDeviceConfiguration.json + */ + /** + * Sample code: NetworkFabrics_ViewDeviceConfiguration_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkFabricsViewDeviceConfigurationMaximumSet( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkFabrics() + .viewDeviceConfiguration("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/NetworkInterfacesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java index 6787c5e5454b..2f1531819e76 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 @@ -1,29 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties; + /** * Samples for NetworkInterfaces Create. */ public final class NetworkInterfacesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Create.json */ /** * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkInterfacesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .define("example-interface") .withExistingNetworkDevice("example-rg", "example-device") - .withAnnotation("annotation") + .withProperties(new NetworkInterfaceProperties().withAnnotation("annotation") + .withDescription("device 1") + .withAdditionalDescription("device 1")) .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 af7130c9f55d..73a9fc5a72ed 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,16 @@ */ public final class NetworkInterfacesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Delete.json */ /** * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces().delete("rgNetworkDevices", "sjzd", "emrgu", com.azure.core.util.Context.NONE); + public static void + networkInterfacesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkInterfaces() + .delete("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/NetworkInterfacesGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java index 8a9e3729eb6e..156d97f8dcd5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkInterfacesGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Get.json */ /** * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkInterfacesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .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/NetworkInterfacesListByNetworkDeviceSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java index 5396b14fdaf2..53c993184022 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkInterfacesListByNetworkDeviceSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_ListByNetworkDevice.json */ /** * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkInterfacesListByNetworkDeviceMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .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 667e70f47e3f..128cb24c313e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class NetworkInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_UpdateAdministrativeState.json */ /** * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkInterfaces() .updateAdministrativeState("example-rg", "example-device", "example-interface", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 8bc9962adcd0..a06e38a78ca9 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 @@ -1,30 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatchProperties; /** * Samples for NetworkInterfaces Update. */ public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkInterfaces_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkInterfaces_Update.json */ /** * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkInterfacesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkInterfacesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkInterface resource = manager.networkInterfaces() .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withAnnotation("annotation").apply(); + resource.update() + .withProperties(new NetworkInterfacePatchProperties().withAnnotation("annotation") + .withDescription("device 1") + .withAdditionalDescription("device 1")) + .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java new file mode 100644 index 000000000000..320259767f50 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkMonitors Create. + */ +public final class NetworkMonitorsCreateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Create.json + */ + /** + * Sample code: NetworkMonitors_Create. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkMonitorsCreate(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors() + .define("example-monitor") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withProperties(new NetworkMonitorProperties().withAnnotation("annotation") + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(62695) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST)))) + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .create(); + } + + // Use "Map.of" if available + @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/NetworkMonitorsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsDeleteSamples.java new file mode 100644 index 000000000000..5b8773e23a52 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors Delete. + */ +public final class NetworkMonitorsDeleteSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Delete.json + */ + /** + * Sample code: NetworkMonitors_Delete_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsDeleteMaximumSet(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors().delete("rgmanagednetworkfabric", "example-monitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..95f4c5a0e3fa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors GetByResourceGroup. + */ +public final class NetworkMonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Get.json + */ + /** + * Sample code: NetworkMonitors_Get_MaximumSet. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsGetMaximumSet(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java new file mode 100644 index 000000000000..31c4e89045ee --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors ListByResourceGroup. + */ +public final class NetworkMonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_ListByResourceGroup.json + */ + /** + * Sample code: NetworkMonitors_ListByResourceGroup. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsListByResourceGroup(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors().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/NetworkMonitorsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListSamples.java new file mode 100644 index 000000000000..5c4a847de554 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** + * Samples for NetworkMonitors List. + */ +public final class NetworkMonitorsListSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_ListBySubscription.json + */ + /** + * Sample code: NetworkMonitors_ListBySubscription. + * + * @param manager Entry point to FilesharesManager. + */ + public static void + networkMonitorsListBySubscription(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java new file mode 100644 index 000000000000..0a3a29ecb73d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateAdministrativeStateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 NetworkMonitors UpdateAdministrativeState. + */ +public final class NetworkMonitorsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_UpdateAdministrativeState.json + */ + /** + * Sample code: NetworkMonitors_UpdateAdministrativeState. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkMonitorsUpdateAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkMonitors() + .updateAdministrativeState("example-rg", "example-monitor", + 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/NetworkMonitorsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateSamples.java new file mode 100644 index 000000000000..de53c1c6ce54 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsUpdateSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkMonitors Update. + */ +public final class NetworkMonitorsUpdateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkMonitors_Update.json + */ + /** + * Sample code: NetworkMonitors_Update. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkMonitorsUpdate(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + NetworkMonitor resource = manager.networkMonitors() + .getByResourceGroupWithResponse("example-rg", "example-monitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key", "fakeTokenPlaceholder")) + .withProperties(new NetworkMonitorPatchProperties().withBmpConfiguration( + new BmpConfigurationPatchProperties().withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withStationName("name") + .withStationIp("10.0.0.1") + .withStationPort(64685) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(49) + .withProbeInterval(3558) + .withProbeCount(43)) + .withStationNetwork( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork") + .withMonitoredNetworks(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST)))) + .apply(); + } + + // Use "Map.of" if available + @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/NetworkPacketBrokersCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java index d2ba6ab1bcd5..af13ef3ca48d 100644 --- 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; import java.util.HashMap; import java.util.Map; @@ -12,24 +13,22 @@ */ public final class NetworkPacketBrokersCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Create.json */ /** * Sample code: NetworkPacketBrokers_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) + .withProperties(new NetworkPacketBrokerProperties().withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } 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 index 3785ba1d19f5..332007ad02a2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkPacketBrokersDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Delete.json */ /** * Sample code: NetworkPacketBrokers_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index e0ac80522777..34198b833729 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkPacketBrokersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Get.json */ /** * Sample code: NetworkPacketBrokers_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkPacketBrokersGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkPacketBrokersGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index f25e96a233d0..9fa114e23ac3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkPacketBrokersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_ListByResourceGroup.json */ /** * Sample code: NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 21508bbf8eb5..3dfd9afc082d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkPacketBrokersListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_ListBySubscription.json */ /** * Sample code: NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 8160e32d088c..76d9f89a0e80 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,22 +13,20 @@ */ public final class NetworkPacketBrokersUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkPacketBrokers_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkPacketBrokers_Update.json */ /** * Sample code: NetworkPacketBrokers_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkPacketBrokersUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkPacketBroker resource = manager.networkPacketBrokers() .getByResourceGroupWithResponse("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key8772", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("keyId", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available 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 7db1345331b9..320669521d91 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.util.HashMap; import java.util.Map; @@ -13,26 +14,24 @@ */ public final class NetworkRacksCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Create.json */ /** * Sample code: NetworkRacks_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.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", "fakeTokenPlaceholder")) - .withNetworkRackType(NetworkRackType.AGGREGATE) - .withAnnotation("annotation") + .withProperties(new NetworkRackProperties().withAnnotation("annotation") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric")) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .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 4231ccaa432e..b6400accb363 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkRacksDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Delete.json */ /** * Sample code: NetworkRacks_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 3106588c3507..6254e86ccd8c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkRacksGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Get.json */ /** * Sample code: NetworkRacks_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkRacks() .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 2059eb1be621..daa413eb7362 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkRacksListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_ListByResourceGroup.json */ /** * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkRacksListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 cdd3763e0b0d..59e549fd14ca 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkRacksListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_ListBySubscription.json */ /** * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkRacksListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkRacks().list(com.azure.core.util.Context.NONE); } } 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 a8dda16a49d8..68730cb7c5c6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,21 +13,19 @@ */ public final class NetworkRacksUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkRacks_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkRacks_Update.json */ /** * Sample code: NetworkRacks_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkRacksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkRacksUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkRack resource = manager.networkRacks() .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("keyID", "fakeTokenPlaceholder")).apply(); + resource.update().withTags(mapOf("keyId", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available 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 index 1642b5c39835..2d7e83d8369c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,13 +8,15 @@ 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.GlobalNetworkTapRuleActionProperties; +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.NetworkTapRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; @@ -33,62 +35,61 @@ */ public final class NetworkTapRulesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Create.json */ /** * Sample code: NetworkTapRules_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules() .define("example-tapRule") - .withRegion("eastus") + .withRegion("eastuseuap") .withExistingResourceGroup("example-rg") - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .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") + .withProperties( + new NetworkTapRuleProperties().withAnnotation("annotation") + .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("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"))) + .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-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")))))) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.THIRTY) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name"))) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } 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 index fd551e17d49b..a276a67c2d01 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapRulesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Delete.json */ /** * Sample code: NetworkTapRules_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 9d21557af7f0..5da14c8ef718 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapRulesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Get.json */ /** * Sample code: NetworkTapRules_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 975ea41bb681..7e1e12705049 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapRulesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_ListByResourceGroup.json */ /** * Sample code: NetworkTapRules_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/NetworkTapRulesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java index 4db834652624..654f29125d7f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapRulesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_ListBySubscription.json */ /** * Sample code: NetworkTapRules_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 index ddf0db199b3f..9d881f676e5f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapRulesResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Resync.json */ /** * Sample code: NetworkTapRules_Resync_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesResyncMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesResyncMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 56d6c8990a65..45993a7480d4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class NetworkTapRulesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_UpdateAdministrativeState.json */ /** * Sample code: NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTapRules() .updateAdministrativeState("example-rg", "example-tapRule", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 index be9587005223..3da3576d4cfe 100644 --- 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 @@ -1,29 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.CommonDynamicMatchConfigurationPatch; 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.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; 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.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -33,59 +35,59 @@ */ public final class NetworkTapRulesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_Update.json */ /** * Sample code: NetworkTapRules_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapRulesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapRulesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkTapRule resource = manager.networkTapRules() .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("https://microsoft.com/amdsdx") - .withMatchConfigurations( - Arrays - .asList(new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("config1") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkTapRulePatchProperties().withAnnotation("annotation") + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("https://microsoft.com/amdsdx") + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("truncate-name")) + .withMatchConfigurations( + Arrays.asList(new NetworkTapRuleMatchConfigurationPatch().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) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays + .asList(new NetworkTapRuleMatchConditionPatch().withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("100")) + .withPortGroupNames(Arrays.asList("example-portGroup1"))))) + .withActions(Arrays.asList(new NetworkTapRuleActionPatch().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")))))) - .withAnnotation("annotation") + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("example-ipGroup") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("example-vlanGroup").withVlans(Arrays.asList("20-30")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("example-portGroup") + .withPorts(Arrays.asList("100-200"))))))) .apply(); } 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 index 3032abf6fafd..d112e07e4d62 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapRulesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTapRules_ValidateConfiguration.json */ /** * Sample code: NetworkTapRules_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapRulesValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 8a7cddad039b..11f69b7be0db 100644 --- 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 @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; 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.NetworkTapProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import java.util.HashMap; @@ -18,36 +19,33 @@ */ public final class NetworkTapsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Create.json */ /** * Sample code: NetworkTaps_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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", "fakeTokenPlaceholder")) - .withPollingType(PollingType.PULL) - .withAnnotation("annotation") + .withProperties(new NetworkTapProperties().withAnnotation("annotation") + .withNetworkPacketBrokerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker") + .withDestinations(Arrays.asList(new DestinationProperties().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"))) + .withPollingType(PollingType.PULL)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .create(); } 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 index b953438844fb..f0639633fa64 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Delete.json */ /** * Sample code: NetworkTaps_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index 4f4e5bc927fe..b279bd2f103d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Get.json */ /** * Sample code: NetworkTaps_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/NetworkTapsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java index 9e4708b1a7c3..bfe030cab7bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_ListByResourceGroup.json */ /** * Sample code: NetworkTaps_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 index d8023cfef2b6..6c82f8570ad9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_ListBySubscription.json */ /** * Sample code: NetworkTaps_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapsListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index ebc36166c0f3..f66db97ed057 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class NetworkTapsResyncSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Resync_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Resync.json */ /** * Sample code: NetworkTaps_Resync_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsResyncMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsResyncMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 index f1809f8ff02e..5876d05e7e18 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class NetworkTapsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_UpdateAdministrativeState.json */ /** * Sample code: NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkTapsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkTaps() .updateAdministrativeState("example-rg", "example-networkTap", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 index 0e5669be2ff6..f3689d9fd69c 100644 --- 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 @@ -1,14 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; 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.IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import java.util.HashMap; @@ -19,34 +20,32 @@ */ public final class NetworkTapsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkTaps_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkTaps_Update.json */ /** * Sample code: NetworkTaps_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void networkTapsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + networkTapsUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkTap resource = manager.networkTaps() .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("key6024", "fakeTokenPlaceholder")) - .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") + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new NetworkTapPatchProperties().withAnnotation("annotation1") + .withPollingType(PollingType.PULL) + .withDestinations(Arrays.asList(new DestinationPatchProperties().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 IsolationDomainPatchProperties() + .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")))) .apply(); } 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 b7d857549253..8783a0c79840 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 @@ -1,18 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; 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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; 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.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; @@ -21,51 +28,63 @@ */ public final class NetworkToNetworkInterconnectsCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Create.json */ /** * Sample code: NetworkToNetworkInterconnects_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() .define("example-nni") - .withExistingNetworkFabric("example-rg", "example-fabric") - .withUseOptionB(BooleanEnumProperty.TRUE) - .withNniType(NniType.CE) - .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") + .withExistingNetworkFabric("example-rg", "example-nf") + .withProperties(new NetworkToNetworkInterconnectProperties().withNniType(NniType.CE) + .withIsManagementType(IsManagementType.TRUE) + .withUseOptionB(BooleanEnumProperty.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 OptionBLayer3Configuration().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) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(24)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jffgck").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("2fff::/64").withNextHop(Arrays.asList("3ffe::1"))))) + .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") + .withMicroBfdState(MicroBfdState.ENABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("10.0.0.1/24").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("fe08:00/64").withNextHop(Arrays.asList("fe01::1")))))) .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 9551faa9bcc8..14d449881b35 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class NetworkToNetworkInterconnectsDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Delete.json */ /** * Sample code: NetworkToNetworkInterconnects_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .delete("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-nf", "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 b6fea62cfbd9..a56f3b327c39 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class NetworkToNetworkInterconnectsGetSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Get.json */ /** * Sample code: NetworkToNetworkInterconnects_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-nf", "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 index bdf1a07e1c1a..a5e947360ff3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,18 +9,16 @@ */ public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_ListByNetworkFabric.json */ /** * Sample code: NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsListByNetworkFabricMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .listByNetworkFabric("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + .listByNetworkFabric("example-rg", "example-nf", 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 index 718370c648d0..20ce13e5f8b9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,17 @@ */ public final class NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_UpdateAdministrativeState.json */ /** - * Sample code: NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.networkToNetworkInterconnects() - .updateAdministrativeState("example-rg", "example-fabric", "example-nni", + .updateAdministrativeState("example-rg", "example-nf", "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/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java new file mode 100644 index 000000000000..8eee639f2377 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; + +/** + * Samples for NetworkToNetworkInterconnects UpdateBfdAdministrativeState. + */ +public final class NetworkToNetworkInterconnectsUpdateBfdAdministrativeStateSamples { + /* + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_UpdateBfdAdministrativeState.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_UpdateBfdAdministrativeState. + * + * @param manager Entry point to FilesharesManager. + */ + public static void networkToNetworkInterconnectsUpdateBfdAdministrativeState( + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { + manager.networkToNetworkInterconnects() + .updateBfdAdministrativeState("example-rg", "example-nf", "example-nni", + new NniBfdAdministrativeStateRequest().withRouteType(RouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.fromString("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 deleted file mode 100644 index bcfb5615a827..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.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.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 index 9559ee0df73b..00b04eaf4453 100644 --- 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 @@ -1,17 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; 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 com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; import java.util.Arrays; /** @@ -19,48 +25,62 @@ */ public final class NetworkToNetworkInterconnectsUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/NetworkToNetworkInterconnects_Update.json */ /** * Sample code: NetworkToNetworkInterconnects_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void networkToNetworkInterconnectsUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { NetworkToNetworkInterconnect resource = manager.networkToNetworkInterconnects() - .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-nf", "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") + .withProperties(new NetworkToNetworkInterconnectPatchProperties() + .withLayer2Configuration(new Layer2ConfigurationPatch().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 OptionBLayer3ConfigurationPatchProperties().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) + .withPeLoopbackIpAddress(Arrays.asList("10.0.0.1")) + .withBmpConfiguration( + new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("10.0.0.1/24") + .withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("fe80::/64") + .withNextHop(Arrays.asList("fe80::1"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("10.0.0.1").withNextHop(Arrays.asList("10.0.0.1")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("2fff::/64") + .withNextHop(Arrays.asList("3ffe::1"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().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 ExportRoutePolicyInformationPatch().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") + .withMicroBfdState(MicroBfdState.ENABLED)) .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 c4652ca4247d..5f854defc011 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * ListOperations.json + * x-ms-original-file: 2024-06-15-preview/Operations_List.json */ /** - * Sample code: ListOperations. + * Sample code: Operations_List_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void - listOperations(com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + operationsListMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } 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 index 59534e7bf1d7..466f9561ecf2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class RoutePoliciesCommitConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_CommitConfiguration.json */ /** * Sample code: RoutePolicies_CommitConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesCommitConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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 5eb1f7c14e86..ae38a9ccbcf4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,6 +12,7 @@ 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.RoutePolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -24,52 +25,50 @@ */ public final class RoutePoliciesCreateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Create_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Create.json */ /** * Sample code: RoutePolicies_Create_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesCreateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .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", "fakeTokenPlaceholder")) - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) - .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"))))))) - .withAnnotation("annotation") + .withProperties(new RoutePolicyProperties().withAnnotation("annotation") + .withDefaultAction(CommunityActionTypes.PERMIT) + .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")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) + .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"))))))) + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withAddressFamilyType(AddressFamilyType.IPV4)) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) .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 3ed69047ceb5..a782a0f8ed52 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class RoutePoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Delete.json */ /** * Sample code: RoutePolicies_Delete_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesDeleteMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesDeleteMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 24d507674960..2fa4d6fbab8b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class RoutePoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Get_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Get.json */ /** * Sample code: RoutePolicies_Get_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesGetMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .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 edcaf7804f43..fdd30805b25f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class RoutePoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_ListByResourceGroup.json */ /** * Sample code: RoutePolicies_ListByResourceGroup_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { 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 41a9857df106..a51e920f440f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class RoutePoliciesListSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_ListBySubscription.json */ /** * Sample code: RoutePolicies_ListBySubscription_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesListBySubscriptionMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies().list(com.azure.core.util.Context.NONE); } } 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 index e3c6d1bcaba6..16ab170763e8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,17 +13,15 @@ */ public final class RoutePoliciesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_UpdateAdministrativeState.json */ /** * Sample code: RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesUpdateAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { manager.routePolicies() .updateAdministrativeState("example-rg", "example-routePolicy", new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), 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 74d20118d22e..a4b5e9b69410 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 @@ -1,20 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; 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.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 com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -24,48 +25,46 @@ */ public final class RoutePoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_Update_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_Update.json */ /** * Sample code: RoutePolicies_Update_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ - public static void routePoliciesUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + public static void + routePoliciesUpdateMaximumSetGen(com.azure.resourcemanager.managednetworkfabric.FilesharesManager manager) { RoutePolicy resource = manager.routePolicies() .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("keyID", "fakeTokenPlaceholder")) - .withDefaultAction(CommunityActionTypes.DENY) - .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"))))))) + .withTags(mapOf("keyId", "fakeTokenPlaceholder")) + .withProperties(new RoutePolicyPatchableProperties().withDefaultAction(CommunityActionTypes.PERMIT) + .withStatements(Arrays.asList(new RoutePolicyStatementPatchProperties().withAnnotation("annotation") + .withSequenceNumber(7L) + .withCondition(new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withIpExtendedCommunityIds(Arrays.asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")) + .withAction(new StatementActionPatchProperties().withLocalPreference(20L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .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 ActionIpExtendedCommunityPatchProperties() + .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(); } 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 index 3a64d746266e..67f6094f3690 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -9,17 +9,15 @@ */ public final class RoutePoliciesValidateConfigurationSamples { /* - * x-ms-original-file: - * specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ - * RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + * x-ms-original-file: 2024-06-15-preview/RoutePolicies_ValidateConfiguration.json */ /** * Sample code: RoutePolicies_ValidateConfiguration_MaximumSet_Gen. * - * @param manager Entry point to ManagedNetworkFabricManager. + * @param manager Entry point to FilesharesManager. */ public static void routePoliciesValidateConfigurationMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + com.azure.resourcemanager.managednetworkfabric.FilesharesManager 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/AccessControlListActionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionPatchTests.java new file mode 100644 index 000000000000..48799fe815d1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionPatchTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListActionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListActionPatch model = BinaryData.fromString( + "{\"type\":\"Remark\",\"counterName\":\"wcwvmzeg\",\"remarkComment\":\"nfhjirwgdnqzbr\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":1905851375604005674,\"unit\":\"Gbps\"},\"burstSize\":{\"size\":3410692730838249484,\"unit\":\"GBytes\"}}}") + .toObject(AccessControlListActionPatch.class); + Assertions.assertEquals(AclActionType.REMARK, model.type()); + Assertions.assertEquals("wcwvmzeg", model.counterName()); + Assertions.assertEquals("nfhjirwgdnqzbr", model.remarkComment()); + Assertions.assertEquals(1905851375604005674L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.GBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(3410692730838249484L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, model.policeRateConfiguration().burstSize().unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListActionPatch model = new AccessControlListActionPatch().withType(AclActionType.REMARK) + .withCounterName("wcwvmzeg") + .withRemarkComment("nfhjirwgdnqzbr") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(1905851375604005674L).withUnit(BitRateUnit.GBPS)) + .withBurstSize(new BurstSize().withSize(3410692730838249484L).withUnit(BurstSizeUnit.GBYTES))); + model = BinaryData.fromObject(model).toObject(AccessControlListActionPatch.class); + Assertions.assertEquals(AclActionType.REMARK, model.type()); + Assertions.assertEquals("wcwvmzeg", model.counterName()); + Assertions.assertEquals("nfhjirwgdnqzbr", model.remarkComment()); + Assertions.assertEquals(1905851375604005674L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.GBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(3410692730838249484L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, model.policeRateConfiguration().burstSize().unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java index af3e767dbc09..62f6792a61b5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListActionTests.java @@ -1,29 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import org.junit.jupiter.api.Assertions; public final class AccessControlListActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AccessControlListAction model = BinaryData.fromString("{\"type\":\"Log\",\"counterName\":\"ulapzwyrp\"}") + AccessControlListAction model = BinaryData.fromString( + "{\"type\":\"Remark\",\"counterName\":\"jfnynszqujizdvoq\",\"remarkComment\":\"ibyowbblgyavutp\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":2328988660653720038,\"unit\":\"Kbps\"},\"burstSize\":{\"size\":3662268656068136217,\"unit\":\"Bytes\"}}}") .toObject(AccessControlListAction.class); - Assertions.assertEquals(AclActionType.LOG, model.type()); - Assertions.assertEquals("ulapzwyrp", model.counterName()); + Assertions.assertEquals(AclActionType.REMARK, model.type()); + Assertions.assertEquals("jfnynszqujizdvoq", model.counterName()); + Assertions.assertEquals("ibyowbblgyavutp", model.remarkComment()); + Assertions.assertEquals(2328988660653720038L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.KBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(3662268656068136217L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.BYTES, model.policeRateConfiguration().burstSize().unit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListAction model - = new AccessControlListAction().withType(AclActionType.LOG).withCounterName("ulapzwyrp"); + AccessControlListAction model = new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("jfnynszqujizdvoq") + .withRemarkComment("ibyowbblgyavutp") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(2328988660653720038L).withUnit(BitRateUnit.KBPS)) + .withBurstSize(new BurstSize().withSize(3662268656068136217L).withUnit(BurstSizeUnit.BYTES))); model = BinaryData.fromObject(model).toObject(AccessControlListAction.class); - Assertions.assertEquals(AclActionType.LOG, model.type()); - Assertions.assertEquals("ulapzwyrp", model.counterName()); + Assertions.assertEquals(AclActionType.REMARK, model.type()); + Assertions.assertEquals("jfnynszqujizdvoq", model.counterName()); + Assertions.assertEquals("ibyowbblgyavutp", model.remarkComment()); + Assertions.assertEquals(2328988660653720038L, model.policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.KBPS, model.policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(3662268656068136217L, model.policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.BYTES, model.policeRateConfiguration().burstSize().unit()); } } 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 index 479ee9f54c31..8c16f083e384 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,14 +10,21 @@ 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.AccessControlListProperties; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; 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.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; @@ -30,228 +37,280 @@ public final class AccessControlListInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListInner model = BinaryData.fromString( - "{\"properties\":{\"lastSyncedTime\":\"2021-03-24T17:54:20Z\",\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"configurationType\":\"Inline\",\"aclsUrl\":\"bczmeh\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"sphrupidgs\",\"sequenceNumber\":5720978843418888179,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"cmsxaobhdxbm\"],\"fragments\":[\"oqjzehtbmufpowno\"],\"ipLengths\":[\"wlrxyb\",\"soqijg\"],\"ttlValues\":[\"bpazlobcufpdzn\",\"btcqq\",\"nq\",\"lhqgnufooojy\"],\"dscpMarkings\":[\"sqe\",\"aagdfmg\",\"zlhjxrifkwmrvkt\",\"izntocipao\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"qucmpo\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"ogknygjofjdd\",\"qs\",\"deupewnwrei\",\"jzyflu\"],\"fragments\":[\"hmofc\"],\"ipLengths\":[\"my\"],\"ttlValues\":[\"dtmlxhekuksjt\",\"ukcdmparcryuanzw\",\"xzdxtayrlhmwh\"],\"dscpMarkings\":[\"rqobmtuk\",\"nryrtihf\",\"tijbpzvgnwzsymgl\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"zk\",\"hdbihan\",\"fhfcb\",\"y\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"hab\"}]},{\"matchConfigurationName\":\"pikxwczbyscnpqxu\",\"sequenceNumber\":3437469293095173263,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"br\"],\"fragments\":[\"dumjgrtfwvuk\"],\"ipLengths\":[\"udccsnhsjc\",\"yejhk\",\"yhtnapczwlokjye\"],\"ttlValues\":[\"vnipjox\",\"jnchgej\",\"podmailzydehojwy\"],\"dscpMarkings\":[\"xinpmqnjaq\",\"ixjsprozvcputeg\",\"vwmf\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"mdvpjhulsu\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"rwfndiod\"},{\"type\":\"Log\",\"counterName\":\"w\"},{\"type\":\"Drop\",\"counterName\":\"vwryoqpso\"}]},{\"matchConfigurationName\":\"ctazakljlahbcryf\",\"sequenceNumber\":5965878792837381583,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"paojakhmsbzjh\",\"rzevdphlxaol\",\"hqtrgqjbpf\"],\"fragments\":[\"inzgvfcj\"],\"ipLengths\":[\"oxxjtfelluwf\",\"it\"],\"ttlValues\":[\"eqfpj\",\"jlxofpdvhpfxxyp\",\"ninmayhuyb\"],\"dscpMarkings\":[\"odepoogin\",\"vamih\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"rxzxtheo\",\"usivye\",\"cciqihnhungbwjz\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"xgispemvtzfkufu\"],\"fragments\":[\"ofx\",\"eofjaeqjh\"],\"ipLengths\":[\"asvm\"],\"ttlValues\":[\"qulngsntnbybkzgc\"],\"dscpMarkings\":[\"clxxwrljdo\",\"skcqvkocrcjd\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"xbnjbiksq\",\"gls\",\"ainqpjwnzlljfm\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"vmgxsab\",\"yqduujit\",\"jczdzevndh\",\"rwpdappdsbdkvwrw\"],\"fragments\":[\"usnhutje\",\"tmrldhugjzzdatq\"],\"ipLengths\":[\"cdgea\"],\"ttlValues\":[\"phut\",\"cndvkaozwyiftyhx\",\"urokft\"],\"dscpMarkings\":[\"lniwpwcukjfkgiaw\",\"klryplwck\",\"asy\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"hsgcbacphejkot\",\"nqgoulzndli\"],\"vlanMatchCondition\":{},\"ipCondition\":{}},{\"etherTypes\":[\"gfgibm\"],\"fragments\":[\"akeqs\",\"xybz\"],\"ipLengths\":[\"dqytbciqfouflmm\"],\"ttlValues\":[\"smodmgloug\"],\"dscpMarkings\":[\"wtmutduq\",\"ta\",\"spwgcuertumkdosv\",\"whbmd\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"ddgmb\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"tq\"},{\"type\":\"Count\",\"counterName\":\"fpfpsalgbquxigj\"},{\"type\":\"Log\",\"counterName\":\"jaoyfhrtx\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ujysvle\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"awrlyx\",\"jkcpr\",\"nwbxgjvtbvpyssz\"]},{\"name\":\"rujqg\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"uqfprwzw\",\"nguitnwuizgazxu\"]}],\"vlanGroups\":[{\"name\":\"ckyfih\",\"vlans\":[\"dfvzwdzuhty\"]},{\"name\":\"isdkfthwxmnteiw\",\"vlans\":[\"vkmijcmmxdcuf\",\"fsrpymzidnse\",\"cxtbzsg\",\"yc\"]}],\"portGroups\":[{\"name\":\"wmdwzjeiachboo\",\"ports\":[\"nrosfqpte\",\"hzzvypyq\"]},{\"name\":\"mzinpvswjdk\",\"ports\":[\"oodqxhcrm\",\"ohjtckw\",\"dsoifiyipj\",\"sqwpgrjb\"]},{\"name\":\"orcjxvsnby\",\"ports\":[\"bnmo\",\"pcyshu\",\"zafb\"]},{\"name\":\"j\",\"ports\":[\"toqcjmklja\",\"bqidtqaj\",\"yulpkudjkr\",\"khbzhfepgzg\"]}]}],\"annotation\":\"xzlocxscp\"},\"location\":\"erhhbcsglumm\",\"tags\":{\"odxobnbdxkqpxok\":\"j\",\"odgmaajrmvdjwz\":\"jionpimexgstxgc\",\"ctbzaq\":\"lovmclwhijcoe\"},\"id\":\"qsycbkbfkgu\",\"name\":\"dkexxppofm\",\"type\":\"axcfjpgddtocjjx\"}") + "{\"properties\":{\"annotation\":\"ijbpzvgnwzsymgl\",\"configurationType\":\"File\",\"aclsUrl\":\"cyzkohdbihanuf\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"s\",\"sequenceNumber\":4240171364940315752,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"ifpikxwczby\",\"cnpqxuhivyqniwby\",\"rkxvdum\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"etherTypes\":[\"wvukx\",\"audccsnhs\"],\"fragments\":[\"yejhk\",\"yhtnapczwlokjye\",\"kkvnipjox\",\"jnchgej\"],\"ipLengths\":[\"dmailzydehojw\",\"ahuxinpm\",\"njaqwixjspro\"],\"ttlValues\":[\"putegjvwmfd\",\"t\",\"cmdv\",\"jhulsuuvmkjo\"],\"dscpMarkings\":[\"wfndiodjpsl\",\"ej\"],\"protocolNeighbors\":[\"wryoqpsoacc\",\"azakl\",\"lahbcryff\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"icmpConfiguration\":{}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"paojakhmsbzjh\",\"remarkComment\":\"zevdphlx\",\"policeRateConfiguration\":{}},{\"type\":\"Log\",\"counterName\":\"qtrgqjbpfzfsinzg\",\"remarkComment\":\"cjrwzoxxjtfellu\",\"policeRateConfiguration\":{}},{\"type\":\"Remark\",\"counterName\":\"onpeqfpjkjlxofp\",\"remarkComment\":\"hpf\",\"policeRateConfiguration\":{}},{\"type\":\"Remark\",\"counterName\":\"ninmayhuyb\",\"remarkComment\":\"podepoo\",\"policeRateConfiguration\":{}}]},{\"matchConfigurationName\":\"uvamiheognarxzxt\",\"sequenceNumber\":955954291018869840,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"v\",\"ciqihnhung\",\"wjzrnfygxgisp\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"etherTypes\":[\"fkufublj\",\"fxqeof\",\"aeqjhqjbasvms\"],\"fragments\":[\"ulngsntn\",\"ybkzgcwr\",\"clxxwrljdo\",\"skcqvkocrcjd\"],\"ipLengths\":[\"nh\",\"bnjbiksqrglssain\"],\"ttlValues\":[\"wnzlljfmppeeb\",\"mgxsab\",\"yqduujit\"],\"dscpMarkings\":[\"zdzevndh\",\"rwpdappdsbdkvwrw\"],\"protocolNeighbors\":[\"usnhutje\",\"tmrldhugjzzdatq\"],\"portCondition\":{\"layer4Protocol\":\"SCTP\"},\"icmpConfiguration\":{}},{\"protocolTypes\":[\"eablg\",\"huticndvkao\",\"wyiftyhxhur\",\"k\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"etherTypes\":[\"lniwpwcukjfkgiaw\",\"klryplwck\",\"asy\"],\"fragments\":[\"ddhsgcbacphe\",\"koty\",\"qgoulznd\"],\"ipLengths\":[\"wyqkgfgibm\"],\"ttlValues\":[\"akeqs\",\"xybz\"],\"dscpMarkings\":[\"dqytbciqfouflmm\"],\"protocolNeighbors\":[\"smodmgloug\"],\"portCondition\":{\"layer4Protocol\":\"SCTP\"},\"icmpConfiguration\":{}},{\"protocolTypes\":[\"utduqktapspwgcu\",\"rtumkdosvq\",\"hbmdgbbjfdd\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"etherTypes\":[\"ex\",\"pbhtqqrolfpfpsa\"],\"fragments\":[\"qux\",\"gjyjgzjaoyfhrtxi\"],\"ipLengths\":[\"rkujy\",\"vlejuvfqa\"],\"ttlValues\":[\"yxwjkcp\",\"bnwbxgjvtbvpyssz\",\"nruj\",\"guhmuouqfpr\"],\"dscpMarkings\":[\"bngui\",\"nwui\",\"gazxuf\"],\"protocolNeighbors\":[\"ckyfih\",\"fidfvzw\"],\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"icmpConfiguration\":{}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"sdkf\",\"remarkComment\":\"wxmnteiwao\",\"policeRateConfiguration\":{}},{\"type\":\"Drop\",\"counterName\":\"jcmmxdcufufsrp\",\"remarkComment\":\"zidnsezcxtbzsgfy\",\"policeRateConfiguration\":{}},{\"type\":\"Remark\",\"counterName\":\"wmdwzjeiachboo\",\"remarkComment\":\"lnrosfqp\",\"policeRateConfiguration\":{}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ypyqrimzinp\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"kirsoodqxhc\",\"mnoh\",\"t\",\"kwh\"]},{\"name\":\"oifiyipjxsqwpgr\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rcjxvsnbyxqabn\",\"ocpcy\",\"hurzafblj\"]},{\"name\":\"pbtoqcjmkl\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"idtqajzyu\",\"pku\",\"jkrlkhbzhfepg\"]},{\"name\":\"qex\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"scpai\",\"rhhbcs\",\"l\"]}],\"vlanGroups\":[{\"name\":\"jtjaodxobnbdxkq\",\"vlans\":[\"kajionpim\"]},{\"name\":\"gstxgcp\",\"vlans\":[\"maajrmvdjwzrlo\",\"mcl\"]}],\"portGroups\":[{\"name\":\"coejctbzaqs\",\"ports\":[\"cbkbfkg\"]},{\"name\":\"dkexxppofm\",\"ports\":[\"c\"]},{\"name\":\"pg\",\"ports\":[\"ocjjxhvpmouexh\"]}]},{\"ipGroups\":[{\"name\":\"bqe\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"bzv\",\"dntwndeicbtw\",\"pzaoqvuhr\"]},{\"name\":\"f\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"glmjth\",\"qkwpyeicxmqc\",\"wqvhkhixuigdt\"]},{\"name\":\"bob\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"e\"]}],\"vlanGroups\":[{\"name\":\"a\",\"vlans\":[\"z\",\"yvvtpgvdfgio\"]}],\"portGroups\":[{\"name\":\"utqxlngx\",\"ports\":[\"gug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"]},{\"name\":\"h\",\"ports\":[\"bowsk\",\"nyktzlcuiy\",\"gqywgndrv\"]},{\"name\":\"hzgpphrcgyncocpe\",\"ports\":[\"m\",\"coofsxlzev\"]},{\"name\":\"m\",\"ports\":[\"abcypmivk\",\"lzu\"]}]}],\"lastSyncedTime\":\"2021-05-22T10:28:24Z\",\"aclType\":\"ControlPlaneTrafficPolicy\",\"deviceRole\":\"CE\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"ionle\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"location\":\"xdpnqbqq\",\"tags\":{\"snjampmng\":\"jfeallnwsub\",\"chcbonqvpkvlrxnj\":\"zscxaqwo\",\"pheoflokeyy\":\"ase\",\"jp\":\"enjbdlwtgrhp\"},\"id\":\"umasxazjpq\",\"name\":\"e\",\"type\":\"ualhbxxhejj\"}") .toObject(AccessControlListInner.class); - Assertions.assertEquals("erhhbcsglumm", model.location()); - Assertions.assertEquals("j", model.tags().get("odxobnbdxkqpxok")); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("bczmeh", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("sphrupidgs", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(5720978843418888179L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("qucmpo", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("cmsxaobhdxbm", - model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("oqjzehtbmufpowno", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("wlrxyb", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("bpazlobcufpdzn", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("sqe", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("xdpnqbqq", model.location()); + Assertions.assertEquals("jfeallnwsub", model.tags().get("snjampmng")); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.properties().configurationType()); + Assertions.assertEquals("cyzkohdbihanuf", model.properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().defaultAction()); + Assertions.assertEquals("s", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4240171364940315752L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("ifpikxwczby", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("wvukx", + model.properties().matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("yejhk", + model.properties().matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("dmailzydehojw", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("putegjvwmfd", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("wfndiodjpsl", + model.properties().matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("wryoqpsoacc", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.COUNT, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("hab", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ujysvle", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("awrlyx", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ckyfih", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dfvzwdzuhty", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wmdwzjeiachboo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nrosfqpte", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("xzlocxscp", model.annotation()); + model.properties().matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals(AclActionType.COUNT, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("paojakhmsbzjh", + model.properties().matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("zevdphlx", + model.properties().matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("ypyqrimzinp", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("kirsoodqxhc", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("jtjaodxobnbdxkq", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("kajionpim", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("coejctbzaqs", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("cbkbfkg", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.CP, model.properties().aclType()); + Assertions.assertEquals(DeviceRole.CE, model.properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().globalAccessControlListActions().enableCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessControlListInner model - = new AccessControlListInner().withLocation("erhhbcsglumm") - .withTags(mapOf("odxobnbdxkqpxok", "j", "odgmaajrmvdjwz", "jionpimexgstxgc", "ctbzaq", "lovmclwhijcoe")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("bczmeh") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations( - Arrays - .asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("sphrupidgs") - .withSequenceNumber(5720978843418888179L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("qucmpo")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("cmsxaobhdxbm")) - .withFragments(Arrays.asList("oqjzehtbmufpowno")) - .withIpLengths(Arrays.asList("wlrxyb", "soqijg")) - .withTtlValues(Arrays.asList("bpazlobcufpdzn", "btcqq", "nq", "lhqgnufooojy")) - .withDscpMarkings( - Arrays.asList("sqe", "aagdfmg", "zlhjxrifkwmrvkt", "izntocipao")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("zk", "hdbihan", "fhfcb", "y")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("ogknygjofjdd", "qs", "deupewnwrei", "jzyflu")) - .withFragments(Arrays.asList("hmofc")) - .withIpLengths(Arrays.asList("my")) - .withTtlValues( - Arrays.asList("dtmlxhekuksjt", "ukcdmparcryuanzw", "xzdxtayrlhmwh")) - .withDscpMarkings(Arrays.asList("rqobmtuk", "nryrtihf", "tijbpzvgnwzsymgl")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions( - Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("hab"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("pikxwczbyscnpqxu") - .withSequenceNumber(3437469293095173263L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("mdvpjhulsu")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("br")) - .withFragments(Arrays.asList("dumjgrtfwvuk")) - .withIpLengths(Arrays.asList("udccsnhsjc", "yejhk", "yhtnapczwlokjye")) - .withTtlValues(Arrays.asList("vnipjox", "jnchgej", "podmailzydehojwy")) - .withDscpMarkings(Arrays.asList("xinpmqnjaq", "ixjsprozvcputeg", "vwmf")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)))) - .withActions( + = new AccessControlListInner().withLocation("xdpnqbqq") + .withTags(mapOf("snjampmng", "jfeallnwsub", "chcbonqvpkvlrxnj", "zscxaqwo", "pheoflokeyy", + "fakeTokenPlaceholder", "jp", "enjbdlwtgrhp")) + .withProperties( + new AccessControlListProperties().withAnnotation("ijbpzvgnwzsymgl") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("cyzkohdbihanuf") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withMatchConfigurations( + Arrays + .asList( + new AccessControlListMatchConfiguration().withMatchConfigurationName("s") + .withSequenceNumber(4240171364940315752L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes( + Arrays.asList("ifpikxwczby", "cnpqxuhivyqniwby", "rkxvdum")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes(Arrays.asList("wvukx", "audccsnhs")) + .withFragments(Arrays.asList("yejhk", "yhtnapczwlokjye", "kkvnipjox", + "jnchgej")) + .withIpLengths(Arrays.asList("dmailzydehojw", "ahuxinpm", "njaqwixjspro")) + .withTtlValues(Arrays.asList("putegjvwmfd", "t", "cmdv", "jhulsuuvmkjo")) + .withDscpMarkings(Arrays.asList("wfndiodjpsl", "ej")) + .withProtocolNeighbors(Arrays.asList("wryoqpsoacc", "azakl", "lahbcryff")) + .withPortCondition(new AccessControlListPortCondition().withLayer4Protocol( + Layer4Protocol.TCP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()))) + .withActions(Arrays.asList( + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("paojakhmsbzjh") + .withRemarkComment("zevdphlx") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("qtrgqjbpfzfsinzg") + .withRemarkComment("cjrwzoxxjtfellu") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("onpeqfpjkjlxofp") + .withRemarkComment("hpf") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.REMARK) + .withCounterName("ninmayhuyb") + .withRemarkComment("podepoo") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()))), + new AccessControlListMatchConfiguration() + .withMatchConfigurationName("uvamiheognarxzxt") + .withSequenceNumber(955954291018869840L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions( + Arrays.asList( + new AccessControlListMatchCondition() + .withProtocolTypes( + Arrays.asList("v", "ciqihnhung", "wjzrnfygxgisp")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes( + Arrays.asList("fkufublj", "fxqeof", "aeqjhqjbasvms")) + .withFragments(Arrays.asList("ulngsntn", "ybkzgcwr", "clxxwrljdo", + "skcqvkocrcjd")) + .withIpLengths(Arrays.asList("nh", "bnjbiksqrglssain")) + .withTtlValues(Arrays.asList("wnzlljfmppeeb", "mgxsab", "yqduujit")) + .withDscpMarkings(Arrays.asList("zdzevndh", "rwpdappdsbdkvwrw")) + .withProtocolNeighbors(Arrays.asList("usnhutje", "tmrldhugjzzdatq")) + .withPortCondition(new AccessControlListPortCondition() + .withLayer4Protocol(Layer4Protocol.SCTP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()), + new AccessControlListMatchCondition() + .withProtocolTypes( + Arrays.asList("eablg", "huticndvkao", "wyiftyhxhur", "k")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes( + Arrays.asList("lniwpwcukjfkgiaw", "klryplwck", "asy")) + .withFragments(Arrays.asList("ddhsgcbacphe", "koty", "qgoulznd")) + .withIpLengths(Arrays.asList("wyqkgfgibm")) + .withTtlValues(Arrays.asList("akeqs", "xybz")) + .withDscpMarkings(Arrays.asList("dqytbciqfouflmm")) + .withProtocolNeighbors(Arrays.asList("smodmgloug")) + .withPortCondition(new AccessControlListPortCondition() + .withLayer4Protocol(Layer4Protocol.SCTP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()), + new AccessControlListMatchCondition() + .withProtocolTypes( + Arrays.asList("utduqktapspwgcu", "rtumkdosvq", "hbmdgbbjfdd")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEtherTypes(Arrays.asList("ex", "pbhtqqrolfpfpsa")) + .withFragments(Arrays.asList("qux", "gjyjgzjaoyfhrtxi")) + .withIpLengths(Arrays.asList("rkujy", "vlejuvfqa")) + .withTtlValues(Arrays + .asList("yxwjkcp", "bnwbxgjvtbvpyssz", "nruj", "guhmuouqfpr")) + .withDscpMarkings(Arrays.asList("bngui", "nwui", "gazxuf")) + .withProtocolNeighbors(Arrays.asList("ckyfih", "fidfvzw")) + .withPortCondition(new AccessControlListPortCondition() + .withLayer4Protocol(Layer4Protocol.TCP)) + .withIcmpConfiguration(new IcmpConfigurationProperties()))) + .withActions(Arrays.asList(new AccessControlListAction() + .withType(AclActionType.DROP) + .withCounterName("sdkf") + .withRemarkComment("wxmnteiwao") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction().withType(AclActionType.DROP) + .withCounterName("jcmmxdcufufsrp") + .withRemarkComment("zidnsezcxtbzsgfy") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListAction() + .withType(AclActionType.REMARK) + .withCounterName("wmdwzjeiachboo") + .withRemarkComment("lnrosfqp") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties()))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("ypyqrimzinp") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("kirsoodqxhc", "mnoh", "t", "kwh")), + new IpGroupProperties().withName("oifiyipjxsqwpgr") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("rcjxvsnbyxqabn", "ocpcy", "hurzafblj")), + new IpGroupProperties().withName("pbtoqcjmkl") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("idtqajzyu", "pku", "jkrlkhbzhfepg")), + new IpGroupProperties().withName("qex") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("scpai", "rhhbcs", "l")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("jtjaodxobnbdxkq") + .withVlans(Arrays.asList("kajionpim")), + new VlanGroupProperties().withName("gstxgcp") + .withVlans(Arrays.asList("maajrmvdjwzrlo", "mcl")))) + .withPortGroups( Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("rwfndiod"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("w"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("vwryoqpso"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("ctazakljlahbcryf") - .withSequenceNumber(5965878792837381583L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new AccessControlListMatchCondition() - .withProtocolTypes( - Arrays.asList("rxzxtheo", "usivye", "cciqihnhungbwjz")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes( - Arrays.asList("paojakhmsbzjh", "rzevdphlxaol", "hqtrgqjbpf")) - .withFragments(Arrays.asList("inzgvfcj")) - .withIpLengths(Arrays.asList("oxxjtfelluwf", "it")) - .withTtlValues(Arrays.asList("eqfpj", "jlxofpdvhpfxxyp", "ninmayhuyb")) - .withDscpMarkings(Arrays.asList("odepoogin", "vamih")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.UDP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("xbnjbiksq", "gls", "ainqpjwnzlljfm")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("xgispemvtzfkufu")) - .withFragments(Arrays.asList("ofx", "eofjaeqjh")) - .withIpLengths(Arrays.asList("asvm")) - .withTtlValues(Arrays.asList("qulngsntnbybkzgc")) - .withDscpMarkings(Arrays.asList("clxxwrljdo", "skcqvkocrcjd")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("hsgcbacphejkot", "nqgoulzndli")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays - .asList("vmgxsab", "yqduujit", "jczdzevndh", "rwpdappdsbdkvwrw")) - .withFragments(Arrays.asList("usnhutje", "tmrldhugjzzdatq")) - .withIpLengths(Arrays.asList("cdgea")) - .withTtlValues(Arrays.asList("phut", "cndvkaozwyiftyhx", "urokft")) - .withDscpMarkings(Arrays.asList("lniwpwcukjfkgiaw", "klryplwck", "asy")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.UDP)), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ddgmb")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("gfgibm")) - .withFragments(Arrays.asList("akeqs", "xybz")) - .withIpLengths(Arrays.asList("dqytbciqfouflmm")) - .withTtlValues(Arrays.asList("smodmgloug")) - .withDscpMarkings( - Arrays.asList("wtmutduq", "ta", "spwgcuertumkdosv", "whbmd")) - .withPortCondition(new AccessControlListPortCondition() - .withLayer4Protocol(Layer4Protocol.TCP)))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("tq"), - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("fpfpsalgbquxigj"), - new AccessControlListAction().withType(AclActionType.LOG) - .withCounterName("jaoyfhrtx"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("ujysvle") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("awrlyx", "jkcpr", "nwbxgjvtbvpyssz")), - new IpGroupProperties().withName("rujqg") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("uqfprwzw", "nguitnwuizgazxu")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ckyfih").withVlans(Arrays.asList("dfvzwdzuhty")), - new VlanGroupProperties().withName("isdkfthwxmnteiw") - .withVlans(Arrays.asList("vkmijcmmxdcuf", "fsrpymzidnse", "cxtbzsg", "yc")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("wmdwzjeiachboo") - .withPorts(Arrays.asList("nrosfqpte", "hzzvypyq")), - new PortGroupProperties() - .withName("mzinpvswjdk") - .withPorts(Arrays.asList("oodqxhcrm", "ohjtckw", "dsoifiyipj", "sqwpgrjb")), - new PortGroupProperties().withName("orcjxvsnby") - .withPorts(Arrays.asList("bnmo", "pcyshu", "zafb")), - new PortGroupProperties().withName("j") - .withPorts(Arrays.asList("toqcjmklja", "bqidtqaj", "yulpkudjkr", "khbzhfepgzg")))))) - .withAnnotation("xzlocxscp"); + new PortGroupProperties().withName("coejctbzaqs") + .withPorts(Arrays.asList("cbkbfkg")), + new PortGroupProperties().withName("dkexxppofm").withPorts(Arrays.asList("c")), + new PortGroupProperties() + .withName("pg") + .withPorts(Arrays.asList("ocjjxhvpmouexh")))), + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays.asList( + new IpGroupProperties().withName("bqe") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("bzv", "dntwndeicbtw", "pzaoqvuhr")), + new IpGroupProperties().withName("f") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("glmjth", "qkwpyeicxmqc", "wqvhkhixuigdt")), + new IpGroupProperties().withName("bob") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("e")))) + .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("a") + .withVlans(Arrays.asList("z", "yvvtpgvdfgio")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("utqxlngx") + .withPorts(Arrays.asList("gug", "xkrxdqmi", "tthzrvqd", "abhjybi")), + new PortGroupProperties().withName("h") + .withPorts(Arrays.asList("bowsk", "nyktzlcuiy", "gqywgndrv")), + new PortGroupProperties().withName("hzgpphrcgyncocpe") + .withPorts(Arrays.asList("m", "coofsxlzev")), + new PortGroupProperties().withName("m") + .withPorts(Arrays.asList("abcypmivk", "lzu")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.CE) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE))); model = BinaryData.fromObject(model).toObject(AccessControlListInner.class); - Assertions.assertEquals("erhhbcsglumm", model.location()); - Assertions.assertEquals("j", model.tags().get("odxobnbdxkqpxok")); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("bczmeh", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("sphrupidgs", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(5720978843418888179L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("qucmpo", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("cmsxaobhdxbm", - model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("oqjzehtbmufpowno", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("wlrxyb", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("bpazlobcufpdzn", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("sqe", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("xdpnqbqq", model.location()); + Assertions.assertEquals("jfeallnwsub", model.tags().get("snjampmng")); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.properties().configurationType()); + Assertions.assertEquals("cyzkohdbihanuf", model.properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().defaultAction()); + Assertions.assertEquals("s", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4240171364940315752L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("ifpikxwczby", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("wvukx", + model.properties().matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("yejhk", + model.properties().matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("dmailzydehojw", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("putegjvwmfd", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("wfndiodjpsl", + model.properties().matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("wryoqpsoacc", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.COUNT, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("hab", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ujysvle", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("awrlyx", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ckyfih", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dfvzwdzuhty", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wmdwzjeiachboo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nrosfqpte", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("xzlocxscp", model.annotation()); + model.properties().matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals(AclActionType.COUNT, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("paojakhmsbzjh", + model.properties().matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("zevdphlx", + model.properties().matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("ypyqrimzinp", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("kirsoodqxhc", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("jtjaodxobnbdxkq", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("kajionpim", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("coejctbzaqs", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("cbkbfkg", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.CP, model.properties().aclType()); + Assertions.assertEquals(DeviceRole.CE, model.properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().globalAccessControlListActions().enableCount()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListListResultTests.java new file mode 100644 index 000000000000..51c925b6d301 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListListResultTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.AccessControlListListResult; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"iip\",\"configurationType\":\"Inline\",\"aclsUrl\":\"vawuwzdufypivlsb\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"bkmifoxxkub\",\"sequenceNumber\":5152362108992090139,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"qgvgovpbbtt\",\"sequenceNumber\":5837508536480224007,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]}],\"lastSyncedTime\":\"2021-03-19T17:27:27Z\",\"aclType\":\"Tenant\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"xmjpbyep\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"rc\",\"tags\":{\"npomy\":\"qipgx\"},\"id\":\"wcabvnuileeya\",\"name\":\"wlpaugmrmfjlrxwt\",\"type\":\"aukhfkvcisiz\"},{\"properties\":{\"annotation\":\"a\",\"configurationType\":\"Inline\",\"aclsUrl\":\"xjw\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"cgyee\",\"sequenceNumber\":1846640547424370909,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]}],\"lastSyncedTime\":\"2021-01-15T16:07:09Z\",\"aclType\":\"Management\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"vnewgnxkympqanx\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\"},\"location\":\"taoypnyghshxc\",\"tags\":{\"hdrwjjkh\":\"kgmnsghpxyc\",\"rpqpd\":\"yomacluzvxnqm\"},\"id\":\"wmkoisq\",\"name\":\"ssffxuifmc\",\"type\":\"ypobkdqzr\"},{\"properties\":{\"annotation\":\"sylollgtr\",\"configurationType\":\"Inline\",\"aclsUrl\":\"ydmxzj\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"urkihci\",\"sequenceNumber\":7766107941322865911,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"nbkkjanurnnq\",\"sequenceNumber\":1049234060392061632,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"grdogypxrxvbfihw\",\"sequenceNumber\":8993720142836618062,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]}],\"lastSyncedTime\":\"2021-11-04T17:34:13Z\",\"aclType\":\"Management\",\"deviceRole\":\"ToR\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"aklsbsbq\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"ao\",\"tags\":{\"rczezkhhlt\":\"sgl\",\"oyueayfbpcmsp\":\"jadhqoawj\"},\"id\":\"byrrueqth\",\"name\":\"mg\",\"type\":\"mbscbbx\"}],\"nextLink\":\"dhxiidlopedbwd\"}") + .toObject(AccessControlListListResult.class); + Assertions.assertEquals("rc", model.value().get(0).location()); + Assertions.assertEquals("qipgx", model.value().get(0).tags().get("npomy")); + Assertions.assertEquals("iip", model.value().get(0).properties().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.value().get(0).properties().configurationType()); + Assertions.assertEquals("vawuwzdufypivlsb", model.value().get(0).properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).properties().defaultAction()); + Assertions.assertEquals("bkmifoxxkub", + model.value().get(0).properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(5152362108992090139L, + model.value().get(0).properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, + model.value().get(0).properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(AclType.TENANT, model.value().get(0).properties().aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.value().get(0).properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.value().get(0).properties().globalAccessControlListActions().enableCount()); + Assertions.assertEquals("dhxiidlopedbwd", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java new file mode 100644 index 000000000000..4cb9f5fefe41 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionPatchTests.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +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.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListMatchConditionPatch model = BinaryData.fromString( + "{\"protocolTypes\":[\"ppdbwnupgahxkum\",\"sjcaacfdmmcpugm\"],\"vlanMatchCondition\":{\"vlans\":[\"pvufhbze\",\"ewhoqh\",\"lbqnbldxeacl\"],\"innerVlans\":[\"horimkr\",\"r\",\"moucsofldpuviyfc\"],\"vlanGroupNames\":[\"eolhbhlvbmx\",\"qi\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"fbsfarfsiow\",\"kjxnqpvwgfstmhq\",\"kizmdksaoafclu\",\"v\"],\"ipGroupNames\":[\"ycjimryvwgcwwpbm\",\"gwe\",\"ydsx\",\"efoh\"]},\"etherTypes\":[\"vopwndyqleallk\",\"mtkhlowkxxpvbr\",\"fjmzsyzfho\"],\"fragments\":[\"ikcyyc\"],\"ipLengths\":[\"sjlpjrtwszhv\",\"uic\",\"hvtrrmhwrbfdpyf\"],\"ttlValues\":[\"hvj\",\"lrocuyzlwh\"],\"dscpMarkings\":[\"mhoocl\",\"tnpqmemczjk\",\"mykyujxsglhs\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"m\",\"kzudn\"],\"portGroupNames\":[\"fihotj\"],\"flags\":[\"pxuzzjg\",\"refqy\",\"qotoihiqakydiwfb\",\"kwpzdqtvh\"]},\"protocolNeighbors\":[\"odaqaxsi\",\"ietgbebjfu\"],\"icmpConfiguration\":{\"icmpTypes\":[\"ichdlpn\",\"pubntnbatz\",\"iqsowsaaelc\",\"ttcjuhplrvkmjc\"]}}") + .toObject(AccessControlListMatchConditionPatch.class); + Assertions.assertEquals("ppdbwnupgahxkum", model.protocolTypes().get(0)); + Assertions.assertEquals("pvufhbze", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("horimkr", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("eolhbhlvbmx", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("fbsfarfsiow", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("ycjimryvwgcwwpbm", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("vopwndyqleallk", model.etherTypes().get(0)); + Assertions.assertEquals("ikcyyc", model.fragments().get(0)); + Assertions.assertEquals("sjlpjrtwszhv", model.ipLengths().get(0)); + Assertions.assertEquals("hvj", model.ttlValues().get(0)); + Assertions.assertEquals("mhoocl", model.dscpMarkings().get(0)); + Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("m", model.portCondition().ports().get(0)); + Assertions.assertEquals("fihotj", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("pxuzzjg", model.portCondition().flags().get(0)); + Assertions.assertEquals("odaqaxsi", model.protocolNeighbors().get(0)); + Assertions.assertEquals("ichdlpn", model.icmpConfiguration().icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListMatchConditionPatch model = new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("ppdbwnupgahxkum", "sjcaacfdmmcpugm")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("pvufhbze", "ewhoqh", "lbqnbldxeacl")) + .withInnerVlans(Arrays.asList("horimkr", "r", "moucsofldpuviyfc")) + .withVlanGroupNames(Arrays.asList("eolhbhlvbmx", "qi"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("fbsfarfsiow", "kjxnqpvwgfstmhq", "kizmdksaoafclu", "v")) + .withIpGroupNames(Arrays.asList("ycjimryvwgcwwpbm", "gwe", "ydsx", "efoh"))) + .withEtherTypes(Arrays.asList("vopwndyqleallk", "mtkhlowkxxpvbr", "fjmzsyzfho")) + .withFragments(Arrays.asList("ikcyyc")) + .withIpLengths(Arrays.asList("sjlpjrtwszhv", "uic", "hvtrrmhwrbfdpyf")) + .withTtlValues(Arrays.asList("hvj", "lrocuyzlwh")) + .withDscpMarkings(Arrays.asList("mhoocl", "tnpqmemczjk", "mykyujxsglhs")) + .withPortCondition(new AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("m", "kzudn")) + .withPortGroupNames(Arrays.asList("fihotj")) + .withFlags(Arrays.asList("pxuzzjg", "refqy", "qotoihiqakydiwfb", "kwpzdqtvh"))) + .withProtocolNeighbors(Arrays.asList("odaqaxsi", "ietgbebjfu")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("ichdlpn", "pubntnbatz", "iqsowsaaelc", "ttcjuhplrvkmjc"))); + model = BinaryData.fromObject(model).toObject(AccessControlListMatchConditionPatch.class); + Assertions.assertEquals("ppdbwnupgahxkum", model.protocolTypes().get(0)); + Assertions.assertEquals("pvufhbze", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("horimkr", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("eolhbhlvbmx", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("fbsfarfsiow", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("ycjimryvwgcwwpbm", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("vopwndyqleallk", model.etherTypes().get(0)); + Assertions.assertEquals("ikcyyc", model.fragments().get(0)); + Assertions.assertEquals("sjlpjrtwszhv", model.ipLengths().get(0)); + Assertions.assertEquals("hvj", model.ttlValues().get(0)); + Assertions.assertEquals("mhoocl", model.dscpMarkings().get(0)); + Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("m", model.portCondition().ports().get(0)); + Assertions.assertEquals("fihotj", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("pxuzzjg", model.portCondition().flags().get(0)); + Assertions.assertEquals("odaqaxsi", model.protocolNeighbors().get(0)); + Assertions.assertEquals("ichdlpn", model.icmpConfiguration().icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java index 8d8b2349a250..727dad043290 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConditionTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; import com.azure.resourcemanager.managednetworkfabric.models.PortType; @@ -20,67 +21,73 @@ public final class AccessControlListMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListMatchCondition model = BinaryData.fromString( - "{\"etherTypes\":[\"pmguaadraufac\",\"kahzo\",\"ajjziuxxpshne\",\"kulfg\"],\"fragments\":[\"ubkwdle\",\"rds\"],\"ipLengths\":[\"jbazpjuohminy\",\"lnorwmdu\",\"wpklvxw\",\"ygdxpgpqchis\"],\"ttlValues\":[\"nnbj\",\"rxgibbd\"],\"dscpMarkings\":[\"onfo\",\"auorsukokw\",\"qplhlvnu\"],\"portCondition\":{\"flags\":[\"lrphwzsoldw\",\"yuqdu\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"wrbiorkt\",\"lywjhh\"],\"portGroupNames\":[\"hxmsivfo\",\"iloxggdufiq\"]},\"protocolTypes\":[\"euzaof\",\"chvcyyysfgdo\",\"cubiipuipw\",\"qonmacj\"],\"vlanMatchCondition\":{\"vlans\":[\"zshq\"],\"innerVlans\":[\"m\",\"ev\"],\"vlanGroupNames\":[\"b\",\"rrilbywdxsmic\",\"wrwfscjfnyns\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"oqytibyowbblgy\",\"vutpthjoxo\"],\"ipGroupNames\":[\"sks\",\"pi\"]}}") + "{\"protocolTypes\":[\"ckpyklyhplu\"],\"vlanMatchCondition\":{\"vlans\":[\"ruud\"],\"innerVlans\":[\"ibthostgktstvd\"],\"vlanGroupNames\":[\"lzedqbcvhzlhplo\",\"qkdlw\",\"qfbumlkxtrqjf\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"w\",\"fwsrtawcoezbrhu\"],\"ipGroupNames\":[\"hud\"]},\"etherTypes\":[\"ookk\",\"fqjbvleo\"],\"fragments\":[\"luiqtqzfavyvnqq\"],\"ipLengths\":[\"ryeu\",\"yjkqabqgzslesjcb\"],\"ttlValues\":[\"n\",\"tiewdj\",\"vbquwr\"],\"dscpMarkings\":[\"wagohbuffk\",\"rqemvvhmxt\",\"rjfut\",\"coebjvewzcj\"],\"protocolNeighbors\":[\"wcpmguaadraufac\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"ajjziuxxpshne\"],\"portGroupNames\":[\"lfg\",\"lqubkwdlen\"],\"flags\":[\"utujba\",\"pjuohminyfl\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"mduvw\"]}}") .toObject(AccessControlListMatchCondition.class); - Assertions.assertEquals("euzaof", model.protocolTypes().get(0)); - Assertions.assertEquals("zshq", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("m", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("b", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("oqytibyowbblgy", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("sks", model.ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("pmguaadraufac", model.etherTypes().get(0)); - Assertions.assertEquals("ubkwdle", model.fragments().get(0)); - Assertions.assertEquals("jbazpjuohminy", model.ipLengths().get(0)); - Assertions.assertEquals("nnbj", model.ttlValues().get(0)); - Assertions.assertEquals("onfo", model.dscpMarkings().get(0)); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("wrbiorkt", model.portCondition().ports().get(0)); - Assertions.assertEquals("hxmsivfo", model.portCondition().portGroupNames().get(0)); - Assertions.assertEquals("lrphwzsoldw", model.portCondition().flags().get(0)); + Assertions.assertEquals("ckpyklyhplu", model.protocolTypes().get(0)); + Assertions.assertEquals("ruud", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("ibthostgktstvd", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("lzedqbcvhzlhplo", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("w", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("hud", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("ookk", model.etherTypes().get(0)); + Assertions.assertEquals("luiqtqzfavyvnqq", model.fragments().get(0)); + Assertions.assertEquals("ryeu", model.ipLengths().get(0)); + Assertions.assertEquals("n", model.ttlValues().get(0)); + Assertions.assertEquals("wagohbuffk", model.dscpMarkings().get(0)); + Assertions.assertEquals("wcpmguaadraufac", model.protocolNeighbors().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("ajjziuxxpshne", model.portCondition().ports().get(0)); + Assertions.assertEquals("lfg", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("utujba", model.portCondition().flags().get(0)); + Assertions.assertEquals("mduvw", model.icmpConfiguration().icmpTypes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListMatchCondition model = new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("euzaof", "chvcyyysfgdo", "cubiipuipw", "qonmacj")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("zshq")) - .withInnerVlans(Arrays.asList("m", "ev")) - .withVlanGroupNames(Arrays.asList("b", "rrilbywdxsmic", "wrwfscjfnyns"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("oqytibyowbblgy", "vutpthjoxo")) - .withIpGroupNames(Arrays.asList("sks", "pi"))) - .withEtherTypes(Arrays.asList("pmguaadraufac", "kahzo", "ajjziuxxpshne", "kulfg")) - .withFragments(Arrays.asList("ubkwdle", "rds")) - .withIpLengths(Arrays.asList("jbazpjuohminy", "lnorwmdu", "wpklvxw", "ygdxpgpqchis")) - .withTtlValues(Arrays.asList("nnbj", "rxgibbd")) - .withDscpMarkings(Arrays.asList("onfo", "auorsukokw", "qplhlvnu")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("wrbiorkt", "lywjhh")) - .withPortGroupNames(Arrays.asList("hxmsivfo", "iloxggdufiq")) - .withFlags(Arrays.asList("lrphwzsoldw", "yuqdu"))); + AccessControlListMatchCondition model + = new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("ckpyklyhplu")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("ruud")) + .withInnerVlans(Arrays.asList("ibthostgktstvd")) + .withVlanGroupNames(Arrays.asList("lzedqbcvhzlhplo", "qkdlw", "qfbumlkxtrqjf"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("w", "fwsrtawcoezbrhu")) + .withIpGroupNames(Arrays.asList("hud"))) + .withEtherTypes(Arrays.asList("ookk", "fqjbvleo")) + .withFragments(Arrays.asList("luiqtqzfavyvnqq")) + .withIpLengths(Arrays.asList("ryeu", "yjkqabqgzslesjcb")) + .withTtlValues(Arrays.asList("n", "tiewdj", "vbquwr")) + .withDscpMarkings(Arrays.asList("wagohbuffk", "rqemvvhmxt", "rjfut", "coebjvewzcj")) + .withProtocolNeighbors(Arrays.asList("wcpmguaadraufac")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("ajjziuxxpshne")) + .withPortGroupNames(Arrays.asList("lfg", "lqubkwdlen")) + .withFlags(Arrays.asList("utujba", "pjuohminyfl"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("mduvw"))); model = BinaryData.fromObject(model).toObject(AccessControlListMatchCondition.class); - Assertions.assertEquals("euzaof", model.protocolTypes().get(0)); - Assertions.assertEquals("zshq", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("m", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("b", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("oqytibyowbblgy", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("sks", model.ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("pmguaadraufac", model.etherTypes().get(0)); - Assertions.assertEquals("ubkwdle", model.fragments().get(0)); - Assertions.assertEquals("jbazpjuohminy", model.ipLengths().get(0)); - Assertions.assertEquals("nnbj", model.ttlValues().get(0)); - Assertions.assertEquals("onfo", model.dscpMarkings().get(0)); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("wrbiorkt", model.portCondition().ports().get(0)); - Assertions.assertEquals("hxmsivfo", model.portCondition().portGroupNames().get(0)); - Assertions.assertEquals("lrphwzsoldw", model.portCondition().flags().get(0)); + Assertions.assertEquals("ckpyklyhplu", model.protocolTypes().get(0)); + Assertions.assertEquals("ruud", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("ibthostgktstvd", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("lzedqbcvhzlhplo", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("w", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("hud", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("ookk", model.etherTypes().get(0)); + Assertions.assertEquals("luiqtqzfavyvnqq", model.fragments().get(0)); + Assertions.assertEquals("ryeu", model.ipLengths().get(0)); + Assertions.assertEquals("n", model.ttlValues().get(0)); + Assertions.assertEquals("wagohbuffk", model.dscpMarkings().get(0)); + Assertions.assertEquals("wcpmguaadraufac", model.protocolNeighbors().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("ajjziuxxpshne", model.portCondition().ports().get(0)); + Assertions.assertEquals("lfg", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals("utujba", model.portCondition().flags().get(0)); + Assertions.assertEquals("mduvw", model.icmpConfiguration().icmpTypes().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java new file mode 100644 index 000000000000..9a77a045f262 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationPatchTests.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +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.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListMatchConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListMatchConfigurationPatch model = BinaryData.fromString( + "{\"matchConfigurationName\":\"nchrszizoyu\",\"sequenceNumber\":5182036247086876592,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"qyggagfl\",\"lgmtrwahzjmucf\",\"byrplrohkpig\",\"fusuckzmkwklsno\"],\"vlanMatchCondition\":{\"vlans\":[\"qe\"],\"innerVlans\":[\"h\",\"jnhgwydyyn\"],\"vlanGroupNames\":[\"khgb\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"dlpukhpyrne\",\"zjcpeogk\",\"nmg\"],\"ipGroupNames\":[\"uxddbhfh\",\"fpazjzoywjxhpd\",\"lontacnpq\",\"tehtuevrhrljyoog\"]},\"etherTypes\":[\"nsduugwbsre\",\"rfqkfuar\",\"nlvhhtklnvnafvv\",\"yfedevjbo\"],\"fragments\":[\"qxypokkhminq\",\"ymc\",\"ngnbdxxew\",\"ninvudbchaqdt\"],\"ipLengths\":[\"crqctmxxdtddmflh\"],\"ttlValues\":[\"xzvtzna\"],\"dscpMarkings\":[\"annovvoxczytpr\",\"nwvroevytlyokrr\",\"o\",\"uxvnsasbcrymodi\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xnazpmkml\"],\"portGroupNames\":[\"vfxzopjh\",\"zxlioh\",\"d\",\"dtfgxqbawpcbb\"],\"flags\":[\"cyknapqofyuicd\"]},\"protocolNeighbors\":[\"dyb\"],\"icmpConfiguration\":{\"icmpTypes\":[\"d\",\"ibidmhmwffp\",\"fmuvapckccr\",\"vwe\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"ukphaimmoiroq\",\"remarkComment\":\"shbraga\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":8402598693458726113,\"unit\":\"Gbps\"},\"burstSize\":{\"size\":6933464381526152377,\"unit\":\"GBytes\"}}}]}") + .toObject(AccessControlListMatchConfigurationPatch.class); + Assertions.assertEquals("nchrszizoyu", model.matchConfigurationName()); + Assertions.assertEquals(5182036247086876592L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("qyggagfl", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("qe", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("h", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("khgb", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("dlpukhpyrne", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("uxddbhfh", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("nsduugwbsre", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("qxypokkhminq", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("crqctmxxdtddmflh", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("xzvtzna", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("annovvoxczytpr", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("xnazpmkml", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("vfxzopjh", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("cyknapqofyuicd", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("dyb", model.matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("d", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.DROP, model.actions().get(0).type()); + Assertions.assertEquals("ukphaimmoiroq", model.actions().get(0).counterName()); + Assertions.assertEquals("shbraga", model.actions().get(0).remarkComment()); + Assertions.assertEquals(8402598693458726113L, + model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.GBPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(6933464381526152377L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListMatchConfigurationPatch model + = new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("nchrszizoyu") + .withSequenceNumber(5182036247086876592L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("qyggagfl", "lgmtrwahzjmucf", "byrplrohkpig", "fusuckzmkwklsno")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("qe")) + .withInnerVlans(Arrays.asList("h", "jnhgwydyyn")) + .withVlanGroupNames(Arrays.asList("khgb"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("dlpukhpyrne", "zjcpeogk", "nmg")) + .withIpGroupNames(Arrays.asList("uxddbhfh", "fpazjzoywjxhpd", "lontacnpq", "tehtuevrhrljyoog"))) + .withEtherTypes(Arrays.asList("nsduugwbsre", "rfqkfuar", "nlvhhtklnvnafvv", "yfedevjbo")) + .withFragments(Arrays.asList("qxypokkhminq", "ymc", "ngnbdxxew", "ninvudbchaqdt")) + .withIpLengths(Arrays.asList("crqctmxxdtddmflh")) + .withTtlValues(Arrays.asList("xzvtzna")) + .withDscpMarkings(Arrays.asList("annovvoxczytpr", "nwvroevytlyokrr", "o", "uxvnsasbcrymodi")) + .withPortCondition(new AccessControlListPortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("xnazpmkml")) + .withPortGroupNames(Arrays.asList("vfxzopjh", "zxlioh", "d", "dtfgxqbawpcbb")) + .withFlags(Arrays.asList("cyknapqofyuicd"))) + .withProtocolNeighbors(Arrays.asList("dyb")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("d", "ibidmhmwffp", "fmuvapckccr", "vwe"))))) + .withActions(Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.DROP) + .withCounterName("ukphaimmoiroq") + .withRemarkComment("shbraga") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(8402598693458726113L).withUnit(BitRateUnit.GBPS)) + .withBurstSize( + new BurstSize().withSize(6933464381526152377L).withUnit(BurstSizeUnit.GBYTES))))); + model = BinaryData.fromObject(model).toObject(AccessControlListMatchConfigurationPatch.class); + Assertions.assertEquals("nchrszizoyu", model.matchConfigurationName()); + Assertions.assertEquals(5182036247086876592L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("qyggagfl", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("qe", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("h", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("khgb", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("dlpukhpyrne", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("uxddbhfh", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("nsduugwbsre", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("qxypokkhminq", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("crqctmxxdtddmflh", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("xzvtzna", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("annovvoxczytpr", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("xnazpmkml", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("vfxzopjh", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("cyknapqofyuicd", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("dyb", model.matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("d", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.DROP, model.actions().get(0).type()); + Assertions.assertEquals("ukphaimmoiroq", model.actions().get(0).counterName()); + Assertions.assertEquals("shbraga", model.actions().get(0).remarkComment()); + Assertions.assertEquals(8402598693458726113L, + model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.GBPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(6933464381526152377L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java index 1499448bf962..9e79710c0351 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListMatchConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,9 +10,15 @@ 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.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; @@ -24,109 +30,137 @@ public final class AccessControlListMatchConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListMatchConfiguration model = BinaryData.fromString( - "{\"matchConfigurationName\":\"qxvcxgfrpdsofb\",\"sequenceNumber\":265597434112892154,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"dvzyybycnun\",\"jsrtk\"],\"fragments\":[\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\",\"rydxtqm\"],\"ipLengths\":[\"xorgg\"],\"ttlValues\":[\"yaomtb\",\"hhavgrvkffovjz\",\"pjbi\",\"gjmfxumvfcl\"],\"dscpMarkings\":[\"vwxnbkfe\",\"zxscyhwzdgirujb\",\"bomvzzbtdcqv\",\"niyujv\"],\"portCondition\":{\"flags\":[\"dshf\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ye\"],\"portGroupNames\":[\"msgaoj\",\"mwn\",\"otmrfhir\"]},\"protocolTypes\":[\"moxoftpi\",\"iwyczuh\",\"a\",\"pqjlihhyusps\"],\"vlanMatchCondition\":{\"vlans\":[\"vlmfwdgzxulucv\",\"amrsreuzv\",\"urisjnhnytxifqj\"],\"innerVlans\":[\"mrhublwpc\",\"sutrgjup\"],\"vlanGroupNames\":[\"tpwoqhihejq\",\"w\",\"pnfqntcyp\",\"xjvfoimwksl\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ydfce\",\"cvlhv\",\"gdyftumrtwna\",\"jslb\"],\"ipGroupNames\":[\"ojgcyzt\",\"fmznba\",\"qphchqnrnrpxehuw\"]}},{\"etherTypes\":[\"qgaifmviklbydv\"],\"fragments\":[\"ejd\",\"nxcvds\",\"hnjivo\"],\"ipLengths\":[\"novqfzge\",\"jdftuljltd\",\"ceamtm\",\"zuo\"],\"ttlValues\":[\"wcw\"],\"dscpMarkings\":[\"oknssxmojmsvpkjp\",\"vk\",\"cfzq\"],\"portCondition\":{\"flags\":[\"gtczheydb\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xmaehvbbxu\"],\"portGroupNames\":[\"ltfnhtbaxkgx\",\"wrck\",\"yklyhpluodpvruud\"]},\"protocolTypes\":[\"ibthostgktstvd\"],\"vlanMatchCondition\":{\"vlans\":[\"zedqbcvhzlhplo\",\"qkdlw\",\"qfbumlkxtrqjf\",\"mlmbtxhwgfwsrta\"],\"innerVlans\":[\"ezbrhubskh\",\"dyg\",\"ookk\"],\"vlanGroupNames\":[\"jb\",\"leorfmluiqtqz\",\"avyvnqqyba\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"qabqgzslesjcb\"],\"ipGroupNames\":[\"n\",\"tiewdj\",\"vbquwr\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"o\"},{\"type\":\"Log\",\"counterName\":\"fkmr\"},{\"type\":\"Drop\",\"counterName\":\"vhmxtdrjfu\"},{\"type\":\"Log\",\"counterName\":\"ebjvewzcjzn\"}]}") + "{\"matchConfigurationName\":\"gzxnfaazpxdtnk\",\"sequenceNumber\":4819915655623437065,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"nvrk\",\"yo\",\"aibrebqaaysjkixq\",\"nqttezl\"],\"vlanMatchCondition\":{\"vlans\":[\"iakp\",\"pqqmted\",\"tmmjihyeozph\"],\"innerVlans\":[\"uyqncygupkvipmd\",\"cwxqu\",\"evzhfsto\"],\"vlanGroupNames\":[\"ojujbyp\",\"lmcuvhixb\",\"xyfwnylrcool\",\"ttpkiwkkbnujrywv\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"urdoi\",\"iithtywu\",\"xcbihw\"],\"ipGroupNames\":[\"fdntwjchrdgoih\"]},\"etherTypes\":[\"wct\",\"ndz\",\"luudfdlwggytsb\",\"tov\"],\"fragments\":[\"seinqfiuf\",\"qknp\"],\"ipLengths\":[\"nepttwqmsni\",\"fcdmqnrojlpijn\",\"rxfrddhc\"],\"ttlValues\":[\"izzronasxiftozqy\",\"hftwesgog\",\"zhonnxkrlgnyhmo\"],\"dscpMarkings\":[\"kkgthr\"],\"protocolNeighbors\":[\"xjb\",\"hqxvcxgfrpdsofbs\",\"rnsvbuswd\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"nu\",\"vj\"],\"portGroupNames\":[\"kfawnopqgikyz\"],\"flags\":[\"xdyuxzejnt\",\"sewgioilqukr\",\"dxtqmieoxo\",\"ggufhyaomtb\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"vgrvkffo\",\"jzhpjbibgjmfx\",\"mv\"]}},{\"protocolTypes\":[\"uyovw\",\"nbkfezzxscy\",\"wzdgirujbzbo\",\"vzzbtdcq\"],\"vlanMatchCondition\":{\"vlans\":[\"yujviylwdshfssn\",\"bgye\",\"rymsgaojfmw\",\"cotmr\"],\"innerVlans\":[\"rctym\",\"xoftpipiwyczu\",\"xacpqjli\",\"hyus\"],\"vlanGroupNames\":[\"asdvl\",\"fwdgzxulucvp\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"vxurisjnhnytxifq\",\"zgxmr\",\"ublwpcesutrg\"],\"ipGroupNames\":[\"auutpwoqhihe\",\"qg\"]},\"etherTypes\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"],\"fragments\":[\"xvydfceacvlhvygd\"],\"ipLengths\":[\"umrtwnawjsl\"],\"ttlValues\":[\"kojgcyzts\",\"mznbaeqphch\",\"nrnrp\",\"ehuwrykqgaifmvik\"],\"dscpMarkings\":[\"dvk\"],\"protocolNeighbors\":[\"jdz\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"hnjivo\"],\"portGroupNames\":[\"novqfzge\",\"jdftuljltd\",\"ceamtm\",\"zuo\"],\"flags\":[\"wcw\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"knssxmojm\",\"vpkjpr\",\"kwcf\",\"ql\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"zheydbsdshmk\",\"remarkComment\":\"aehvbbxuri\",\"policeRateConfiguration\":{\"bitRate\":{\"rate\":438474543509360007,\"unit\":\"bps\"},\"burstSize\":{\"size\":6787000307588779868,\"unit\":\"KBytes\"}}}]}") .toObject(AccessControlListMatchConfiguration.class); - Assertions.assertEquals("qxvcxgfrpdsofb", model.matchConfigurationName()); - Assertions.assertEquals(265597434112892154L, model.sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("moxoftpi", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("vlmfwdgzxulucv", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("mrhublwpc", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("tpwoqhihejq", - model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("gzxnfaazpxdtnk", model.matchConfigurationName()); + Assertions.assertEquals(4819915655623437065L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("nvrk", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("iakp", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("uyqncygupkvipmd", + model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("ojujbyp", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ydfce", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ojgcyzt", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("dvzyybycnun", model.matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("nopqgikyzirtx", model.matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("xorgg", model.matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("yaomtb", model.matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("vwxnbkfe", model.matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ye", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("msgaoj", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dshf", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("urdoi", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("fdntwjchrdgoih", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("wct", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("seinqfiuf", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("nepttwqmsni", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("izzronasxiftozqy", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("kkgthr", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("xjb", model.matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("nu", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("kfawnopqgikyz", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("xdyuxzejnt", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("vgrvkffo", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); Assertions.assertEquals(AclActionType.COUNT, model.actions().get(0).type()); - Assertions.assertEquals("o", model.actions().get(0).counterName()); + Assertions.assertEquals("zheydbsdshmk", model.actions().get(0).counterName()); + Assertions.assertEquals("aehvbbxuri", model.actions().get(0).remarkComment()); + Assertions.assertEquals(438474543509360007L, model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.BPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(6787000307588779868L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListMatchConfiguration model - = new AccessControlListMatchConfiguration().withMatchConfigurationName("qxvcxgfrpdsofb") - .withSequenceNumber(265597434112892154L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("moxoftpi", "iwyczuh", "a", "pqjlihhyusps")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("vlmfwdgzxulucv", "amrsreuzv", "urisjnhnytxifqj")) - .withInnerVlans(Arrays.asList("mrhublwpc", "sutrgjup")) - .withVlanGroupNames(Arrays.asList("tpwoqhihejq", "w", "pnfqntcyp", "xjvfoimwksl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("ydfce", "cvlhv", "gdyftumrtwna", "jslb")) - .withIpGroupNames(Arrays.asList("ojgcyzt", "fmznba", "qphchqnrnrpxehuw"))) - .withEtherTypes(Arrays.asList("dvzyybycnun", "jsrtk")) - .withFragments(Arrays.asList("nopqgikyzirtx", "yuxzejntpsewgi", "ilqu", "rydxtqm")) - .withIpLengths(Arrays.asList("xorgg")) - .withTtlValues(Arrays.asList("yaomtb", "hhavgrvkffovjz", "pjbi", "gjmfxumvfcl")) - .withDscpMarkings(Arrays.asList("vwxnbkfe", "zxscyhwzdgirujb", "bomvzzbtdcqv", "niyujv")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("ye")) - .withPortGroupNames(Arrays.asList("msgaoj", "mwn", "otmrfhir")) - .withFlags(Arrays.asList("dshf"))), - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("ibthostgktstvd")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("zedqbcvhzlhplo", "qkdlw", "qfbumlkxtrqjf", "mlmbtxhwgfwsrta")) - .withInnerVlans(Arrays.asList("ezbrhubskh", "dyg", "ookk")) - .withVlanGroupNames(Arrays.asList("jb", "leorfmluiqtqz", "avyvnqqyba"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("qabqgzslesjcb")) - .withIpGroupNames(Arrays.asList("n", "tiewdj", "vbquwr"))) - .withEtherTypes(Arrays.asList("qgaifmviklbydv")) - .withFragments(Arrays.asList("ejd", "nxcvds", "hnjivo")) - .withIpLengths(Arrays.asList("novqfzge", "jdftuljltd", "ceamtm", "zuo")) - .withTtlValues(Arrays.asList("wcw")) - .withDscpMarkings(Arrays.asList("oknssxmojmsvpkjp", "vk", "cfzq")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xmaehvbbxu")) - .withPortGroupNames(Arrays.asList("ltfnhtbaxkgx", "wrck", "yklyhpluodpvruud")) - .withFlags(Arrays.asList("gtczheydb"))))) - .withActions( - Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("o"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("fkmr"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("vhmxtdrjfu"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("ebjvewzcjzn"))); + AccessControlListMatchConfiguration model = new AccessControlListMatchConfiguration() + .withMatchConfigurationName("gzxnfaazpxdtnk") + .withSequenceNumber(4819915655623437065L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("nvrk", "yo", "aibrebqaaysjkixq", "nqttezl")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("iakp", "pqqmted", "tmmjihyeozph")) + .withInnerVlans(Arrays.asList("uyqncygupkvipmd", "cwxqu", "evzhfsto")) + .withVlanGroupNames(Arrays.asList("ojujbyp", "lmcuvhixb", "xyfwnylrcool", "ttpkiwkkbnujrywv"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("urdoi", "iithtywu", "xcbihw")) + .withIpGroupNames(Arrays.asList("fdntwjchrdgoih"))) + .withEtherTypes(Arrays.asList("wct", "ndz", "luudfdlwggytsb", "tov")) + .withFragments(Arrays.asList("seinqfiuf", "qknp")) + .withIpLengths(Arrays.asList("nepttwqmsni", "fcdmqnrojlpijn", "rxfrddhc")) + .withTtlValues(Arrays.asList("izzronasxiftozqy", "hftwesgog", "zhonnxkrlgnyhmo")) + .withDscpMarkings(Arrays.asList("kkgthr")) + .withProtocolNeighbors(Arrays.asList("xjb", "hqxvcxgfrpdsofbs", "rnsvbuswd")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("nu", "vj")) + .withPortGroupNames(Arrays.asList("kfawnopqgikyz")) + .withFlags(Arrays.asList("xdyuxzejnt", "sewgioilqukr", "dxtqmieoxo", "ggufhyaomtb"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("vgrvkffo", "jzhpjbibgjmfx", "mv"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("uyovw", "nbkfezzxscy", "wzdgirujbzbo", "vzzbtdcq")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("yujviylwdshfssn", "bgye", "rymsgaojfmw", "cotmr")) + .withInnerVlans(Arrays.asList("rctym", "xoftpipiwyczu", "xacpqjli", "hyus")) + .withVlanGroupNames(Arrays.asList("asdvl", "fwdgzxulucvp"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("vxurisjnhnytxifq", "zgxmr", "ublwpcesutrg")) + .withIpGroupNames(Arrays.asList("auutpwoqhihe", "qg"))) + .withEtherTypes(Arrays.asList("nfqn", "cypsxjv", "oimwkslirc")) + .withFragments(Arrays.asList("xvydfceacvlhvygd")) + .withIpLengths(Arrays.asList("umrtwnawjsl")) + .withTtlValues(Arrays.asList("kojgcyzts", "mznbaeqphch", "nrnrp", "ehuwrykqgaifmvik")) + .withDscpMarkings(Arrays.asList("dvk")) + .withProtocolNeighbors(Arrays.asList("jdz")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("hnjivo")) + .withPortGroupNames(Arrays.asList("novqfzge", "jdftuljltd", "ceamtm", "zuo")) + .withFlags(Arrays.asList("wcw"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("knssxmojm", "vpkjpr", "kwcf", "ql"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("zheydbsdshmk") + .withRemarkComment("aehvbbxuri") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(438474543509360007L).withUnit(BitRateUnit.BPS)) + .withBurstSize(new BurstSize().withSize(6787000307588779868L).withUnit(BurstSizeUnit.KBYTES))))); model = BinaryData.fromObject(model).toObject(AccessControlListMatchConfiguration.class); - Assertions.assertEquals("qxvcxgfrpdsofb", model.matchConfigurationName()); - Assertions.assertEquals(265597434112892154L, model.sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("moxoftpi", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("vlmfwdgzxulucv", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("mrhublwpc", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("tpwoqhihejq", - model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("gzxnfaazpxdtnk", model.matchConfigurationName()); + Assertions.assertEquals(4819915655623437065L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("nvrk", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("iakp", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("uyqncygupkvipmd", + model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("ojujbyp", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ydfce", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ojgcyzt", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("dvzyybycnun", model.matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("nopqgikyzirtx", model.matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("xorgg", model.matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("yaomtb", model.matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("vwxnbkfe", model.matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ye", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("msgaoj", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dshf", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("urdoi", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("fdntwjchrdgoih", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("wct", model.matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("seinqfiuf", model.matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("nepttwqmsni", model.matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("izzronasxiftozqy", model.matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("kkgthr", model.matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("xjb", model.matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("nu", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("kfawnopqgikyz", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals("xdyuxzejnt", model.matchConditions().get(0).portCondition().flags().get(0)); + Assertions.assertEquals("vgrvkffo", model.matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); Assertions.assertEquals(AclActionType.COUNT, model.actions().get(0).type()); - Assertions.assertEquals("o", model.actions().get(0).counterName()); + Assertions.assertEquals("zheydbsdshmk", model.actions().get(0).counterName()); + Assertions.assertEquals("aehvbbxuri", model.actions().get(0).remarkComment()); + Assertions.assertEquals(438474543509360007L, model.actions().get(0).policeRateConfiguration().bitRate().rate()); + Assertions.assertEquals(BitRateUnit.BPS, model.actions().get(0).policeRateConfiguration().bitRate().unit()); + Assertions.assertEquals(6787000307588779868L, + model.actions().get(0).policeRateConfiguration().burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.KBYTES, + model.actions().get(0).policeRateConfiguration().burstSize().unit()); } } 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 index 51861fa58550..aaac15df95d2 100644 --- 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 @@ -1,29 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.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.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; 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.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -31,411 +39,519 @@ public final class AccessControlListPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListPatchProperties model = BinaryData.fromString( - "{\"annotation\":\"cpwpg\",\"configurationType\":\"File\",\"aclsUrl\":\"ivtsoxfrkenxpm\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"mpdnqqskawa\",\"sequenceNumber\":3401106758360716727,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"rtql\"],\"fragments\":[\"egnitg\",\"kxlzyqdrfeg\"],\"ipLengths\":[\"lzxwhcansy\",\"oyqhlwig\",\"ivbkbxgomfaj\"],\"ttlValues\":[\"sqvdaeyygux\",\"kjsqzhzbezkgi\"],\"dscpMarkings\":[\"dxasicddyvv\",\"skgfmocwahpq\"],\"portCondition\":{\"flags\":[\"eaahhvjhhn\",\"kzyb\",\"jjidjk\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"vxevblb\",\"ednljl\",\"geuaulx\",\"nsmjbnkppxynen\"],\"portGroupNames\":[\"xeizzg\"]},\"protocolTypes\":[\"nsrmffeycx\",\"ktp\"],\"vlanMatchCondition\":{\"vlans\":[\"rteeamm\",\"qiekkkzddrt\",\"g\",\"ojbmxv\"],\"innerVlans\":[\"efdeesve\",\"uij\"],\"vlanGroupNames\":[\"xs\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"sawddjibabxvi\",\"itvtzeexavo\",\"tfgle\",\"dmdqb\"],\"ipGroupNames\":[\"pqtgsfjac\"]}},{\"etherTypes\":[\"hhxud\",\"xvodhtnsir\",\"dhzmmesckdlp\",\"gzrcxfailcfxwmdb\"],\"fragments\":[\"fgsftufqob\",\"jln\",\"cgcckknhxkizvyt\",\"rzvul\"],\"ipLengths\":[\"aeranokqgukkjqnv\",\"roylaxxu\",\"cdisd\",\"sfjbjsvg\"],\"ttlValues\":[\"hryvy\",\"ytdc\",\"xgccknfnw\"],\"dscpMarkings\":[\"mvpdvjdhttzaef\",\"dxihc\",\"rphkmcrjdqnsdfz\"],\"portCondition\":{\"flags\":[\"gkylkdghr\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"wxezwzhok\",\"bwnhhtql\",\"ehgpp\",\"pifhpfeoajvgcxtx\"],\"portGroupNames\":[\"heafidlt\",\"gsresmkssj\"]},\"protocolTypes\":[\"ftxfkf\",\"egprhptil\"],\"vlanMatchCondition\":{\"vlans\":[\"iqtgdqoh\",\"cwsldri\"],\"innerVlans\":[\"pwbralllibphbqz\"],\"vlanGroupNames\":[\"aka\",\"ankjpdnjzh\",\"joylh\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"rimrs\",\"pteecjme\"],\"ipGroupNames\":[\"stvasylwxdzaumw\"]}},{\"etherTypes\":[\"hguuf\",\"zboyjathwt\"],\"fragments\":[\"b\",\"emwmdxmebwjs\",\"jpahlxvea\"],\"ipLengths\":[\"xnmwmqtibxyijddt\",\"qcttadijaeukmrsi\"],\"ttlValues\":[\"pndzaapmudqmeq\"],\"dscpMarkings\":[\"pibudqwyxebeybpm\"],\"portCondition\":{\"flags\":[\"tffyaqit\",\"hheioqaqhvseuf\",\"qyrxp\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"sismjqfrddga\",\"quhiosrsjuivf\",\"disyirnxz\"],\"portGroupNames\":[\"exrxzbujrtrhq\",\"wrevkhgnlnzon\",\"lrpiqywnc\"]},\"protocolTypes\":[\"szcofizeht\",\"hgbjkvrelje\",\"murvzm\",\"ov\"],\"vlanMatchCondition\":{\"vlans\":[\"shcxlpmjerbdk\",\"lvidizozs\",\"bccxjmonfdgn\",\"n\"],\"innerVlans\":[\"uuwwltv\"],\"vlanGroupNames\":[\"ctzenkeifzzhmkd\",\"svflyhbxcudch\",\"gsrboldforobw\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"fovvacqpbtuodxes\",\"abbelawumuaslzk\",\"rrwoycqucwyhahn\"],\"ipGroupNames\":[\"rkywuhpsvfuu\",\"utlwexxwla\",\"niexzsrzpgepq\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"pgdakchzyvli\"}]},{\"matchConfigurationName\":\"nrkcxkj\",\"sequenceNumber\":3323219635606642946,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"wq\",\"ntvlwijpsttexo\",\"qpwcyyufmh\"],\"fragments\":[\"cuwmqsp\"],\"ipLengths\":[\"qzhlctddunq\"],\"ttlValues\":[\"fpch\"],\"dscpMarkings\":[\"njjrcgegydcwbox\"],\"portCondition\":{\"flags\":[\"qqoli\",\"r\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ubrjtl\",\"qxfuojrngif\",\"rzpasccbiuimzdly\"],\"portGroupNames\":[\"qwmkyoquf\",\"vruzslzojhpctfnm\",\"xotngfdguge\"]},\"protocolTypes\":[\"hgrky\"],\"vlanMatchCondition\":{\"vlans\":[\"bsnmfpph\",\"jee\"],\"innerVlans\":[\"yhsgz\",\"czbgomfgbeg\",\"qgleohibetnluank\"],\"vlanGroupNames\":[\"xeeebtijvacvbmqz\",\"qqxlajr\",\"wxacevehj\",\"uyxoaf\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"eyl\",\"nm\"],\"ipGroupNames\":[\"xirpghriy\",\"oqeyhlqhykprl\",\"yznuciqd\"]}},{\"etherTypes\":[\"xiitdfuxt\"],\"fragments\":[\"iibmi\",\"bnn\",\"stgnl\",\"hnmgixhcm\"],\"ipLengths\":[\"qfoudorhcgyy\",\"rotwypundmbxhugc\",\"jkavl\"],\"ttlValues\":[\"bmftpmdt\"],\"dscpMarkings\":[\"ltfvnz\",\"yj\",\"otp\",\"opv\"],\"portCondition\":{\"flags\":[\"zq\",\"qqihedsvqwthmk\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ihsgq\",\"wdhohsdtmcdzsu\",\"cohdx\",\"zlmcmuapcvhdb\"],\"portGroupNames\":[\"qqxeyskon\",\"zinkfkbgbzbowxeq\",\"clj\"]},\"protocolTypes\":[\"vkzqk\",\"jeokbzefezrxccz\",\"rtle\",\"pqxbkwvzgnzvdf\"],\"vlanMatchCondition\":{\"vlans\":[\"xzmqpnodawop\"],\"innerVlans\":[\"wjptm\",\"gsbos\"],\"vlanGroupNames\":[\"lnd\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"biojlvf\",\"rbbpneqvcwwyy\",\"r\"],\"ipGroupNames\":[\"hppr\"]}},{\"etherTypes\":[\"nmokayzejnhlbk\",\"bzpcpiljhahzvec\",\"ndbnwieh\"],\"fragments\":[\"wjwiuub\",\"efqsfapaqtferrqw\",\"x\"],\"ipLengths\":[\"fxapjwogqqnobpu\",\"cdabtqwpwya\",\"bzasqbucljgkyexa\",\"guyaip\"],\"ttlValues\":[\"daultxijjumfq\",\"azlnqnmcjngzqdqx\",\"bjwgnyfus\"],\"dscpMarkings\":[\"vtuikzhajq\",\"lcfhmlrqryxy\"],\"portCondition\":{\"flags\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"sxwaabzm\",\"frygznmmax\"],\"portGroupNames\":[\"kzobgopxlhsln\",\"lxieixynllxecwcr\",\"jphslhcaw\",\"u\"]},\"protocolTypes\":[\"dwfmvigorqjb\",\"tzh\",\"aglkafhon\"],\"vlanMatchCondition\":{\"vlans\":[\"eickpz\",\"cpopmxel\"],\"innerVlans\":[\"ltyjedexxmlfmk\"],\"vlanGroupNames\":[\"azuawx\",\"z\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"zxrvxcus\",\"sphaivmxyasflvg\",\"gzwywak\",\"ihknsmjbl\"],\"ipGroupNames\":[\"hlnymzotq\",\"ryuzcbmqqv\",\"mv\",\"fgtayxonsup\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"nh\"},{\"type\":\"Count\",\"counterName\":\"ltnzoibgsxg\"}]},{\"matchConfigurationName\":\"fyq\",\"sequenceNumber\":6893006409525305180,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"fdbxiqxeiiqbim\"],\"fragments\":[\"wwinhehf\",\"pofvwb\",\"blembnkbwvqvxkd\",\"vqihebwtswbzuwf\"],\"ipLengths\":[\"ragegi\",\"vcjfelisdjubggb\"],\"ttlValues\":[\"kxkbsazgakgacyr\",\"m\",\"dmspof\"],\"dscpMarkings\":[\"uhrylniofr\",\"gbzjedmstkv\"],\"portCondition\":{\"flags\":[\"bcuiiz\",\"ktwfa\",\"snvpdibmi\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"bkiw\"],\"portGroupNames\":[\"n\",\"ophzfylsgcrp\",\"bcunezzceze\"]},\"protocolTypes\":[\"yfwlwxjwet\"],\"vlanMatchCondition\":{\"vlans\":[\"hclafzvaylptrs\",\"qwztcmwqkc\"],\"innerVlans\":[\"waxfewzjkj\",\"xfdeqvhpsyl\",\"ksh\"],\"vlanGroupNames\":[\"f\",\"bmxzjrgywwpg\",\"xs\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"cg\",\"aoepttaqutdew\"],\"ipGroupNames\":[\"swvr\",\"unzzjgehk\"]}},{\"etherTypes\":[\"m\"],\"fragments\":[\"xokffqyin\",\"jqepqwhi\",\"monstshiyxgve\"],\"ipLengths\":[\"lduccbi\",\"ds\"],\"ttlValues\":[\"cobiegstmninwjiz\",\"i\"],\"dscpMarkings\":[\"hgshe\",\"jtbxqmuluxlx\",\"zvners\",\"ycucrwnamikzeb\"],\"portCondition\":{\"flags\":[\"mswziq\",\"fuhok\",\"ruswhv\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"fbycjs\",\"jww\"],\"portGroupNames\":[\"vumwmxqh\"]},\"protocolTypes\":[\"noamldsehaohdj\",\"hflzokxco\",\"pelnjetag\"],\"vlanMatchCondition\":{\"vlans\":[\"oatftgzpnpbswvef\"],\"innerVlans\":[\"cs\",\"mozi\",\"m\",\"pgawtxxpkyjcxcjx\"],\"vlanGroupNames\":[\"tfmpcycilrmcayk\",\"gnoxuztrksx\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"nznthjtw\",\"jaosrxuzv\"],\"ipGroupNames\":[\"ktcqio\",\"mgbzahgxqdlyrtl\",\"laprlt\",\"katbhjm\"]}},{\"etherTypes\":[\"bsoqeqala\",\"vlagun\",\"tgfebwln\"],\"fragments\":[\"yreeudz\",\"av\"],\"ipLengths\":[\"qmjxlyyzglgouwtl\",\"jjyuojqtobax\"],\"ttlValues\":[\"ytunlbfjkwr\"],\"dscpMarkings\":[\"kqbh\",\"y\",\"qunjqh\"],\"portCondition\":{\"flags\":[\"aulk\",\"akdkifmjnnawtqab\",\"xuckpggqoweyir\",\"hlisngw\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"izruwnpqxpxiwfc\",\"gjsaasiixtm\",\"zjvkviirhgfgrws\",\"pgratzvzbglbyvi\"],\"portGroupNames\":[\"tbrxkjz\",\"rgxffmshkw\",\"bkgozxwopdbydpi\",\"qaclnapxbiy\"]},\"protocolTypes\":[\"gjkn\",\"smfcttuxuuyilfl\"],\"vlanMatchCondition\":{\"vlans\":[\"uvr\",\"hmrnjhvsuj\"],\"innerVlans\":[\"zytqjtwhauunfpr\",\"jletlxsmrpddo\",\"ifamowazi\",\"nknlqwzdvpi\"],\"vlanGroupNames\":[\"qszdtmaajquhuxyl\",\"jvmtygjbmz\",\"ospspshckf\",\"yjpmspbpssdfppyo\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"vczkcnyxrxmunjd\",\"vg\",\"nkvxlxpaglqi\"],\"ipGroupNames\":[\"kc\",\"khpzvuqdflv\",\"niypfpubcpzg\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"j\"},{\"type\":\"Count\",\"counterName\":\"ibg\"},{\"type\":\"Drop\",\"counterName\":\"p\"},{\"type\":\"Drop\",\"counterName\":\"ov\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"mhha\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"zvuporqzdfuydz\",\"kfvxcnq\"]},{\"name\":\"qpswokmvkhlggdhb\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"zszuwiwtglxx\"]},{\"name\":\"jfpgpicrmn\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"qgjsxvpqcbfrmbod\",\"hsqqgvriibakcl\",\"c\"]}],\"vlanGroups\":[{\"name\":\"xousxauzl\",\"vlans\":[\"gmwohqfzizvu\",\"mmkjsvthnwpztek\"]},{\"name\":\"mribiat\",\"vlans\":[\"lu\",\"fotang\",\"fhnykzcugs\",\"vxwlmzqwmvtxnj\"]},{\"name\":\"mcuqudtcvc\",\"vlans\":[\"npdkv\",\"fabuiyjibu\",\"phdu\"]},{\"name\":\"eiknpgo\",\"vlans\":[\"iuqhibtozipqwj\",\"d\",\"urrxxgewpktv\"]}],\"portGroups\":[{\"name\":\"mqpzoyhlfbcgw\",\"ports\":[\"oxoebqi\",\"jipnwj\",\"ujqlafcbahh\"]}]},{\"ipGroups\":[{\"name\":\"foiyjwpfilk\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"l\",\"dndviauogp\"]},{\"name\":\"artvti\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"chnmna\",\"mnxhkxjqirwrweo\"]}],\"vlanGroups\":[{\"name\":\"i\",\"vlans\":[\"wrsnewmozqvbu\",\"qmamhsycxhxzga\"]},{\"name\":\"taboidvmf\",\"vlans\":[\"pubowsepdfg\"]}],\"portGroups\":[{\"name\":\"herngb\",\"ports\":[\"uahokq\",\"obkauxofsh\",\"phwpnulaiywzej\"]},{\"name\":\"hs\",\"ports\":[\"ojpllndnpdwrpqaf\"]},{\"name\":\"ug\",\"ports\":[\"fhyete\"]},{\"name\":\"pococtfjgt\",\"ports\":[\"jvzuy\",\"urmlmuo\"]}]}]}") + "{\"configurationType\":\"File\",\"aclsUrl\":\"xubyjaffmmfblcqc\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"brta\",\"sequenceNumber\":7512883533272533061,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"lqxihhrmooiz\",\"seypxiutcxapz\"],\"vlanMatchCondition\":{\"vlans\":[\"etoge\",\"joxslhvnhla\",\"rqnkkzjcjbtr\"],\"innerVlans\":[\"hvv\",\"brxjjsto\"],\"vlanGroupNames\":[\"it\",\"kxzt\",\"oobklftidgfcwq\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"hemjy\"],\"ipGroupNames\":[\"uj\",\"wtwko\",\"zwculkbawpfajnj\",\"ltlwtjjguktalhs\"]},\"etherTypes\":[\"cdmxzrpoaiml\",\"wiaaomylweaz\",\"lcsethwwnpj\",\"l\"],\"fragments\":[\"wpchwahf\",\"ousnfepgfewe\",\"wlyxgncxyk\",\"hdjhlimmbcx\"],\"ipLengths\":[\"cporxvxcjz\",\"qizxfpxtgqscjavf\",\"juhdqazkmtgguwpi\",\"r\"],\"ttlValues\":[\"ivmmghfcfiwrxgk\",\"euvyinzqodfvpgs\"],\"dscpMarkings\":[\"gsgbpfgzdjt\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"gaqvlgafcqusrd\"],\"portGroupNames\":[\"nwsdtutnwlduyc\"],\"flags\":[\"hyrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\"]},\"protocolNeighbors\":[\"mun\",\"qsxvmhf\"],\"icmpConfiguration\":{\"icmpTypes\":[\"yihsasbhudypohyu\",\"ms\",\"ynsqyrpfoobr\",\"ttymsjny\"]}},{\"protocolTypes\":[\"nfwqzdzgtilaxhn\",\"hqlyvijo\",\"wivkxo\"],\"vlanMatchCondition\":{\"vlans\":[\"bixxrt\",\"kvcpwpgclr\"],\"innerVlans\":[\"tso\",\"frkenxpmyyefrp\"],\"vlanGroupNames\":[\"nqqs\",\"awaoqvmmbnpqfrt\",\"lkzmegnitgvkxl\",\"yqdrf\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"whcans\"],\"ipGroupNames\":[\"yqhlwigdivbkbx\",\"omfaj\"]},\"etherTypes\":[\"sqvdaeyygux\",\"kjsqzhzbezkgi\"],\"fragments\":[\"dxasicddyvv\",\"skgfmocwahpq\"],\"ipLengths\":[\"jeaahhvjhh\",\"akz\",\"bbjjidjksyxk\"],\"ttlValues\":[\"xevbl\",\"jednlj\"],\"dscpMarkings\":[\"euaulxu\",\"smjbnkppxyn\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"zzgwklnsrm\",\"feycxcktp\"],\"portGroupNames\":[\"erteeammxqiekk\",\"zddrt\",\"g\",\"ojbmxv\"],\"flags\":[\"efdeesve\",\"uij\"]},\"protocolNeighbors\":[\"xs\"],\"icmpConfiguration\":{\"icmpTypes\":[\"tujwsawdd\",\"ibabxvititvtzeex\",\"vo\",\"tfgle\"]}},{\"protocolTypes\":[\"dqbwpypqtgsfja\"],\"vlanMatchCondition\":{\"vlans\":[\"hhxud\",\"xvodhtnsir\",\"dhzmmesckdlp\",\"gzrcxfailcfxwmdb\"],\"innerVlans\":[\"fgsftufqob\",\"jln\",\"cgcckknhxkizvyt\",\"rzvul\"],\"vlanGroupNames\":[\"aeranokqgukkjqnv\",\"roylaxxu\",\"cdisd\",\"sfjbjsvg\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"cytdclxgccknfnwm\"],\"ipGroupNames\":[\"vpdvjdhttzae\",\"edxihchrphkmcrj\",\"qnsdfzpbgtgky\",\"kdghrjeuutlwx\"]},\"etherTypes\":[\"zhokvbwnhh\"],\"fragments\":[\"gehgppi\",\"ifhpf\"],\"ipLengths\":[\"jvgcxtx\",\"csheafidltugsr\",\"smkss\",\"h\"],\"ttlValues\":[\"txfkfweg\",\"rhptilluc\"],\"dscpMarkings\":[\"tgdqohmcwsldriz\",\"tpwb\",\"a\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"qzmiza\",\"a\",\"ankjpdnjzh\"],\"portGroupNames\":[\"ylhjlm\",\"oyxprimr\",\"opteecj\",\"eislstvasylwx\"],\"flags\":[\"umweoohguufuzboy\",\"athwt\",\"olbaemwmdx\",\"ebwjscjpahlxvea\"]},\"protocolNeighbors\":[\"xnmwmqtibxyijddt\",\"qcttadijaeukmrsi\"],\"icmpConfiguration\":{\"icmpTypes\":[\"ndzaapmudq\",\"eqw\",\"gp\",\"bu\"]}},{\"protocolTypes\":[\"yxeb\",\"ybpmzznrtffyaq\",\"tmhheioqa\"],\"vlanMatchCondition\":{\"vlans\":[\"eufuqyrxpdlcgql\",\"ismjqfrddgamqu\"],\"innerVlans\":[\"srsjuivfc\"],\"vlanGroupNames\":[\"yirnxzhcz\",\"xrxzbujrtr\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"h\"],\"ipGroupNames\":[\"nzonzl\",\"piqywnc\",\"jtszcof\",\"zehtdhgb\"]},\"etherTypes\":[\"reljeamur\",\"zmlovuanash\"],\"fragments\":[\"pmjerbdkelvidiz\",\"zsdbccxjmon\"],\"ipLengths\":[\"nwncypuuw\",\"ltv\",\"qjctzenkeif\",\"zhmkdasvflyh\"],\"ttlValues\":[\"udchxgsrboldforo\"],\"dscpMarkings\":[\"lvizb\",\"hfovvacqpbtu\",\"dxe\",\"zab\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"aslzkwr\"],\"portGroupNames\":[\"ycqucwyh\",\"hnomdrkywuh\"],\"flags\":[\"fuurutlwexx\",\"lalniex\"]},\"protocolNeighbors\":[\"zpgepqty\",\"bwwpgdakchzy\"],\"icmpConfiguration\":{\"icmpTypes\":[\"q\",\"rkcxkj\"]}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"suxswqrntvlwijp\",\"remarkComment\":\"texoqqpwc\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"hruncuwmq\",\"sequenceNumber\":469055567429126756,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"tddunqnd\",\"fpch\"],\"vlanMatchCondition\":{\"vlans\":[\"jjrcgegydc\",\"boxjumvq\",\"olihrra\",\"ouau\"],\"innerVlans\":[\"tloqxfuojrn\"],\"vlanGroupNames\":[\"l\",\"z\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"imzdlyj\",\"fqwmkyoquf\",\"vruzslzojhpctfnm\"],\"ipGroupNames\":[\"tngfdgugeyzihgr\",\"yui\"]},\"etherTypes\":[\"snmfpphojeevy\",\"yhsgz\"],\"fragments\":[\"bgomfgbegl\",\"gleohi\",\"etnluankrrfx\"],\"ipLengths\":[\"btijvacvbm\",\"z\",\"qqxlajr\",\"wxacevehj\"],\"ttlValues\":[\"xoafgaoqltfae\",\"linmfgv\"],\"dscpMarkings\":[\"pghriypoqeyhl\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"yznuciqd\",\"mexiitdfuxt\",\"asiibmiybnnust\"],\"portGroupNames\":[\"jh\",\"mgixhcmavmqfou\",\"or\",\"cgyypro\"],\"flags\":[\"pundmbxhug\",\"mjkavlgorbmft\",\"mdtzfjltfvnzc\"]},\"protocolNeighbors\":[\"otp\"],\"icmpConfiguration\":{\"icmpTypes\":[\"pbdbzqgqqi\",\"edsvqwthmk\",\"ibcysihsgqc\"]}},{\"protocolTypes\":[\"ohsdtmcd\",\"sufco\"],\"vlanMatchCondition\":{\"vlans\":[\"zlmcmuapcvhdb\",\"v\"],\"innerVlans\":[\"xeyskonqzinkfkbg\",\"z\"],\"vlanGroupNames\":[\"xeqoc\",\"jmygvk\",\"qkjjeokbz\",\"fezrx\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"ipqxbkwvzgnzv\"],\"ipGroupNames\":[\"zdix\",\"mqpnoda\"]},\"etherTypes\":[\"qhewj\"],\"fragments\":[\"cgsbost\",\"eln\",\"la\",\"utmzlbiojlvfhrbb\"],\"ipLengths\":[\"qvcww\",\"yurmochpprprs\",\"mo\",\"ayzejnhlbkpbz\"],\"ttlValues\":[\"iljhahz\",\"echndbnwieholew\",\"wiuub\"],\"dscpMarkings\":[\"qsfapaqt\",\"e\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"mfxapjwogqqno\"],\"portGroupNames\":[\"dcdab\",\"qwpwyawbzasqbuc\",\"jg\",\"yexaoguy\"],\"flags\":[\"ids\"]},\"protocolNeighbors\":[\"ltxijjumfqwazln\",\"nm\",\"jng\"],\"icmpConfiguration\":{\"icmpTypes\":[\"xtbjwgnyfusfzsv\",\"uik\",\"hajqglcfh\"]}},{\"protocolTypes\":[\"qryxyn\",\"nzrdpsovwxz\",\"ptgoeiybbabp\"],\"vlanMatchCondition\":{\"vlans\":[\"slkvntjl\"],\"innerVlans\":[\"jkskyr\",\"oov\",\"idsxwaabzmifry\"],\"vlanGroupNames\":[\"mmaxrizkzobgo\",\"xlhslnel\",\"ieixynllxe\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"slhcawjutifd\",\"fmvigorqjbttzh\"],\"ipGroupNames\":[\"lkafhonqjuje\"]},\"etherTypes\":[\"pzvcpopmxelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"],\"fragments\":[\"puamwabzxr\"],\"ipLengths\":[\"ushsp\"],\"ttlValues\":[\"v\",\"xyasflvgsgzw\",\"wakoihkn\"],\"dscpMarkings\":[\"blmljh\",\"nymzotqyr\",\"uzcbmqq\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ayxonsupeujl\"],\"portGroupNames\":[\"hcvsqltnzoi\"],\"flags\":[\"xgnxfyqonmpqoxwd\",\"fdbxiqxeiiqbim\"]},\"protocolNeighbors\":[\"wwinhehf\",\"pofvwb\",\"blembnkbwvqvxkd\",\"vqihebwtswbzuwf\"],\"icmpConfiguration\":{\"icmpTypes\":[\"agegiz\",\"cjfelisdjubgg\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"kbsazgak\",\"remarkComment\":\"cyrcmjdmspo\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"PoliceRate\",\"counterName\":\"ylnio\",\"remarkComment\":\"zgb\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"PoliceRate\",\"counterName\":\"kvnlvxbcuiiznkt\",\"remarkComment\":\"ansnvp\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"kostbzbki\",\"sequenceNumber\":3332563211958829561,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"fy\",\"sgcrpfbcunezzce\"],\"vlanMatchCondition\":{\"vlans\":[\"w\",\"fwlwxjwetnps\",\"hclafzvaylptrs\"],\"innerVlans\":[\"ztcmwq\",\"chcxwaxfewzj\",\"jexfdeqvhp\"],\"vlanGroupNames\":[\"kkshkbffm\",\"mxzjrgywwpgjx\",\"nptfujgi\",\"gaao\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"dewemxswv\",\"uun\",\"zjgehkfkim\",\"tixo\"],\"ipGroupNames\":[\"qyinl\",\"qepqwhixmon\",\"tshi\"]},\"etherTypes\":[\"velfcldu\",\"cb\"],\"fragments\":[\"svu\"],\"ipLengths\":[\"b\"],\"ttlValues\":[\"stmninwjizcilng\",\"gshejjtbxqmulux\",\"xqzv\",\"ers\"],\"dscpMarkings\":[\"ucrwnami\",\"ze\",\"rqbsmswziq\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"uswhvhczznvfbycj\",\"xjww\"],\"portGroupNames\":[\"vumwmxqh\"],\"flags\":[\"noamldsehaohdj\",\"hflzokxco\",\"pelnjetag\"]},\"protocolNeighbors\":[\"xo\"],\"icmpConfiguration\":{\"icmpTypes\":[\"g\",\"pnpbswveflocc\"]}},{\"protocolTypes\":[\"ozihmipgawt\"],\"vlanMatchCondition\":{\"vlans\":[\"y\"],\"innerVlans\":[\"cjxgrytf\",\"pcycilrmcaykg\",\"noxuztrksx\",\"pndfcpfnznt\"],\"vlanGroupNames\":[\"wkjaos\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ktcqio\",\"mgbzahgxqdlyrtl\",\"laprlt\",\"katbhjm\"],\"ipGroupNames\":[\"bsoqeqala\",\"vlagun\",\"tgfebwln\"]},\"etherTypes\":[\"yreeudz\",\"av\"],\"fragments\":[\"qmjxlyyzglgouwtl\",\"jjyuojqtobax\"],\"ipLengths\":[\"ytunlbfjkwr\"],\"ttlValues\":[\"kqbh\",\"y\",\"qunjqh\"],\"dscpMarkings\":[\"xaulkpakdkifmjnn\",\"wtqabpxuckp\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"rdhlis\"],\"portGroupNames\":[\"fl\"],\"flags\":[\"pizruwnpqxpxiw\",\"cng\"]},\"protocolNeighbors\":[\"asi\"],\"icmpConfiguration\":{\"icmpTypes\":[\"kzjv\",\"viirhgfgrws\",\"pgratzvzbglbyvi\"]}},{\"protocolTypes\":[\"tbrxkjz\",\"rgxffmshkw\",\"bkgozxwopdbydpi\",\"qaclnapxbiy\"],\"vlanMatchCondition\":{\"vlans\":[\"j\"],\"innerVlans\":[\"smfcttuxuuyilfl\",\"oiquvrehmrnjhvs\",\"jztczytqj\",\"w\"],\"vlanGroupNames\":[\"unfprnjletlxs\",\"rpddouifamo\",\"aziynknlqwzdv\",\"iwhxqszdtmaajq\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"vmtygj\",\"mzyospspshck\",\"kyjpmspbps\"],\"ipGroupNames\":[\"ppyo\",\"tieyujtvczkcny\",\"rxmunjdxvgln\",\"vxlx\"]},\"etherTypes\":[\"lqivbgkcv\",\"hpzvuqdflvoniyp\",\"pubcpzgpxtivhjk\"],\"fragments\":[\"ibg\",\"jxgpnrhgovfg\",\"ik\",\"mhha\"],\"ipLengths\":[\"rmzvupo\",\"qzdfuydzvkfvxcn\",\"mx\"],\"ttlValues\":[\"wokmvkhlggd\",\"bemzqkzszuwi\"],\"dscpMarkings\":[\"lxxhljfp\",\"picrmnzhrgmqgjsx\",\"pqcbfrmbodthsq\",\"gvriibakclac\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"xauzlwvsgmwohqfz\",\"zvuxm\",\"kjsvthnwpzteko\",\"mribiat\"],\"portGroupNames\":[\"lu\",\"fotang\",\"fhnykzcugs\",\"vxwlmzqwmvtxnj\"],\"flags\":[\"cuqudtcvclxy\",\"pdkvg\",\"abuiy\"]},\"protocolNeighbors\":[\"uzphdugnei\",\"n\",\"gox\"],\"icmpConfiguration\":{\"icmpTypes\":[\"qhibtozipqwjedm\"]}}],\"actions\":[{\"type\":\"Remark\",\"counterName\":\"ewpktvqy\",\"remarkComment\":\"mqpzoyhlfbcgw\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"injipnwjf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"fcbahhp\",\"pofoi\"]},{\"name\":\"w\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"mkkho\",\"vdndviauo\",\"phuartv\"]},{\"name\":\"ukyefchnmnahmnxh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rwrweooxffi\",\"hx\"]}],\"vlanGroups\":[{\"name\":\"ewmozqvbu\",\"vlans\":[\"amhsycxhxzgazt\"]},{\"name\":\"boi\",\"vlans\":[\"fqhppubowsep\",\"fgkmtdhern\",\"btcjuah\"]},{\"name\":\"qtobkauxo\",\"vlans\":[\"fphwpnu\",\"aiywzejywhsl\",\"koj\",\"llndnpd\"]}],\"portGroups\":[{\"name\":\"afgfugsnn\",\"ports\":[\"et\",\"fypococtfjgti\"]},{\"name\":\"jvzuy\",\"ports\":[\"mlmuowol\",\"au\"]},{\"name\":\"opionszon\",\"ports\":[\"gajinnixjawrtmj\",\"jmyccxlzhcoxov\",\"ekhenl\",\"sfnrdtjxt\"]},{\"name\":\"dcqtjvidttge\",\"ports\":[\"lvyjtcvuwkas\",\"zies\",\"uughtuqfecjxeyg\",\"uhxu\"]}]},{\"ipGroups\":[{\"name\":\"ewmrswnjlxu\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"usxjbaqehg\",\"dohzjq\"]}],\"vlanGroups\":[{\"name\":\"o\",\"vlans\":[\"bxncnwfepbnw\"]},{\"name\":\"m\",\"vlans\":[\"cgbjbgdlfgt\",\"y\"]}],\"portGroups\":[{\"name\":\"uflqbctq\",\"ports\":[\"zjrwdkqze\"]},{\"name\":\"jleziunjx\",\"ports\":[\"antkwcegyamlbns\",\"qa\",\"jjvpilguooqja\"]},{\"name\":\"d\",\"ports\":[\"ueio\",\"kjbsah\",\"tdtpdelqacslmo\",\"oebn\"]}]},{\"ipGroups\":[{\"name\":\"vcjkgd\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"txejwabm\"]}],\"vlanGroups\":[{\"name\":\"mvcopexcmjurbuhh\",\"vlans\":[\"ql\",\"qsrogt\"]},{\"name\":\"kffdjktsys\",\"vlans\":[\"vclglxnfuij\"]}],\"portGroups\":[{\"name\":\"sqo\",\"ports\":[\"ikayiansharuj\",\"ji\",\"xfz\",\"j\"]},{\"name\":\"tvwkpqhjpenu\",\"ports\":[\"qeqqekewvnqvcdl\",\"uaucmf\",\"jwnlax\",\"un\"]},{\"name\":\"ikczvvitacgxmf\",\"ports\":[\"er\",\"htvs\"]}]}],\"aclType\":\"Management\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"annotation\":\"gqrsxypruuu\"}") .toObject(AccessControlListPatchProperties.class); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("ivtsoxfrkenxpm", model.aclsUrl()); + Assertions.assertEquals("xubyjaffmmfblcqc", model.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("mpdnqqskawa", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3401106758360716727L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("nsrmffeycx", + Assertions.assertEquals("brta", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7512883533272533061L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("lqxihhrmooiz", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("rteeamm", + Assertions.assertEquals("etoge", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("efdeesve", + Assertions.assertEquals("hvv", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("xs", + Assertions.assertEquals("it", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("sawddjibabxvi", + Assertions.assertEquals("hemjy", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("pqtgsfjac", + Assertions.assertEquals("uj", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("rtql", + Assertions.assertEquals("cdmxzrpoaiml", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("egnitg", + Assertions.assertEquals("wpchwahf", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("lzxwhcansy", + Assertions.assertEquals("cporxvxcjz", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("sqvdaeyygux", + Assertions.assertEquals("ivmmghfcfiwrxgk", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("dxasicddyvv", + Assertions.assertEquals("gsgbpfgzdjt", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("vxevblb", + Assertions.assertEquals("gaqvlgafcqusrd", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("xeizzg", + Assertions.assertEquals("nwsdtutnwlduyc", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("eaahhvjhhn", + Assertions.assertEquals("hyrmewipmvekdx", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("pgdakchzyvli", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("mhha", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, + Assertions.assertEquals("mun", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("yihsasbhudypohyu", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("suxswqrntvlwijp", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("texoqqpwc", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("injipnwjf", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("zvuporqzdfuydz", + Assertions.assertEquals("fcbahhp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("xousxauzl", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("gmwohqfzizvu", + Assertions.assertEquals("ewmozqvbu", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("amhsycxhxzgazt", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("mqpzoyhlfbcgw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("oxoebqi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("cpwpg", model.annotation()); + Assertions.assertEquals("afgfugsnn", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("et", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.MANAGEMENT, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals("gqrsxypruuu", model.annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessControlListPatchProperties model = new AccessControlListPatchProperties().withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("ivtsoxfrkenxpm") + .withAclsUrl("xubyjaffmmfblcqc") .withDefaultAction(CommunityActionTypes.PERMIT) .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("mpdnqqskawa") - .withSequenceNumber(3401106758360716727L) - .withIpAddressType(IpAddressType.IPV6) + new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("brta") + .withSequenceNumber(7512883533272533061L) + .withIpAddressType(IPAddressType.IPV4) .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("nsrmffeycx", "ktp")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("rteeamm", "qiekkkzddrt", "g", "ojbmxv")) - .withInnerVlans(Arrays.asList("efdeesve", "uij")) - .withVlanGroupNames(Arrays.asList("xs"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("sawddjibabxvi", "itvtzeexavo", "tfgle", "dmdqb")) - .withIpGroupNames(Arrays.asList("pqtgsfjac"))) - .withEtherTypes(Arrays.asList("rtql")) - .withFragments(Arrays.asList("egnitg", "kxlzyqdrfeg")) - .withIpLengths(Arrays.asList("lzxwhcansy", "oyqhlwig", "ivbkbxgomfaj")) - .withTtlValues(Arrays.asList("sqvdaeyygux", "kjsqzhzbezkgi")) - .withDscpMarkings(Arrays.asList("dxasicddyvv", "skgfmocwahpq")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("lqxihhrmooiz", "seypxiutcxapz")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("etoge", "joxslhvnhla", "rqnkkzjcjbtr")) + .withInnerVlans(Arrays.asList("hvv", "brxjjsto")) + .withVlanGroupNames(Arrays.asList("it", "kxzt", "oobklftidgfcwq"))) + .withIpCondition(new IpMatchConditionPatch() + .withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("hemjy")) + .withIpGroupNames( + Arrays.asList("uj", "wtwko", "zwculkbawpfajnj", "ltlwtjjguktalhs"))) + .withEtherTypes(Arrays.asList("cdmxzrpoaiml", "wiaaomylweaz", "lcsethwwnpj", "l")) + .withFragments(Arrays.asList("wpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx")) + .withIpLengths(Arrays.asList("cporxvxcjz", "qizxfpxtgqscjavf", "juhdqazkmtgguwpi", "r")) + .withTtlValues(Arrays.asList("ivmmghfcfiwrxgk", "euvyinzqodfvpgs")) + .withDscpMarkings(Arrays.asList("gsgbpfgzdjt")) + .withPortCondition(new AccessControlListPortConditionPatch() + .withPortType(PortType.BIDIRECTIONAL) .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("vxevblb", "ednljl", "geuaulx", "nsmjbnkppxynen")) - .withPortGroupNames(Arrays.asList("xeizzg")) - .withFlags(Arrays.asList("eaahhvjhhn", "kzyb", "jjidjk"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ftxfkf", "egprhptil")) + .withPorts(Arrays.asList("gaqvlgafcqusrd")) + .withPortGroupNames(Arrays.asList("nwsdtutnwlduyc")) + .withFlags(Arrays.asList("hyrmewipmvekdx", "kuqgsjjxundxgket", "zhhzjhfjmhvvmu"))) + .withProtocolNeighbors(Arrays.asList("mun", "qsxvmhf")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("yihsasbhudypohyu", "ms", "ynsqyrpfoobr", + "ttymsjny"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("nfwqzdzgtilaxhn", "hqlyvijo", "wivkxo")) .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("iqtgdqoh", "cwsldri")) - .withInnerVlans(Arrays.asList("pwbralllibphbqz")) - .withVlanGroupNames(Arrays.asList("aka", "ankjpdnjzh", "joylh"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("rimrs", "pteecjme")) - .withIpGroupNames(Arrays.asList("stvasylwxdzaumw"))) - .withEtherTypes( - Arrays.asList("hhxud", "xvodhtnsir", "dhzmmesckdlp", "gzrcxfailcfxwmdb")) - .withFragments(Arrays.asList("fgsftufqob", "jln", "cgcckknhxkizvyt", "rzvul")) - .withIpLengths(Arrays.asList("aeranokqgukkjqnv", "roylaxxu", "cdisd", "sfjbjsvg")) - .withTtlValues(Arrays.asList("hryvy", "ytdc", "xgccknfnw")) - .withDscpMarkings(Arrays.asList("mvpdvjdhttzaef", "dxihc", "rphkmcrjdqnsdfz")) - .withPortCondition(new AccessControlListPortCondition() + new VlanMatchConditionPatch().withVlans(Arrays.asList("bixxrt", "kvcpwpgclr")) + .withInnerVlans(Arrays.asList("tso", "frkenxpmyyefrp")) + .withVlanGroupNames( + Arrays.asList("nqqs", "awaoqvmmbnpqfrt", "lkzmegnitgvkxl", "yqdrf"))) + .withIpCondition( + new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("whcans")) + .withIpGroupNames(Arrays.asList("yqhlwigdivbkbx", "omfaj"))) + .withEtherTypes(Arrays.asList("sqvdaeyygux", "kjsqzhzbezkgi")) + .withFragments(Arrays.asList("dxasicddyvv", "skgfmocwahpq")) + .withIpLengths(Arrays.asList("jeaahhvjhh", "akz", "bbjjidjksyxk")) + .withTtlValues(Arrays.asList("xevbl", "jednlj")) + .withDscpMarkings(Arrays.asList("euaulxu", "smjbnkppxyn")) + .withPortCondition(new AccessControlListPortConditionPatch() .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("wxezwzhok", "bwnhhtql", "ehgpp", "pifhpfeoajvgcxtx")) - .withPortGroupNames(Arrays.asList("heafidlt", "gsresmkssj")) - .withFlags(Arrays.asList("gkylkdghr"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("szcofizeht", "hgbjkvrelje", "murvzm", "ov")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("shcxlpmjerbdk", "lvidizozs", "bccxjmonfdgn", "n")) - .withInnerVlans(Arrays.asList("uuwwltv")) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("zzgwklnsrm", "feycxcktp")) + .withPortGroupNames(Arrays.asList("erteeammxqiekk", "zddrt", "g", "ojbmxv")) + .withFlags(Arrays.asList("efdeesve", "uij"))) + .withProtocolNeighbors(Arrays.asList("xs")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("tujwsawdd", "ibabxvititvtzeex", "vo", "tfgle"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("dqbwpypqtgsfja")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("hhxud", "xvodhtnsir", "dhzmmesckdlp", "gzrcxfailcfxwmdb")) + .withInnerVlans(Arrays.asList("fgsftufqob", "jln", "cgcckknhxkizvyt", "rzvul")) .withVlanGroupNames( - Arrays.asList("ctzenkeifzzhmkd", "svflyhbxcudch", "gsrboldforobw"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("fovvacqpbtuodxes", "abbelawumuaslzk", "rrwoycqucwyhahn")) - .withIpGroupNames(Arrays.asList("rkywuhpsvfuu", "utlwexxwla", "niexzsrzpgepq"))) - .withEtherTypes(Arrays.asList("hguuf", "zboyjathwt")) - .withFragments(Arrays.asList("b", "emwmdxmebwjs", "jpahlxvea")) - .withIpLengths(Arrays.asList("xnmwmqtibxyijddt", "qcttadijaeukmrsi")) - .withTtlValues(Arrays.asList("pndzaapmudqmeq")) - .withDscpMarkings(Arrays.asList("pibudqwyxebeybpm")) - .withPortCondition(new AccessControlListPortCondition() + Arrays.asList("aeranokqgukkjqnv", "roylaxxu", "cdisd", "sfjbjsvg"))) + .withIpCondition( + new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("cytdclxgccknfnwm")) + .withIpGroupNames(Arrays.asList("vpdvjdhttzae", "edxihchrphkmcrj", + "qnsdfzpbgtgky", "kdghrjeuutlwx"))) + .withEtherTypes(Arrays.asList("zhokvbwnhh")) + .withFragments(Arrays.asList("gehgppi", "ifhpf")) + .withIpLengths(Arrays.asList("jvgcxtx", "csheafidltugsr", "smkss", "h")) + .withTtlValues(Arrays.asList("txfkfweg", "rhptilluc")) + .withDscpMarkings(Arrays.asList("tgdqohmcwsldriz", "tpwb", "a")) + .withPortCondition(new AccessControlListPortConditionPatch() .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("qzmiza", "a", "ankjpdnjzh")) + .withPortGroupNames(Arrays.asList("ylhjlm", "oyxprimr", "opteecj", "eislstvasylwx")) + .withFlags( + Arrays.asList("umweoohguufuzboy", "athwt", "olbaemwmdx", "ebwjscjpahlxvea"))) + .withProtocolNeighbors(Arrays.asList("xnmwmqtibxyijddt", "qcttadijaeukmrsi")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("ndzaapmudq", "eqw", "gp", "bu"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("yxeb", "ybpmzznrtffyaq", "tmhheioqa")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("eufuqyrxpdlcgql", "ismjqfrddgamqu")) + .withInnerVlans(Arrays.asList("srsjuivfc")) + .withVlanGroupNames(Arrays.asList("yirnxzhcz", "xrxzbujrtr"))) + .withIpCondition( + new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("h")) + .withIpGroupNames(Arrays.asList("nzonzl", "piqywnc", "jtszcof", "zehtdhgb"))) + .withEtherTypes(Arrays.asList("reljeamur", "zmlovuanash")) + .withFragments(Arrays.asList("pmjerbdkelvidiz", "zsdbccxjmon")) + .withIpLengths(Arrays.asList("nwncypuuw", "ltv", "qjctzenkeif", "zhmkdasvflyh")) + .withTtlValues(Arrays.asList("udchxgsrboldforo")) + .withDscpMarkings(Arrays.asList("lvizb", "hfovvacqpbtu", "dxe", "zab")) + .withPortCondition( + new AccessControlListPortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("aslzkwr")) + .withPortGroupNames(Arrays.asList("ycqucwyh", "hnomdrkywuh")) + .withFlags(Arrays.asList("fuurutlwexx", "lalniex"))) + .withProtocolNeighbors(Arrays.asList("zpgepqty", "bwwpgdakchzy")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("q", "rkcxkj"))))) + .withActions( + Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("suxswqrntvlwijp") + .withRemarkComment("texoqqpwc") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("hruncuwmq") + .withSequenceNumber(469055567429126756L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("tddunqnd", "fpch")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("jjrcgegydc", "boxjumvq", "olihrra", "ouau")) + .withInnerVlans(Arrays.asList("tloqxfuojrn")) + .withVlanGroupNames(Arrays.asList("l", "z"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("imzdlyj", "fqwmkyoquf", "vruzslzojhpctfnm")) + .withIpGroupNames(Arrays.asList("tngfdgugeyzihgr", "yui"))) + .withEtherTypes(Arrays.asList("snmfpphojeevy", "yhsgz")) + .withFragments(Arrays.asList("bgomfgbegl", "gleohi", "etnluankrrfx")) + .withIpLengths(Arrays.asList("btijvacvbm", "z", "qqxlajr", "wxacevehj")) + .withTtlValues(Arrays.asList("xoafgaoqltfae", "linmfgv")) + .withDscpMarkings(Arrays.asList("pghriypoqeyhl")) + .withPortCondition( + new AccessControlListPortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("yznuciqd", "mexiitdfuxt", "asiibmiybnnust")) + .withPortGroupNames(Arrays.asList("jh", "mgixhcmavmqfou", "or", "cgyypro")) + .withFlags(Arrays.asList("pundmbxhug", "mjkavlgorbmft", "mdtzfjltfvnzc"))) + .withProtocolNeighbors(Arrays.asList("otp")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("pbdbzqgqqi", "edsvqwthmk", "ibcysihsgqc"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("ohsdtmcd", "sufco")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("zlmcmuapcvhdb", "v")) + .withInnerVlans(Arrays.asList("xeyskonqzinkfkbg", "z")) + .withVlanGroupNames(Arrays.asList("xeqoc", "jmygvk", "qkjjeokbz", "fezrx"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("ipqxbkwvzgnzv")) + .withIpGroupNames(Arrays.asList("zdix", "mqpnoda"))) + .withEtherTypes(Arrays.asList("qhewj")) + .withFragments(Arrays.asList("cgsbost", "eln", "la", "utmzlbiojlvfhrbb")) + .withIpLengths(Arrays.asList("qvcww", "yurmochpprprs", "mo", "ayzejnhlbkpbz")) + .withTtlValues(Arrays.asList("iljhahz", "echndbnwieholew", "wiuub")) + .withDscpMarkings(Arrays.asList("qsfapaqt", "e")) + .withPortCondition( + new AccessControlListPortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("mfxapjwogqqno")) + .withPortGroupNames(Arrays.asList("dcdab", "qwpwyawbzasqbuc", "jg", "yexaoguy")) + .withFlags(Arrays.asList("ids"))) + .withProtocolNeighbors(Arrays.asList("ltxijjumfqwazln", "nm", "jng")) + .withIcmpConfiguration( + new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("xtbjwgnyfusfzsv", "uik", "hajqglcfh"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("qryxyn", "nzrdpsovwxz", "ptgoeiybbabp")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("slkvntjl")) + .withInnerVlans(Arrays.asList("jkskyr", "oov", "idsxwaabzmifry")) + .withVlanGroupNames(Arrays.asList("mmaxrizkzobgo", "xlhslnel", "ieixynllxe"))) + .withIpCondition( + new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("slhcawjutifd", "fmvigorqjbttzh")) + .withIpGroupNames(Arrays.asList("lkafhonqjuje"))) + .withEtherTypes(Arrays.asList("pzvcpopmxelnwc", "tyjedex", "mlfmkqs", "azuawx")) + .withFragments(Arrays.asList("puamwabzxr")) + .withIpLengths(Arrays.asList("ushsp")) + .withTtlValues(Arrays.asList("v", "xyasflvgsgzw", "wakoihkn")) + .withDscpMarkings(Arrays.asList("blmljh", "nymzotqyr", "uzcbmqq")) + .withPortCondition(new AccessControlListPortConditionPatch().withPortType( + PortType.DESTINATION_PORT) .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("sismjqfrddga", "quhiosrsjuivf", "disyirnxz")) - .withPortGroupNames(Arrays.asList("exrxzbujrtrhq", "wrevkhgnlnzon", "lrpiqywnc")) - .withFlags(Arrays.asList("tffyaqit", "hheioqaqhvseuf", "qyrxp"))))) - .withActions(Arrays - .asList(new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("pgdakchzyvli"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("nrkcxkj") - .withSequenceNumber(3323219635606642946L) - .withIpAddressType(IpAddressType.IPV4) + .withPorts(Arrays.asList("ayxonsupeujl")) + .withPortGroupNames(Arrays.asList("hcvsqltnzoi")) + .withFlags(Arrays.asList("xgnxfyqonmpqoxwd", "fdbxiqxeiiqbim"))) + .withProtocolNeighbors(Arrays.asList("wwinhehf", "pofvwb", "blembnkbwvqvxkd", + "vqihebwtswbzuwf")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("agegiz", "cjfelisdjubgg"))))) + .withActions(Arrays.asList( + new AccessControlListActionPatch().withType(AclActionType.COUNT) + .withCounterName("kbsazgak") + .withRemarkComment("cyrcmjdmspo") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListActionPatch().withType(AclActionType.POLICE_RATE) + .withCounterName("ylnio") + .withRemarkComment("zgb") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListActionPatch().withType(AclActionType.POLICE_RATE) + .withCounterName("kvnlvxbcuiiznkt") + .withRemarkComment("ansnvp") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfigurationPatch().withMatchConfigurationName("kostbzbki") + .withSequenceNumber(3332563211958829561L) + .withIpAddressType(IPAddressType.IPV4) .withMatchConditions( Arrays .asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("hgrky")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("bsnmfpph", "jee")) - .withInnerVlans(Arrays.asList("yhsgz", "czbgomfgbeg", "qgleohibetnluank")) + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("fy", "sgcrpfbcunezzce")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("w", "fwlwxjwetnps", "hclafzvaylptrs")) + .withInnerVlans(Arrays.asList("ztcmwq", "chcxwaxfewzj", "jexfdeqvhp")) .withVlanGroupNames( - Arrays.asList("xeeebtijvacvbmqz", "qqxlajr", "wxacevehj", "uyxoaf"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("eyl", "nm")) - .withIpGroupNames(Arrays.asList("xirpghriy", "oqeyhlqhykprl", "yznuciqd"))) - .withEtherTypes(Arrays.asList("wq", "ntvlwijpsttexo", "qpwcyyufmh")) - .withFragments(Arrays.asList("cuwmqsp")) - .withIpLengths(Arrays.asList("qzhlctddunq")) - .withTtlValues(Arrays.asList("fpch")) - .withDscpMarkings(Arrays.asList("njjrcgegydcwbox")) - .withPortCondition(new AccessControlListPortCondition() + Arrays.asList("kkshkbffm", "mxzjrgywwpgjx", "nptfujgi", "gaao"))) + .withIpCondition(new IpMatchConditionPatch() + .withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("dewemxswv", "uun", "zjgehkfkim", "tixo")) + .withIpGroupNames(Arrays.asList("qyinl", "qepqwhixmon", "tshi"))) + .withEtherTypes(Arrays.asList("velfcldu", "cb")) + .withFragments(Arrays.asList("svu")) + .withIpLengths(Arrays.asList("b")) + .withTtlValues( + Arrays.asList("stmninwjizcilng", "gshejjtbxqmulux", "xqzv", "ers")) + .withDscpMarkings(Arrays.asList("ucrwnami", "ze", "rqbsmswziq")) + .withPortCondition(new AccessControlListPortConditionPatch() .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("ubrjtl", "qxfuojrngif", "rzpasccbiuimzdly")) - .withPortGroupNames( - Arrays.asList("qwmkyoquf", "vruzslzojhpctfnm", "xotngfdguge")) - .withFlags(Arrays.asList("qqoli", "r"))), - new AccessControlListMatchCondition() - .withProtocolTypes( - Arrays.asList("vkzqk", "jeokbzefezrxccz", "rtle", "pqxbkwvzgnzvdf")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("xzmqpnodawop")) - .withInnerVlans(Arrays.asList("wjptm", "gsbos")) - .withVlanGroupNames(Arrays.asList("lnd"))) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("uswhvhczznvfbycj", "xjww")) + .withPortGroupNames(Arrays.asList("vumwmxqh")) + .withFlags(Arrays.asList("noamldsehaohdj", "hflzokxco", "pelnjetag"))) + .withProtocolNeighbors(Arrays.asList("xo")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("g", "pnpbswveflocc"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("ozihmipgawt")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("y")) + .withInnerVlans( + Arrays.asList("cjxgrytf", "pcycilrmcaykg", "noxuztrksx", "pndfcpfnznt")) + .withVlanGroupNames(Arrays.asList("wkjaos"))) .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("biojlvf", "rbbpneqvcwwyy", "r")) - .withIpGroupNames(Arrays.asList("hppr"))) - .withEtherTypes(Arrays.asList("xiitdfuxt")) - .withFragments(Arrays.asList("iibmi", "bnn", "stgnl", "hnmgixhcm")) - .withIpLengths(Arrays.asList("qfoudorhcgyy", "rotwypundmbxhugc", "jkavl")) - .withTtlValues(Arrays.asList("bmftpmdt")) - .withDscpMarkings(Arrays.asList("ltfvnz", "yj", "otp", "opv")) - .withPortCondition(new AccessControlListPortCondition() + new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("ktcqio", "mgbzahgxqdlyrtl", "laprlt", "katbhjm")) + .withIpGroupNames(Arrays.asList("bsoqeqala", "vlagun", "tgfebwln"))) + .withEtherTypes(Arrays.asList("yreeudz", "av")) + .withFragments(Arrays.asList("qmjxlyyzglgouwtl", "jjyuojqtobax")) + .withIpLengths(Arrays.asList("ytunlbfjkwr")) + .withTtlValues(Arrays.asList("kqbh", "y", "qunjqh")) + .withDscpMarkings(Arrays.asList("xaulkpakdkifmjnn", "wtqabpxuckp")) + .withPortCondition(new AccessControlListPortConditionPatch() .withPortType(PortType.SOURCE_PORT) .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts( - Arrays.asList("ihsgq", "wdhohsdtmcdzsu", "cohdx", "zlmcmuapcvhdb")) - .withPortGroupNames(Arrays.asList("qqxeyskon", "zinkfkbgbzbowxeq", "clj")) - .withFlags(Arrays.asList("zq", "qqihedsvqwthmk"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("dwfmvigorqjb", "tzh", "aglkafhon")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("eickpz", "cpopmxel")) - .withInnerVlans(Arrays.asList("ltyjedexxmlfmk")) - .withVlanGroupNames(Arrays.asList("azuawx", "z"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("zxrvxcus", "sphaivmxyasflvg", "gzwywak", "ihknsmjbl")) + .withPorts(Arrays.asList("rdhlis")) + .withPortGroupNames(Arrays.asList("fl")) + .withFlags(Arrays.asList("pizruwnpqxpxiw", "cng"))) + .withProtocolNeighbors(Arrays.asList("asi")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("kzjv", "viirhgfgrws", "pgratzvzbglbyvi"))), + new AccessControlListMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("tbrxkjz", "rgxffmshkw", "bkgozxwopdbydpi", "qaclnapxbiy")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("j")) + .withInnerVlans( + Arrays.asList("smfcttuxuuyilfl", "oiquvrehmrnjhvs", "jztczytqj", "w")) + .withVlanGroupNames(Arrays.asList("unfprnjletlxs", "rpddouifamo", + "aziynknlqwzdv", "iwhxqszdtmaajq"))) + .withIpCondition(new IpMatchConditionPatch() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("vmtygj", "mzyospspshck", "kyjpmspbps")) .withIpGroupNames( - Arrays.asList("hlnymzotq", "ryuzcbmqqv", "mv", "fgtayxonsup"))) - .withEtherTypes(Arrays.asList("nmokayzejnhlbk", "bzpcpiljhahzvec", "ndbnwieh")) - .withFragments(Arrays.asList("wjwiuub", "efqsfapaqtferrqw", "x")) - .withIpLengths(Arrays.asList("fxapjwogqqnobpu", "cdabtqwpwya", - "bzasqbucljgkyexa", "guyaip")) - .withTtlValues(Arrays.asList("daultxijjumfq", "azlnqnmcjngzqdqx", "bjwgnyfus")) - .withDscpMarkings(Arrays.asList("vtuikzhajq", "lcfhmlrqryxy")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("sxwaabzm", "frygznmmax")) + Arrays.asList("ppyo", "tieyujtvczkcny", "rxmunjdxvgln", "vxlx"))) + .withEtherTypes( + Arrays.asList("lqivbgkcv", "hpzvuqdflvoniyp", "pubcpzgpxtivhjk")) + .withFragments(Arrays.asList("ibg", "jxgpnrhgovfg", "ik", "mhha")) + .withIpLengths(Arrays.asList("rmzvupo", "qzdfuydzvkfvxcn", "mx")) + .withTtlValues(Arrays.asList("wokmvkhlggd", "bemzqkzszuwi")) + .withDscpMarkings(Arrays.asList("lxxhljfp", "picrmnzhrgmqgjsx", + "pqcbfrmbodthsq", "gvriibakclac")) + .withPortCondition(new AccessControlListPortConditionPatch() + .withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts( + Arrays.asList("xauzlwvsgmwohqfz", "zvuxm", "kjsvthnwpzteko", "mribiat")) .withPortGroupNames( - Arrays.asList("kzobgopxlhsln", "lxieixynllxecwcr", "jphslhcaw", "u")) - .withFlags(Arrays.asList("rd", "sovwxznptgoeiyb", "abpfhvfs", - "kvntjlrigjkskyri"))))) - .withActions(Arrays - .asList(new AccessControlListAction().withType(AclActionType.DROP).withCounterName("nh"), - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("ltnzoibgsxg"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("fyq") - .withSequenceNumber(6893006409525305180L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("yfwlwxjwet")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("hclafzvaylptrs", "qwztcmwqkc")) - .withInnerVlans(Arrays.asList("waxfewzjkj", "xfdeqvhpsyl", "ksh")) - .withVlanGroupNames(Arrays.asList("f", "bmxzjrgywwpg", "xs"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("cg", "aoepttaqutdew")) - .withIpGroupNames(Arrays.asList("swvr", "unzzjgehk"))) - .withEtherTypes(Arrays.asList("fdbxiqxeiiqbim")) - .withFragments( - Arrays.asList("wwinhehf", "pofvwb", "blembnkbwvqvxkd", "vqihebwtswbzuwf")) - .withIpLengths(Arrays.asList("ragegi", "vcjfelisdjubggb")) - .withTtlValues(Arrays.asList("kxkbsazgakgacyr", "m", "dmspof")) - .withDscpMarkings(Arrays.asList("uhrylniofr", "gbzjedmstkv")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("bkiw")) - .withPortGroupNames(Arrays.asList("n", "ophzfylsgcrp", "bcunezzceze")) - .withFlags(Arrays.asList("bcuiiz", "ktwfa", "snvpdibmi"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("noamldsehaohdj", "hflzokxco", "pelnjetag")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("oatftgzpnpbswvef")) - .withInnerVlans(Arrays.asList("cs", "mozi", "m", "pgawtxxpkyjcxcjx")) - .withVlanGroupNames(Arrays.asList("tfmpcycilrmcayk", "gnoxuztrksx"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("nznthjtw", "jaosrxuzv")) - .withIpGroupNames( - Arrays.asList("ktcqio", "mgbzahgxqdlyrtl", "laprlt", "katbhjm"))) - .withEtherTypes(Arrays.asList("m")) - .withFragments(Arrays.asList("xokffqyin", "jqepqwhi", "monstshiyxgve")) - .withIpLengths(Arrays.asList("lduccbi", "ds")) - .withTtlValues(Arrays.asList("cobiegstmninwjiz", "i")) - .withDscpMarkings( - Arrays.asList("hgshe", "jtbxqmuluxlx", "zvners", "ycucrwnamikzeb")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("fbycjs", "jww")) - .withPortGroupNames(Arrays.asList("vumwmxqh")) - .withFlags(Arrays.asList("mswziq", "fuhok", "ruswhv"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("gjkn", "smfcttuxuuyilfl")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("uvr", "hmrnjhvsuj")) - .withInnerVlans(Arrays.asList("zytqjtwhauunfpr", "jletlxsmrpddo", - "ifamowazi", "nknlqwzdvpi")) - .withVlanGroupNames(Arrays.asList("qszdtmaajquhuxyl", "jvmtygjbmz", - "ospspshckf", "yjpmspbpssdfppyo"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("vczkcnyxrxmunjd", "vg", "nkvxlxpaglqi")) - .withIpGroupNames(Arrays.asList("kc", "khpzvuqdflv", "niypfpubcpzg"))) - .withEtherTypes(Arrays.asList("bsoqeqala", "vlagun", "tgfebwln")) - .withFragments(Arrays.asList("yreeudz", "av")) - .withIpLengths(Arrays.asList("qmjxlyyzglgouwtl", "jjyuojqtobax")) - .withTtlValues(Arrays.asList("ytunlbfjkwr")) - .withDscpMarkings(Arrays.asList("kqbh", "y", "qunjqh")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("izruwnpqxpxiwfc", "gjsaasiixtm", "zjvkviirhgfgrws", - "pgratzvzbglbyvi")) - .withPortGroupNames( - Arrays.asList("tbrxkjz", "rgxffmshkw", "bkgozxwopdbydpi", "qaclnapxbiy")) - .withFlags( - Arrays.asList("aulk", "akdkifmjnnawtqab", "xuckpggqoweyir", "hlisngw"))))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("j"), - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("ibg"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("p"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("ov"))))) + Arrays.asList("lu", "fotang", "fhnykzcugs", "vxwlmzqwmvtxnj")) + .withFlags(Arrays.asList("cuqudtcvclxy", "pdkvg", "abuiy"))) + .withProtocolNeighbors(Arrays.asList("uzphdugnei", "n", "gox")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("qhibtozipqwjedm"))))) + .withActions( + Arrays.asList(new AccessControlListActionPatch().withType(AclActionType.REMARK) + .withCounterName("ewpktvqy") + .withRemarkComment("mqpzoyhlfbcgw") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))))) .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() + new CommonDynamicMatchConfigurationPatch() .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("mhha") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("zvuporqzdfuydz", "kfvxcnq")), - new IpGroupProperties().withName("qpswokmvkhlggdhb") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("zszuwiwtglxx")), - new IpGroupProperties().withName("jfpgpicrmn") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("qgjsxvpqcbfrmbod", "hsqqgvriibakcl", "c")))) + new IpGroupPatchProperties().withName("injipnwjf") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("fcbahhp", "pofoi")), + new IpGroupPatchProperties().withName("w") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("mkkho", "vdndviauo", "phuartv")), + new IpGroupPatchProperties().withName("ukyefchnmnahmnxh") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("rwrweooxffi", "hx")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("xousxauzl") - .withVlans(Arrays.asList("gmwohqfzizvu", "mmkjsvthnwpztek")), - new VlanGroupProperties().withName("mribiat") - .withVlans(Arrays.asList("lu", "fotang", "fhnykzcugs", "vxwlmzqwmvtxnj")), - new VlanGroupProperties().withName("mcuqudtcvc") - .withVlans(Arrays.asList("npdkv", "fabuiyjibu", "phdu")), - new VlanGroupProperties().withName("eiknpgo") - .withVlans(Arrays.asList("iuqhibtozipqwj", "d", "urrxxgewpktv")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("mqpzoyhlfbcgw") - .withPorts(Arrays.asList("oxoebqi", "jipnwj", "ujqlafcbahh")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("foiyjwpfilk") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("l", "dndviauogp")), - new IpGroupProperties().withName("artvti") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("chnmna", "mnxhkxjqirwrweo")))) + new VlanGroupPatchProperties().withName("ewmozqvbu") + .withVlans(Arrays.asList("amhsycxhxzgazt")), + new VlanGroupPatchProperties().withName("boi") + .withVlans(Arrays.asList("fqhppubowsep", "fgkmtdhern", "btcjuah")), + new VlanGroupPatchProperties().withName("qtobkauxo") + .withVlans(Arrays.asList("fphwpnu", "aiywzejywhsl", "koj", "llndnpd")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("afgfugsnn") + .withPorts(Arrays.asList("et", "fypococtfjgti")), + new PortGroupPatchProperties().withName("jvzuy").withPorts(Arrays.asList("mlmuowol", "au")), + new PortGroupPatchProperties().withName("opionszon") + .withPorts(Arrays.asList("gajinnixjawrtmj", "jmyccxlzhcoxov", "ekhenl", "sfnrdtjxt")), + new PortGroupPatchProperties().withName("dcqtjvidttge") + .withPorts(Arrays.asList("lvyjtcvuwkas", "zies", "uughtuqfecjxeyg", "uhxu")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("ewmrswnjlxu") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("usxjbaqehg", "dohzjq")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("o").withVlans(Arrays.asList("bxncnwfepbnw")), + new VlanGroupPatchProperties().withName("m").withVlans(Arrays.asList("cgbjbgdlfgt", "y")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("uflqbctq").withPorts(Arrays.asList("zjrwdkqze")), + new PortGroupPatchProperties().withName("jleziunjx") + .withPorts(Arrays.asList("antkwcegyamlbns", "qa", "jjvpilguooqja")), + new PortGroupPatchProperties() + .withName("d") + .withPorts(Arrays.asList("ueio", "kjbsah", "tdtpdelqacslmo", "oebn")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList(new IpGroupPatchProperties().withName("vcjkgd") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("txejwabm")))) .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("i") - .withVlans(Arrays.asList("wrsnewmozqvbu", "qmamhsycxhxzga")), - new VlanGroupProperties().withName("taboidvmf").withVlans(Arrays.asList("pubowsepdfg")))) + new VlanGroupPatchProperties().withName("mvcopexcmjurbuhh") + .withVlans(Arrays.asList("ql", "qsrogt")), + new VlanGroupPatchProperties().withName("kffdjktsys") + .withVlans(Arrays.asList("vclglxnfuij")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("herngb") - .withPorts(Arrays.asList("uahokq", "obkauxofsh", "phwpnulaiywzej")), - new PortGroupProperties().withName("hs").withPorts(Arrays.asList("ojpllndnpdwrpqaf")), - new PortGroupProperties().withName("ug").withPorts(Arrays.asList("fhyete")), - new PortGroupProperties().withName("pococtfjgt") - .withPorts(Arrays.asList("jvzuy", "urmlmuo")))))) - .withAnnotation("cpwpg"); + new PortGroupPatchProperties().withName("sqo") + .withPorts(Arrays.asList("ikayiansharuj", "ji", "xfz", "j")), + new PortGroupPatchProperties().withName("tvwkpqhjpenu") + .withPorts(Arrays.asList("qeqqekewvnqvcdl", "uaucmf", "jwnlax", "un")), + new PortGroupPatchProperties().withName("ikczvvitacgxmf") + .withPorts(Arrays.asList("er", "htvs")))))) + .withAclType(AclType.MANAGEMENT) + .withDeviceRole(DeviceRole.NPB) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.FALSE)) + .withAnnotation("gqrsxypruuu"); model = BinaryData.fromObject(model).toObject(AccessControlListPatchProperties.class); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("ivtsoxfrkenxpm", model.aclsUrl()); + Assertions.assertEquals("xubyjaffmmfblcqc", model.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("mpdnqqskawa", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3401106758360716727L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("nsrmffeycx", + Assertions.assertEquals("brta", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7512883533272533061L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("lqxihhrmooiz", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("rteeamm", + Assertions.assertEquals("etoge", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("efdeesve", + Assertions.assertEquals("hvv", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("xs", + Assertions.assertEquals("it", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("sawddjibabxvi", + Assertions.assertEquals("hemjy", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("pqtgsfjac", + Assertions.assertEquals("uj", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("rtql", + Assertions.assertEquals("cdmxzrpoaiml", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("egnitg", + Assertions.assertEquals("wpchwahf", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("lzxwhcansy", + Assertions.assertEquals("cporxvxcjz", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("sqvdaeyygux", + Assertions.assertEquals("ivmmghfcfiwrxgk", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("dxasicddyvv", + Assertions.assertEquals("gsgbpfgzdjt", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("vxevblb", + Assertions.assertEquals("gaqvlgafcqusrd", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("xeizzg", + Assertions.assertEquals("nwsdtutnwlduyc", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("eaahhvjhhn", + Assertions.assertEquals("hyrmewipmvekdx", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("pgdakchzyvli", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("mhha", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, + Assertions.assertEquals("mun", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals("yihsasbhudypohyu", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("suxswqrntvlwijp", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("texoqqpwc", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("injipnwjf", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("zvuporqzdfuydz", + Assertions.assertEquals("fcbahhp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("xousxauzl", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("gmwohqfzizvu", + Assertions.assertEquals("ewmozqvbu", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("amhsycxhxzgazt", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("mqpzoyhlfbcgw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("oxoebqi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("cpwpg", model.annotation()); + Assertions.assertEquals("afgfugsnn", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("et", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.MANAGEMENT, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalAccessControlListActions().enableCount()); + Assertions.assertEquals("gqrsxypruuu", model.annotation()); } } 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 index a52d041fe7ea..c4c9e1c13138 100644 --- 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 @@ -1,26 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -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.AccessControlListActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; 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.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -30,161 +36,203 @@ public final class AccessControlListPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListPatch model = BinaryData.fromString( - "{\"properties\":{\"annotation\":\"yavluwmncstt\",\"configurationType\":\"File\",\"aclsUrl\":\"bvpoekrsgsgbdhu\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"gkynscliqh\",\"sequenceNumber\":1086161776680069290,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"u\",\"otppnv\",\"xz\"],\"fragments\":[\"hfrbbc\",\"vqagtltdhlf\",\"qojpy\"],\"ipLengths\":[\"trdcnifmzzs\"],\"ttlValues\":[\"brn\"],\"dscpMarkings\":[\"xmprafwg\"],\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"xvd\",\"ffwafq\",\"oudaspavehhrvk\",\"unzo\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"moy\"},{\"type\":\"Drop\",\"counterName\":\"uibhmfdnbzydvfv\"},{\"type\":\"Drop\",\"counterName\":\"aeoisrvh\"},{\"type\":\"Drop\",\"counterName\":\"ffukiscvw\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"efaxvxilc\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"nzeyqxtjj\"]}],\"vlanGroups\":[{\"name\":\"qhycavodggxdbees\",\"vlans\":[\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"]},{\"name\":\"jocqwogfnzjvusf\",\"vlans\":[\"mozuxylfsb\",\"kadpysown\"]},{\"name\":\"gkbugrjqct\",\"vlans\":[\"mi\",\"of\"]}],\"portGroups\":[{\"name\":\"efojyqdhcupl\",\"ports\":[\"cwkhihi\",\"lhzdsqtzb\",\"rgnowcjhfgm\"]},{\"name\":\"cact\",\"ports\":[\"oteyowc\",\"uqovekqvgqouwif\"]},{\"name\":\"pjwyiv\",\"ports\":[\"f\",\"cvhrfsp\",\"uagrttikteusqc\"]},{\"name\":\"vyklxuby\",\"ports\":[\"fmmfblcqcu\"]}]},{\"ipGroups\":[{\"name\":\"ibrta\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"t\",\"gdslqxihhrmoo\"]},{\"name\":\"qseypxiutcxa\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"petogebjox\",\"lhvnhlab\",\"q\",\"kkzjcjbtrga\"]},{\"name\":\"vvib\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"toqbeitpkxztmoob\"]},{\"name\":\"ft\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wqmpimaqxzhemjyh\"]}],\"vlanGroups\":[{\"name\":\"swtwkozzwc\",\"vlans\":[\"bawpfajnjwltlwt\"]}],\"portGroups\":[{\"name\":\"ktalhsnvkcdmxz\",\"ports\":[\"aimlnwiaaom\",\"l\"]}]},{\"ipGroups\":[{\"name\":\"ulcsethwwnpj\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wpchwahf\",\"ousnfepgfewe\",\"wlyxgncxyk\",\"hdjhlimmbcx\"]}],\"vlanGroups\":[{\"name\":\"po\",\"vlans\":[\"xcjzhqizxfpxt\",\"qscjavftjuh\",\"qaz\",\"mtggu\"]},{\"name\":\"ijr\",\"vlans\":[\"ivmmghfcfiwrxgk\",\"euvyinzqodfvpgs\"]},{\"name\":\"xgsg\",\"vlans\":[\"gzdjtxvzf\",\"bqvgaqv\",\"gafcqu\"]},{\"name\":\"dvetnws\",\"vlans\":[\"tnwlduycv\"]}],\"portGroups\":[{\"name\":\"rmewipmve\",\"ports\":[\"ukuqgsj\",\"xundxgk\"]},{\"name\":\"wzhhzjhfjmhvvmuv\",\"ports\":[\"uneqsxvmhf\"]},{\"name\":\"zjyi\",\"ports\":[\"sbhud\"]},{\"name\":\"ohyuemslynsq\",\"ports\":[\"foobrlttyms\",\"nygq\"]}]}]},\"tags\":{\"yvi\":\"wqzdzgtilaxhnfhq\",\"ti\":\"ouwivkxoyzunbixx\"}}") + "{\"tags\":{\"drihpfhoqcaaewda\":\"spuunnoxyhkxgq\",\"xkzb\":\"mdjvlpj\",\"ncj\":\"msgeivsiykzk\",\"y\":\"xonbzoggculapz\"},\"properties\":{\"configurationType\":\"Inline\",\"aclsUrl\":\"tqxepn\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"jlyjtlvofq\",\"sequenceNumber\":3485118187596080390,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"owuxrkjpvdwx\",\"zwiivwzjbhyzs\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"etherTypes\":[\"mbtrnegvmnvu\",\"eqvldspast\",\"bkkd\"],\"fragments\":[\"vestmjl\"],\"ipLengths\":[\"ilozapeewchpxlk\"],\"ttlValues\":[\"uziycsl\",\"vu\",\"uztcktyhjtqed\"],\"dscpMarkings\":[\"ulwm\",\"rqzz\",\"rjvpglydzgkrvqee\",\"toepryu\"],\"portCondition\":{},\"protocolNeighbors\":[\"tpzdmovzvfvaawzq\"],\"icmpConfiguration\":{}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"riglaec\",\"remarkComment\":\"dticokpvzml\",\"policeRateConfiguration\":{}},{\"type\":\"Log\",\"counterName\":\"gxobfirclnp\",\"remarkComment\":\"iayz\",\"policeRateConfiguration\":{}}]},{\"matchConfigurationName\":\"khyawfvjlboxqv\",\"sequenceNumber\":258581951600171882,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"nhdwdigumbnra\",\"uzzptjazysdz\",\"ezwwv\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"etherTypes\":[\"vv\",\"onkp\"],\"fragments\":[\"yik\",\"y\"],\"ipLengths\":[\"yavluwmncstt\"],\"ttlValues\":[\"y\",\"vpo\"],\"dscpMarkings\":[\"sgsgbdhu\"],\"portCondition\":{},\"protocolNeighbors\":[\"j\",\"gkynscliqh\",\"vhxnk\"],\"icmpConfiguration\":{}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"tppn\",\"remarkComment\":\"xz\",\"policeRateConfiguration\":{}},{\"type\":\"Remark\",\"counterName\":\"rbbcevq\",\"remarkComment\":\"tltdhlfkqojpy\",\"policeRateConfiguration\":{}},{\"type\":\"Log\",\"counterName\":\"dcnifmz\",\"remarkComment\":\"dymbrny\",\"policeRateConfiguration\":{}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"fwgckhocxvdfffw\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"udaspavehh\",\"vkbunzozudh\",\"xg\",\"moy\"]},{\"name\":\"dyuib\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"bzydvfvfcj\",\"aeoisrvh\",\"gorf\"]},{\"name\":\"kiscvwmzhwpl\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xilcbtgnhnzey\",\"xtjjfzqlqhycav\"]},{\"name\":\"ggxdb\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"eknlra\",\"iaa\"]}],\"vlanGroups\":[{\"name\":\"gy\",\"vlans\":[\"fbylyrfg\"]},{\"name\":\"gtcojocqwo\",\"vlans\":[\"zjvusfzldmo\",\"uxylfsbtkadpy\",\"own\"]},{\"name\":\"gkbugrjqct\",\"vlans\":[\"mi\",\"of\"]},{\"name\":\"ypefojyqdhcupl\",\"vlans\":[\"cwkhihi\",\"lhzdsqtzb\",\"rgnowcjhfgm\"]}],\"portGroups\":[{\"name\":\"ctxmwoteyowcluq\",\"ports\":[\"kqvgqouw\",\"fzmpjwyivq\",\"kfxcvhrfs\"]}]}],\"aclType\":\"ControlPlaneTrafficPolicy\",\"deviceRole\":\"ManagementSwitch\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"annotation\":\"kteusqczk\"}}") .toObject(AccessControlListPatch.class); - Assertions.assertEquals("wqzdzgtilaxhnfhq", model.tags().get("yvi")); - Assertions.assertEquals("yavluwmncstt", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("bvpoekrsgsgbdhu", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("gkynscliqh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1086161776680069290L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xvd", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("hfrbbc", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("trdcnifmzzs", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("brn", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("xmprafwg", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("moy", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("efaxvxilc", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("nzeyqxtjj", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qhycavodggxdbees", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("knlrariaawiuagy", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("efojyqdhcupl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("cwkhihi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("spuunnoxyhkxgq", model.tags().get("drihpfhoqcaaewda")); + Assertions.assertEquals(ConfigurationType.INLINE, model.properties().configurationType()); + Assertions.assertEquals("tqxepn", model.properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().defaultAction()); + Assertions.assertEquals("jlyjtlvofq", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3485118187596080390L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("owuxrkjpvdwx", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("mbtrnegvmnvu", + model.properties().matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("vestmjl", + model.properties().matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("ilozapeewchpxlk", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("uziycsl", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("ulwm", + model.properties().matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("tpzdmovzvfvaawzq", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals(AclActionType.LOG, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("riglaec", + model.properties().matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("dticokpvzml", + model.properties().matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("fwgckhocxvdfffw", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("udaspavehh", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("gy", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("fbylyrfg", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("ctxmwoteyowcluq", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("kqvgqouw", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.CP, model.properties().aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, model.properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.properties().globalAccessControlListActions().enableCount()); + Assertions.assertEquals("kteusqczk", model.properties().annotation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListPatch model = new AccessControlListPatch() - .withTags(mapOf("yvi", "wqzdzgtilaxhnfhq", "ti", "ouwivkxoyzunbixx")) - .withAnnotation("yavluwmncstt") - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("bvpoekrsgsgbdhu") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList(new AccessControlListMatchConfiguration() - .withMatchConfigurationName("gkynscliqh") - .withSequenceNumber(1086161776680069290L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("xvd", "ffwafq", "oudaspavehhrvk", "unzo")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEtherTypes(Arrays.asList("u", "otppnv", "xz")) - .withFragments(Arrays.asList("hfrbbc", "vqagtltdhlf", "qojpy")) - .withIpLengths(Arrays.asList("trdcnifmzzs")) - .withTtlValues(Arrays.asList("brn")) - .withDscpMarkings(Arrays.asList("xmprafwg")) - .withPortCondition(new AccessControlListPortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions( - Arrays.asList(new AccessControlListAction().withType(AclActionType.LOG).withCounterName("moy"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("uibhmfdnbzydvfv"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("aeoisrvh"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("ffukiscvw"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("efaxvxilc") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("nzeyqxtjj")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("qhycavodggxdbees") - .withVlans(Arrays.asList("knlrariaawiuagy", "wqfbylyrfgiagt")), - new VlanGroupProperties().withName("jocqwogfnzjvusf") - .withVlans(Arrays.asList("mozuxylfsb", "kadpysown")), - new VlanGroupProperties().withName("gkbugrjqct").withVlans(Arrays.asList("mi", "of")))) - .withPortGroups(Arrays.asList(new PortGroupProperties() - .withName("efojyqdhcupl") - .withPorts(Arrays.asList("cwkhihi", "lhzdsqtzb", "rgnowcjhfgm")), - new PortGroupProperties().withName("cact") - .withPorts(Arrays.asList("oteyowc", "uqovekqvgqouwif")), - new PortGroupProperties().withName("pjwyiv") - .withPorts(Arrays.asList("f", "cvhrfsp", "uagrttikteusqc")), - new PortGroupProperties().withName("vyklxuby").withPorts(Arrays.asList("fmmfblcqcu")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("ibrta") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("t", "gdslqxihhrmoo")), - new IpGroupProperties().withName("qseypxiutcxa") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("petogebjox", "lhvnhlab", "q", "kkzjcjbtrga")), - new IpGroupProperties().withName("vvib") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("toqbeitpkxztmoob")), - new IpGroupProperties().withName("ft") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("wqmpimaqxzhemjyh")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("swtwkozzwc").withVlans(Arrays.asList("bawpfajnjwltlwt")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("ktalhsnvkcdmxz") - .withPorts(Arrays.asList("aimlnwiaaom", "l")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("ulcsethwwnpj") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("po") - .withVlans(Arrays.asList("xcjzhqizxfpxt", "qscjavftjuh", "qaz", "mtggu")), - new VlanGroupProperties().withName("ijr") - .withVlans(Arrays.asList("ivmmghfcfiwrxgk", "euvyinzqodfvpgs")), - new VlanGroupProperties().withName("xgsg") - .withVlans(Arrays.asList("gzdjtxvzf", "bqvgaqv", "gafcqu")), - new VlanGroupProperties().withName("dvetnws").withVlans(Arrays.asList("tnwlduycv")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("rmewipmve").withPorts(Arrays.asList("ukuqgsj", "xundxgk")), - new PortGroupProperties().withName("wzhhzjhfjmhvvmuv").withPorts(Arrays.asList("uneqsxvmhf")), - new PortGroupProperties().withName("zjyi").withPorts(Arrays.asList("sbhud")), - new PortGroupProperties().withName("ohyuemslynsq") - .withPorts(Arrays.asList("foobrlttyms", "nygq")))))); + AccessControlListPatch model + = new AccessControlListPatch() + .withTags(mapOf("drihpfhoqcaaewda", "spuunnoxyhkxgq", "xkzb", "mdjvlpj", "ncj", "msgeivsiykzk", "y", + "xonbzoggculapz")) + .withProperties( + new AccessControlListPatchProperties().withConfigurationType(ConfigurationType.INLINE) + .withAclsUrl("tqxepn") + .withDefaultAction(CommunityActionTypes.PERMIT) + .withMatchConfigurations( + Arrays + .asList( + new AccessControlListMatchConfigurationPatch() + .withMatchConfigurationName("jlyjtlvofq") + .withSequenceNumber(3485118187596080390L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("owuxrkjpvdwx", "zwiivwzjbhyzs")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEtherTypes(Arrays.asList("mbtrnegvmnvu", "eqvldspast", "bkkd")) + .withFragments(Arrays.asList("vestmjl")) + .withIpLengths(Arrays.asList("ilozapeewchpxlk")) + .withTtlValues(Arrays.asList("uziycsl", "vu", "uztcktyhjtqed")) + .withDscpMarkings( + Arrays.asList("ulwm", "rqzz", "rjvpglydzgkrvqee", "toepryu")) + .withPortCondition(new AccessControlListPortConditionPatch()) + .withProtocolNeighbors(Arrays.asList("tpzdmovzvfvaawzq")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties()))) + .withActions(Arrays.asList( + new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("riglaec") + .withRemarkComment("dticokpvzml") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListActionPatch() + .withType(AclActionType.LOG) + .withCounterName("gxobfirclnp") + .withRemarkComment("iayz") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()))), + new AccessControlListMatchConfigurationPatch() + .withMatchConfigurationName("khyawfvjlboxqv") + .withSequenceNumber(258581951600171882L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new AccessControlListMatchConditionPatch() + .withProtocolTypes(Arrays.asList("nhdwdigumbnra", "uzzptjazysdz", "ezwwv")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEtherTypes(Arrays.asList("vv", "onkp")) + .withFragments(Arrays.asList("yik", "y")) + .withIpLengths(Arrays.asList("yavluwmncstt")) + .withTtlValues(Arrays.asList("y", "vpo")) + .withDscpMarkings(Arrays.asList("sgsgbdhu")) + .withPortCondition(new AccessControlListPortConditionPatch()) + .withProtocolNeighbors(Arrays.asList("j", "gkynscliqh", "vhxnk")) + .withIcmpConfiguration(new IcmpConfigurationPatchProperties()))) + .withActions(Arrays.asList(new AccessControlListActionPatch() + .withType(AclActionType.DROP) + .withCounterName("tppn") + .withRemarkComment("xz") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListActionPatch().withType(AclActionType.REMARK) + .withCounterName("rbbcevq") + .withRemarkComment("tltdhlfkqojpy") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties()), + new AccessControlListActionPatch().withType(AclActionType.LOG) + .withCounterName("dcnifmz") + .withRemarkComment("dymbrny") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties()))))) + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("fwgckhocxvdfffw") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("udaspavehh", "vkbunzozudh", "xg", "moy")), + new IpGroupPatchProperties().withName("dyuib") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("bzydvfvfcj", "aeoisrvh", "gorf")), + new IpGroupPatchProperties().withName("kiscvwmzhwpl") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("xilcbtgnhnzey", "xtjjfzqlqhycav")), + new IpGroupPatchProperties().withName("ggxdb") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("eknlra", "iaa")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("gy").withVlans(Arrays.asList("fbylyrfg")), + new VlanGroupPatchProperties() + .withName("gtcojocqwo") + .withVlans(Arrays.asList("zjvusfzldmo", "uxylfsbtkadpy", "own")), + new VlanGroupPatchProperties().withName("gkbugrjqct") + .withVlans(Arrays.asList("mi", "of")), + new VlanGroupPatchProperties().withName("ypefojyqdhcupl") + .withVlans(Arrays.asList("cwkhihi", "lhzdsqtzb", "rgnowcjhfgm")))) + .withPortGroups(Arrays.asList(new PortGroupPatchProperties().withName("ctxmwoteyowcluq") + .withPorts(Arrays.asList("kqvgqouw", "fzmpjwyivq", "kfxcvhrfs")))))) + .withAclType(AclType.CP) + .withDeviceRole(DeviceRole.MANAGEMENT_SWITCH) + .withGlobalAccessControlListActions(new GlobalAccessControlListActionPatchProperties() + .withEnableCount(BooleanEnumProperty.FALSE)) + .withAnnotation("kteusqczk")); model = BinaryData.fromObject(model).toObject(AccessControlListPatch.class); - Assertions.assertEquals("wqzdzgtilaxhnfhq", model.tags().get("yvi")); - Assertions.assertEquals("yavluwmncstt", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("bvpoekrsgsgbdhu", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("gkynscliqh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1086161776680069290L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xvd", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("hfrbbc", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("trdcnifmzzs", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("brn", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("xmprafwg", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(AclActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("moy", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("efaxvxilc", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("nzeyqxtjj", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qhycavodggxdbees", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("knlrariaawiuagy", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("efojyqdhcupl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("cwkhihi", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("spuunnoxyhkxgq", model.tags().get("drihpfhoqcaaewda")); + Assertions.assertEquals(ConfigurationType.INLINE, model.properties().configurationType()); + Assertions.assertEquals("tqxepn", model.properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().defaultAction()); + Assertions.assertEquals("jlyjtlvofq", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3485118187596080390L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("owuxrkjpvdwx", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("mbtrnegvmnvu", + model.properties().matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); + Assertions.assertEquals("vestmjl", + model.properties().matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); + Assertions.assertEquals("ilozapeewchpxlk", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("uziycsl", + model.properties().matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("ulwm", + model.properties().matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("tpzdmovzvfvaawzq", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); + Assertions.assertEquals(AclActionType.LOG, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("riglaec", + model.properties().matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("dticokpvzml", + model.properties().matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("fwgckhocxvdfffw", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("udaspavehh", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("gy", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("fbylyrfg", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("ctxmwoteyowcluq", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("kqvgqouw", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.CP, model.properties().aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, model.properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.properties().globalAccessControlListActions().enableCount()); + Assertions.assertEquals("kteusqczk", model.properties().annotation()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java deleted file mode 100644 index d1e398851a06..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchablePropertiesTests.java +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) 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.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchableProperties; -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.CommunityActionTypes; -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 org.junit.jupiter.api.Assertions; - -public final class AccessControlListPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListPatchableProperties model = BinaryData.fromString( - "{\"configurationType\":\"File\",\"aclsUrl\":\"lfltka\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"dlfoakggkfp\",\"sequenceNumber\":2099147795702198960,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"blylsyxkqjnsj\",\"r\",\"tiagx\"],\"fragments\":[\"zuempsbzkf\"],\"ipLengths\":[\"yvpnqicvinvkjj\",\"dxrbuukzcle\",\"yhmlwpaztzp\",\"fn\"],\"ttlValues\":[\"wyfzqwhxxbuyqa\",\"zfeqztppri\",\"lxorjaltolmncws\",\"bqwcsdbnwdcf\"],\"dscpMarkings\":[\"qdpfuvglsbjjca\",\"vxb\"],\"portCondition\":{\"flags\":[\"dut\",\"cormr\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ofudflvkgju\",\"gdknnqv\",\"aznqntoru\",\"sgsahmkycgr\"],\"portGroupNames\":[\"juetaebur\"]},\"protocolTypes\":[\"movsmzlxwabmqoe\",\"kif\"],\"vlanMatchCondition\":{\"vlans\":[\"u\",\"ujmqlgkfbtndoa\",\"n\",\"bjcntujitc\"],\"innerVlans\":[\"ftwwaezkojvdc\"],\"vlanGroupNames\":[\"oqouicybxarzgszu\",\"oxciqopidoamcio\",\"hkh\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"onlwntoeg\"],\"ipGroupNames\":[\"wbw\",\"kszzcmrvexztv\",\"t\",\"gsfraoyzkoow\"]}},{\"etherTypes\":[\"nguxawqaldsy\",\"uximerqfobw\",\"znkbykutwpfhpagm\",\"r\"],\"fragments\":[\"snfdsdoakgtdl\",\"kkze\",\"dlhewp\",\"sdsttwvog\"],\"ipLengths\":[\"ejdcngqqmoakuf\",\"m\"],\"ttlValues\":[\"wr\"],\"dscpMarkings\":[\"twaenuuzko\",\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"portCondition\":{\"flags\":[\"oftrmaequia\",\"xicslfao\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"lhalnswh\",\"csphkaiv\",\"itqscywuggwoluhc\"],\"portGroupNames\":[\"emh\"]},\"protocolTypes\":[\"sbrgz\",\"wmsweypqwd\",\"ggicccnxqhue\"],\"vlanMatchCondition\":{\"vlans\":[\"tlstvlzywem\",\"zrncsdt\",\"lusiy\",\"bsfgytguslfea\"],\"innerVlans\":[\"gq\",\"kyhejhzisxgf\",\"elolppvksrpqvuj\"],\"vlanGroupNames\":[\"ehtwdwrft\",\"wib\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\",\"jc\"],\"ipGroupNames\":[\"ltiugcxnavv\"]}},{\"etherTypes\":[\"ibyqunyowxwlmdj\"],\"fragments\":[\"fgbvfvpdbo\",\"acizsjqlhkrr\",\"bdeibqipqk\",\"hvxndzwmkrefajpj\"],\"ipLengths\":[\"kqnyh\",\"b\"],\"ttlValues\":[\"jivfxzsjabib\",\"ystawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"dscpMarkings\":[\"jjklff\",\"mouwqlgzrfzeey\"],\"portCondition\":{\"flags\":[\"ikayuhqlbjbsybb\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"dgmfpgvmpipasl\",\"haq\",\"x\"],\"portGroupNames\":[\"wutwbdsre\",\"pdrhne\",\"yowqkdwytisibir\"]},\"protocolTypes\":[\"ikpzimejza\",\"lfzxiavrmbzonoki\"],\"vlanMatchCondition\":{\"vlans\":[\"cirgzp\"],\"innerVlans\":[\"azszrnwoiindfpw\",\"jylwbtlhflsj\"],\"vlanGroupNames\":[\"szfjvfbgofelja\",\"rqmq\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"ojnal\",\"hfkvtvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\"],\"ipGroupNames\":[\"hftqsxhqxujxukn\",\"xdigrjg\",\"ufzdmsyq\",\"fi\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"z\"},{\"type\":\"Drop\",\"counterName\":\"mvpp\"},{\"type\":\"Drop\",\"counterName\":\"qzudphq\"},{\"type\":\"Log\",\"counterName\":\"kfwynw\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ayhmtnvyqiatkz\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wzcjaesgvvsccy\"]}],\"vlanGroups\":[{\"name\":\"qfhwyg\",\"vlans\":[\"dnkfx\",\"semdwzrmu\",\"apfcqdpsq\"]}],\"portGroups\":[{\"name\":\"svuo\",\"ports\":[\"ccelve\"]},{\"name\":\"ypql\",\"ports\":[\"okerqwkyhkobop\",\"xedk\",\"wep\",\"qpcrf\"]},{\"name\":\"wccsnjvcdwxlpqek\",\"ports\":[\"khtj\",\"y\",\"ngwfqatm\"]}]},{\"ipGroups\":[{\"name\":\"mdvy\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"gszywk\",\"irryuzhlh\",\"joqrvqqaatj\",\"nrvgoupmfiibfgg\"]},{\"name\":\"ool\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"v\",\"kkgll\"]}],\"vlanGroups\":[{\"name\":\"gvjayvblmh\",\"vlans\":[\"uhbxvvy\",\"gsopbyrqufegxu\",\"wz\",\"bnhlmc\"]},{\"name\":\"p\",\"vlans\":[\"itvgbmhrixkwm\",\"ijejvegrhbpn\"]},{\"name\":\"xexccbdreaxhcexd\",\"vlans\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"]}],\"portGroups\":[{\"name\":\"owvrvmtgjqppyos\",\"ports\":[\"nzm\"]},{\"name\":\"gfipnsxk\",\"ports\":[\"a\",\"krrjrea\",\"xt\",\"gumhjglikkxws\"]}]},{\"ipGroups\":[{\"name\":\"qpvuzlmvfelf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"crpw\",\"xeznoi\"]},{\"name\":\"rnjwmw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"azej\"]},{\"name\":\"qkagfhsxt\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xnfaazpxdtnk\",\"mkqjj\"]},{\"name\":\"uenvrkp\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"bre\",\"qaaysjkixqt\"]}],\"vlanGroups\":[{\"name\":\"ezl\",\"vlans\":[\"fiakpjpqqm\",\"edltmmjihyeozp\"]},{\"name\":\"wau\",\"vlans\":[\"c\"]}],\"portGroups\":[{\"name\":\"kvi\",\"ports\":[\"scw\",\"qupevzh\",\"stotxh\",\"jujbypelmcuvhixb\"]},{\"name\":\"yfwnylr\",\"ports\":[\"lsttpkiwkkbnuj\"]},{\"name\":\"wvtylbfpncurdo\",\"ports\":[\"ithtywu\",\"xcbihw\"]}]},{\"ipGroups\":[{\"name\":\"dntwjchrdgo\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wct\",\"ndz\",\"luudfdlwggytsb\",\"tov\"]}],\"vlanGroups\":[{\"name\":\"einqf\",\"vlans\":[\"x\",\"knpirgnepttwq\",\"sniffc\",\"mqnrojlpijnkr\"]},{\"name\":\"rddh\",\"vlans\":[\"tizzronasxif\"]}],\"portGroups\":[{\"name\":\"yzhftwesgogczh\",\"ports\":[\"xkr\",\"gnyhmossxkkg\",\"h\",\"rghxjb\"]}]}]}") - .toObject(AccessControlListPatchableProperties.class); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("lfltka", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("dlfoakggkfp", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2099147795702198960L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("movsmzlxwabmqoe", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ftwwaezkojvdc", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("oqouicybxarzgszu", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("onlwntoeg", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("wbw", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("blylsyxkqjnsj", - model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("zuempsbzkf", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("yvpnqicvinvkjj", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("wyfzqwhxxbuyqa", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("qdpfuvglsbjjca", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ofudflvkgju", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("juetaebur", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dut", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("z", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ayhmtnvyqiatkz", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wzcjaesgvvsccy", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qfhwyg", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dnkfx", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("svuo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("ccelve", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListPatchableProperties model - = new AccessControlListPatchableProperties().withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("lfltka") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList(new AccessControlListMatchConfiguration() - .withMatchConfigurationName("dlfoakggkfp") - .withSequenceNumber(2099147795702198960L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList( - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("movsmzlxwabmqoe", "kif")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("u", "ujmqlgkfbtndoa", "n", "bjcntujitc")) - .withInnerVlans(Arrays.asList("ftwwaezkojvdc")) - .withVlanGroupNames(Arrays.asList("oqouicybxarzgszu", "oxciqopidoamcio", "hkh"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("onlwntoeg")) - .withIpGroupNames(Arrays.asList("wbw", "kszzcmrvexztv", "t", "gsfraoyzkoow"))) - .withEtherTypes(Arrays.asList("blylsyxkqjnsj", "r", "tiagx")) - .withFragments(Arrays.asList("zuempsbzkf")) - .withIpLengths(Arrays.asList("yvpnqicvinvkjj", "dxrbuukzcle", "yhmlwpaztzp", "fn")) - .withTtlValues( - Arrays.asList("wyfzqwhxxbuyqa", "zfeqztppri", "lxorjaltolmncws", "bqwcsdbnwdcf")) - .withDscpMarkings(Arrays.asList("qdpfuvglsbjjca", "vxb")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("ofudflvkgju", "gdknnqv", "aznqntoru", "sgsahmkycgr")) - .withPortGroupNames(Arrays.asList("juetaebur")) - .withFlags(Arrays.asList("dut", "cormr"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("sbrgz", "wmsweypqwd", "ggicccnxqhue")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("tlstvlzywem", "zrncsdt", "lusiy", "bsfgytguslfea")) - .withInnerVlans(Arrays.asList("gq", "kyhejhzisxgf", "elolppvksrpqvuj")) - .withVlanGroupNames(Arrays.asList("ehtwdwrft", "wib"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("hfwpracstwit", "khevxccedc", "nmdyodnwzxl", "jc")) - .withIpGroupNames(Arrays.asList("ltiugcxnavv"))) - .withEtherTypes(Arrays.asList("nguxawqaldsy", "uximerqfobw", "znkbykutwpfhpagm", "r")) - .withFragments(Arrays.asList("snfdsdoakgtdl", "kkze", "dlhewp", "sdsttwvog")) - .withIpLengths(Arrays.asList("ejdcngqqmoakuf", "m")) - .withTtlValues(Arrays.asList("wr")) - .withDscpMarkings(Arrays.asList("twaenuuzko", "bminrfdwoyuhhzi", "iefozbhdmsml")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("lhalnswh", "csphkaiv", "itqscywuggwoluhc")) - .withPortGroupNames(Arrays.asList("emh")) - .withFlags(Arrays.asList("oftrmaequia", "xicslfao"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ikpzimejza", "lfzxiavrmbzonoki")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("cirgzp")) - .withInnerVlans(Arrays.asList("azszrnwoiindfpw", "jylwbtlhflsj")) - .withVlanGroupNames(Arrays.asList("szfjvfbgofelja", "rqmq"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("ojnal", "hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws")) - .withIpGroupNames(Arrays.asList("hftqsxhqxujxukn", "xdigrjg", "ufzdmsyq", "fi"))) - .withEtherTypes(Arrays.asList("ibyqunyowxwlmdj")) - .withFragments( - Arrays.asList("fgbvfvpdbo", "acizsjqlhkrr", "bdeibqipqk", "hvxndzwmkrefajpj")) - .withIpLengths(Arrays.asList("kqnyh", "b")) - .withTtlValues( - Arrays.asList("jivfxzsjabib", "ystawfsdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo")) - .withDscpMarkings(Arrays.asList("jjklff", "mouwqlgzrfzeey")) - .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("dgmfpgvmpipasl", "haq", "x")) - .withPortGroupNames(Arrays.asList("wutwbdsre", "pdrhne", "yowqkdwytisibir")) - .withFlags(Arrays.asList("ikayuhqlbjbsybb"))))) - .withActions(Arrays - .asList(new AccessControlListAction().withType(AclActionType.DROP).withCounterName("z"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("mvpp"), - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("qzudphq"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("kfwynw"))))) - .withDynamicMatchConfigurations( - Arrays - .asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("ayhmtnvyqiatkz") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("wzcjaesgvvsccy")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("qfhwyg") - .withVlans(Arrays.asList("dnkfx", "semdwzrmu", "apfcqdpsq")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("svuo") - .withPorts(Arrays.asList("ccelve")), - new PortGroupProperties().withName("ypql") - .withPorts(Arrays.asList("okerqwkyhkobop", "xedk", "wep", "qpcrf")), - new PortGroupProperties().withName("wccsnjvcdwxlpqek") - .withPorts(Arrays.asList("khtj", "y", "ngwfqatm")))), - new CommonDynamicMatchConfiguration() - .withIpGroups( - Arrays - .asList( - new IpGroupProperties().withName("mdvy") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("gszywk", "irryuzhlh", "joqrvqqaatj", - "nrvgoupmfiibfgg")), - new IpGroupProperties().withName("ool") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("v", "kkgll")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("gvjayvblmh") - .withVlans(Arrays.asList("uhbxvvy", "gsopbyrqufegxu", "wz", "bnhlmc")), - new VlanGroupProperties().withName("p") - .withVlans(Arrays.asList("itvgbmhrixkwm", "ijejvegrhbpn")), - new VlanGroupProperties().withName("xexccbdreaxhcexd") - .withVlans(Arrays.asList("qahqkghtpwijn", "yjsvfyc", "z")))) - .withPortGroups( - Arrays.asList( - new PortGroupProperties().withName("owvrvmtgjqppyos") - .withPorts(Arrays.asList("nzm")), - new PortGroupProperties().withName("gfipnsxk") - .withPorts(Arrays.asList("a", "krrjrea", "xt", "gumhjglikkxws")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("qpvuzlmvfelf") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("crpw", "xeznoi")), - new IpGroupProperties().withName("rnjwmw") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("azej")), - new IpGroupProperties().withName("qkagfhsxt") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("xnfaazpxdtnk", "mkqjj")), - new IpGroupProperties().withName("uenvrkp") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("bre", "qaaysjkixqt")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ezl") - .withVlans(Arrays.asList("fiakpjpqqm", "edltmmjihyeozp")), - new VlanGroupProperties().withName("wau").withVlans(Arrays.asList("c")))) - .withPortGroups(Arrays - .asList( - new PortGroupProperties().withName("kvi") - .withPorts(Arrays.asList("scw", "qupevzh", "stotxh", "jujbypelmcuvhixb")), - new PortGroupProperties().withName("yfwnylr") - .withPorts(Arrays.asList("lsttpkiwkkbnuj")), - new PortGroupProperties() - .withName("wvtylbfpncurdo") - .withPorts(Arrays.asList("ithtywu", "xcbihw")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("dntwjchrdgo") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wct", "ndz", "luudfdlwggytsb", "tov")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("einqf") - .withVlans(Arrays.asList("x", "knpirgnepttwq", "sniffc", "mqnrojlpijnkr")), - new VlanGroupProperties().withName("rddh") - .withVlans(Arrays.asList("tizzronasxif")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("yzhftwesgogczh") - .withPorts(Arrays.asList("xkr", "gnyhmossxkkg", "h", "rghxjb")))))); - model = BinaryData.fromObject(model).toObject(AccessControlListPatchableProperties.class); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("lfltka", model.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("dlfoakggkfp", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2099147795702198960L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("movsmzlxwabmqoe", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("u", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ftwwaezkojvdc", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("oqouicybxarzgszu", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("onlwntoeg", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("wbw", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("blylsyxkqjnsj", - model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("zuempsbzkf", - model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("yvpnqicvinvkjj", - model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("wyfzqwhxxbuyqa", - model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("qdpfuvglsbjjca", - model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("ofudflvkgju", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("juetaebur", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("dut", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("z", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("ayhmtnvyqiatkz", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wzcjaesgvvsccy", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("qfhwyg", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("dnkfx", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("svuo", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("ccelve", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java new file mode 100644 index 000000000000..e5fde447c7e1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionPatchTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AccessControlListPortConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessControlListPortConditionPatch model = BinaryData.fromString( + "{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"fpafolpymwamxq\",\"rag\",\"gdphtvdula\",\"vl\"],\"portGroupNames\":[\"hcsrlzknmzl\"],\"flags\":[\"updwv\",\"phcnzqtpj\",\"mqrhvthl\",\"iwdcxsmlzzhzd\"]}") + .toObject(AccessControlListPortConditionPatch.class); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.layer4Protocol()); + Assertions.assertEquals("fpafolpymwamxq", model.ports().get(0)); + Assertions.assertEquals("hcsrlzknmzl", model.portGroupNames().get(0)); + Assertions.assertEquals("updwv", model.flags().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessControlListPortConditionPatch model + = new AccessControlListPortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("fpafolpymwamxq", "rag", "gdphtvdula", "vl")) + .withPortGroupNames(Arrays.asList("hcsrlzknmzl")) + .withFlags(Arrays.asList("updwv", "phcnzqtpj", "mqrhvthl", "iwdcxsmlzzhzd")); + model = BinaryData.fromObject(model).toObject(AccessControlListPortConditionPatch.class); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.layer4Protocol()); + Assertions.assertEquals("fpafolpymwamxq", model.ports().get(0)); + Assertions.assertEquals("hcsrlzknmzl", model.portGroupNames().get(0)); + Assertions.assertEquals("updwv", model.flags().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java index a10f38e70b00..dc9aacf11d36 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPortConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,28 +15,27 @@ public final class AccessControlListPortConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListPortCondition model = BinaryData.fromString( - "{\"flags\":[\"oljxkcgx\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"gcvizqzdwlvwlyou\",\"fgfb\"],\"portGroupNames\":[\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"]}") + "{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"p\"],\"portGroupNames\":[\"w\",\"qonmacj\"],\"flags\":[\"izsh\",\"vcimpev\",\"gmblrri\"]}") .toObject(AccessControlListPortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("gcvizqzdwlvwlyou", model.ports().get(0)); - Assertions.assertEquals("bdyhgkfminsgowz", model.portGroupNames().get(0)); - Assertions.assertEquals("oljxkcgx", model.flags().get(0)); + Assertions.assertEquals("p", model.ports().get(0)); + Assertions.assertEquals("w", model.portGroupNames().get(0)); + Assertions.assertEquals("izsh", model.flags().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListPortCondition model - = new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("gcvizqzdwlvwlyou", "fgfb")) - .withPortGroupNames(Arrays.asList("bdyhgkfminsgowz", "ttsttktlahbqact")) - .withFlags(Arrays.asList("oljxkcgx")); + AccessControlListPortCondition model = new AccessControlListPortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("p")) + .withPortGroupNames(Arrays.asList("w", "qonmacj")) + .withFlags(Arrays.asList("izsh", "vcimpev", "gmblrri")); model = BinaryData.fromObject(model).toObject(AccessControlListPortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("gcvizqzdwlvwlyou", model.ports().get(0)); - Assertions.assertEquals("bdyhgkfminsgowz", model.portGroupNames().get(0)); - Assertions.assertEquals("oljxkcgx", model.flags().get(0)); + Assertions.assertEquals("p", model.ports().get(0)); + Assertions.assertEquals("w", model.portGroupNames().get(0)); + Assertions.assertEquals("izsh", model.flags().get(0)); } } 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 index 419b9c380770..1a0e29234353 100644 --- 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 @@ -1,23 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.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.AccessControlListProperties; import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; 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.PoliceRateConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortType; import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; @@ -31,449 +39,573 @@ public final class AccessControlListPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessControlListProperties model = BinaryData.fromString( - "{\"lastSyncedTime\":\"2021-01-16T20:17:07Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"configurationType\":\"File\",\"aclsUrl\":\"i\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"xqbzvddntwnd\",\"sequenceNumber\":4634265215487541073,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"oqvuhr\",\"cffcyddglmj\"],\"fragments\":[\"qkwpyeicxmqc\",\"wqvhkhixuigdt\",\"pbobjo\"],\"ipLengths\":[\"e\"],\"ttlValues\":[\"m\"],\"dscpMarkings\":[\"rzayv\",\"t\",\"gvdfgiotkftutq\",\"ln\"],\"portCondition\":{\"flags\":[\"fgugnxkrxdqmid\",\"thz\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"bhj\",\"big\"],\"portGroupNames\":[\"qfbow\",\"kanyktzlcuiywg\",\"ywgndrv\"]},\"protocolTypes\":[\"zgpphrcgyncocpe\",\"fvm\",\"coofsxlzev\",\"bmqj\"],\"vlanMatchCondition\":{\"vlans\":[\"y\"],\"innerVlans\":[\"vkwlzuvccfwnf\",\"bacfionlebxetq\",\"tzxdpnqbqqwx\",\"jfeallnwsub\"],\"vlanGroupNames\":[\"jampmngnzscxaqw\",\"ochcbonqvpkvl\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ipheoflokeyyien\",\"bdlwtgrhpdjpj\",\"masxazjpqyegu\",\"lhbxxhejjzzvdud\"],\"ipGroupNames\":[\"slfhotwm\",\"ynpwlbj\",\"pgacftadehxnlty\"]}},{\"etherTypes\":[\"ppusuesnzwdejba\",\"orxzdmohctbqvud\",\"xdn\"],\"fragments\":[\"owgujjugwdkcglhs\"],\"ipLengths\":[\"jdyggdtji\"],\"ttlValues\":[\"kuofqweykhme\"],\"dscpMarkings\":[\"fyexfwhy\",\"cibvyvdcsitynn\"],\"portCondition\":{\"flags\":[\"ectehf\",\"qsc\",\"eypvhezrkg\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"fovgmkqsleyyvxy\",\"jpkcattpng\"],\"portGroupNames\":[\"cczsq\",\"jh\",\"mdajv\"]},\"protocolTypes\":[\"ounqecano\",\"eupfhyhltrpm\",\"pjmcmatuokthfuiu\",\"odsfcpkvxodpuozm\"],\"vlanMatchCondition\":{\"vlans\":[\"agfuaxbezyiu\",\"kktwhrdxw\",\"ywqsmbsurexim\",\"ryocfsfksymdd\"],\"innerVlans\":[\"kiiuxhqyudxor\"],\"vlanGroupNames\":[\"b\",\"oczvy\",\"fqrvkdvjsllrmvvd\",\"watkpnpulexxb\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"qzbqjvsov\",\"yokacspkw\"],\"ipGroupNames\":[\"dobpxjmflbvvn\",\"hrk\",\"ciwwzjuqkhr\",\"ajiwkuo\"]}},{\"etherTypes\":[\"kg\",\"sauuimj\",\"vxieduugidyj\"],\"fragments\":[\"byao\"],\"ipLengths\":[\"xc\"],\"ttlValues\":[\"pclhocohslk\"],\"dscpMarkings\":[\"eggzfb\",\"hfmvfaxkffe\"],\"portCondition\":{\"flags\":[\"lvmezyvshxmzsbbz\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xwburvjxxjns\",\"ydptkoen\"],\"portGroupNames\":[\"knvudwtiukb\",\"dng\",\"pocipazyxoegu\"]},\"protocolTypes\":[\"npiucgygevqznty\",\"mrbpizcdrqj\",\"dpydn\"],\"vlanMatchCondition\":{\"vlans\":[\"de\",\"ejzicwifsjtt\",\"zfbishcbkhaj\"],\"innerVlans\":[\"eamdp\",\"agalpbuxwgipwhon\",\"wkgshwa\",\"kix\"],\"vlanGroupNames\":[\"njeputtmrywn\",\"zoqftiyqzrnkcqvy\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"cohoq\",\"nwvlryavwhheunmm\",\"hgyxzkonoc\"],\"ipGroupNames\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"jektcxsenh\"},{\"type\":\"Drop\",\"counterName\":\"ffrzpwvlqdqgbiqy\"},{\"type\":\"Count\",\"counterName\":\"aetcktvfcivfs\"},{\"type\":\"Drop\",\"counterName\":\"uctqhjfbe\"}]},{\"matchConfigurationName\":\"jcxerfuwu\",\"sequenceNumber\":3193420375672203078,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"rp\"],\"fragments\":[\"pcyvahfnljkyqx\",\"vuujq\",\"idokgjlj\"],\"ipLengths\":[\"gvcl\",\"bgsncghkjeszzhb\"],\"ttlValues\":[\"txfvgx\",\"fsm\",\"nehmpvecx\",\"odebfqkkrbmpu\"],\"dscpMarkings\":[\"iw\",\"lzlfbxzpuz\",\"cispnqzahmgkbr\"],\"portCondition\":{\"flags\":[\"hibnuqqkpika\",\"rgvtqag\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ijggmebfsiar\",\"utrc\"],\"portGroupNames\":[\"azzmhjrunmpxt\"]},\"protocolTypes\":[\"hrbnlankxmyskpbh\"],\"vlanMatchCondition\":{\"vlans\":[\"kcxywnyt\",\"rsyn\",\"qidybyx\",\"zfcl\"],\"innerVlans\":[\"xdbabphlwr\",\"lfktsths\"],\"vlanGroupNames\":[\"cmnyyazttb\",\"wwrq\",\"uedck\",\"ywbiexzfeyueax\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"qwalmuzyoxaepd\"],\"ipGroupNames\":[\"ancuxrhd\",\"bavxbniwdjswzt\"]}},{\"etherTypes\":[\"pgn\"],\"fragments\":[\"x\"],\"ipLengths\":[\"xbzpfzab\",\"lcuhxwtctyqiklb\",\"ovplw\"],\"ttlValues\":[\"vgyuguos\",\"mkfssxqukkfplgm\",\"sxnkjzkdeslpvlo\"],\"dscpMarkings\":[\"yighxpk\"],\"portCondition\":{\"flags\":[\"aiuebbaumnyqu\",\"edeojnabc\",\"hsmtxpsiebtfhvp\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"rdqmhjjdhtldwkyz\",\"uutkncw\"],\"portGroupNames\":[\"svlxotogtwrup\",\"sx\",\"nmic\",\"kvceoveilovnotyf\"]},\"protocolTypes\":[\"njbkcnxdhbttkph\",\"wpn\",\"jtoqne\"],\"vlanMatchCondition\":{\"vlans\":[\"fpl\",\"hoxus\"],\"innerVlans\":[\"abgy\",\"psbjta\"],\"vlanGroupNames\":[\"gxywpmue\",\"fjz\",\"fqkquj\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"bglaocqxtccm\",\"yudxytlmoy\",\"xv\"],\"ipGroupNames\":[\"dw\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"dzhlrq\"},{\"type\":\"Log\",\"counterName\":\"kfrlhrxsbky\"},{\"type\":\"Drop\",\"counterName\":\"anuzbpzkafkuw\"},{\"type\":\"Count\",\"counterName\":\"wbme\"}]},{\"matchConfigurationName\":\"seyvj\",\"sequenceNumber\":2840663437896188419,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"etherTypes\":[\"deemao\",\"mx\",\"gkvtmelmqkrhah\",\"ljuahaquhcdh\"],\"fragments\":[\"alaexqpvfadmwsrc\",\"gvxp\",\"gomz\",\"fmisg\"],\"ipLengths\":[\"b\",\"e\"],\"ttlValues\":[\"wkz\"],\"dscpMarkings\":[\"io\",\"rqhakauha\",\"hsfwxosowzxcug\"],\"portCondition\":{\"flags\":[\"oxdjebwpuc\",\"wfvovbv\",\"euecivyhzceuoj\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"eiotwmcdytdx\",\"it\",\"nrjawgqwg\"],\"portGroupNames\":[\"isk\"]},\"protocolTypes\":[\"kpycgklwndnhjd\",\"uwhvylwzbtdhxujz\"],\"vlanMatchCondition\":{\"vlans\":[\"ow\"],\"innerVlans\":[\"rzqlveu\",\"lupj\"],\"vlanGroupNames\":[\"fxobbcsws\",\"tjrip\",\"rbpbewtghfgblcg\",\"xzvlvqhjkbegib\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"waloayqcgwr\",\"zjuzgwyz\",\"htxongmtsavjc\",\"pwxqp\"],\"ipGroupNames\":[\"nftguvriuhpr\",\"mdyvxqtayriw\",\"ro\"]}},{\"etherTypes\":[\"exrmcqibycnojvk\",\"mefqsgzvahapjyzh\"],\"fragments\":[\"qzcjrvxdj\",\"lmwlxkvugfhzo\"],\"ipLengths\":[\"jvzunluthnnp\",\"nxipeil\",\"jzuaejxdultskzbb\"],\"ttlValues\":[\"umveekgpwozuhkf\",\"bsjyofdx\",\"uusdttouwa\"],\"dscpMarkings\":[\"kqvkelnsmvbxwyjs\",\"lh\"],\"portCondition\":{\"flags\":[\"lnjixisxya\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"cslyjpk\",\"idzyexznelixhnr\",\"tfolhbnx\"],\"portGroupNames\":[\"laulppg\",\"dtpnapnyiropuhp\",\"gvpgy\",\"gqgitxmedjvcsl\"]},\"protocolTypes\":[\"wwncwzzhxgk\",\"rmgucnap\"],\"vlanMatchCondition\":{\"vlans\":[\"ellwptfdy\",\"pfqbuaceopzf\"],\"innerVlans\":[\"huaoppp\",\"qeqxo\"],\"vlanGroupNames\":[\"ahzxctobgbk\",\"moizpos\",\"mgrcfbu\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kxbpvj\",\"mjh\"],\"ipGroupNames\":[\"yngudivk\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"qzvszjf\"},{\"type\":\"Log\",\"counterName\":\"fdxxivetvtcqaqtd\"}]},{\"matchConfigurationName\":\"mcbxvwvxysl\",\"sequenceNumber\":2902711033817845170,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"etherTypes\":[\"tkblmpewww\",\"bkrvrnsvshqj\",\"hxcr\"],\"fragments\":[\"ovasrruvwbhsqfsu\",\"cgjbirxbp\"],\"ipLengths\":[\"rfbjf\",\"twss\",\"t\"],\"ttlValues\":[\"vjz\",\"exilzznfqqnvwpmq\"],\"dscpMarkings\":[\"uoujmkcjhwqy\",\"jrybnwjewgdrjer\"],\"portCondition\":{\"flags\":[\"nqpeh\"],\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"mifthnzdnd\",\"l\",\"nayqi\"],\"portGroupNames\":[\"duhavhqlkt\",\"umaq\",\"lbg\",\"cdui\"]},\"protocolTypes\":[\"gccymvaolpssl\",\"lfmmdnbbglzpswi\",\"d\",\"cwyhzdxssa\"],\"vlanMatchCondition\":{\"vlans\":[\"nvdfznuda\",\"dvxzbncblylpst\"],\"innerVlans\":[\"hxsrzdzucersc\"],\"vlanGroupNames\":[\"nevf\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"sslswtmweriof\",\"pyqs\"],\"ipGroupNames\":[\"abnetshh\"]}},{\"etherTypes\":[\"edplvwiwubmw\"],\"fragments\":[\"sldnkwwtppjflcxo\"],\"ipLengths\":[\"konzmnsik\",\"mkqzeqqkdltfzxmh\",\"v\",\"gureodkwobdag\"],\"ttlValues\":[\"bqdxbx\",\"akbogqxndlkzgxh\",\"ripl\",\"podxunkb\"],\"dscpMarkings\":[\"mubyynt\",\"lrb\",\"tkoievseotgq\",\"l\"],\"portCondition\":{\"flags\":[\"wlauwzizxbmpg\"],\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"muvp\",\"ttdumorppxebmnzb\",\"bhjpglkfgohdne\",\"el\"],\"portGroupNames\":[\"sdyhtozfikdowwq\"]},\"protocolTypes\":[\"xzxcl\"],\"vlanMatchCondition\":{\"vlans\":[\"hqzonosggbhcoh\",\"wdsjnkalju\",\"iiswacffgdkzze\"],\"innerVlans\":[\"vhqcrail\",\"pnppfuf\"],\"vlanGroupNames\":[\"dmhdlxyjr\",\"sag\",\"fcnihgwq\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"cvkcvqvpkeqdcv\",\"rhvoods\",\"tbobz\"],\"ipGroupNames\":[\"cjwvn\",\"dldwmgxc\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"utwu\"},{\"type\":\"Log\",\"counterName\":\"pkhjwni\"},{\"type\":\"Log\",\"counterName\":\"uicpd\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"vmbmp\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"fv\",\"efyw\"]}],\"vlanGroups\":[{\"name\":\"vmwy\",\"vlans\":[\"ouyftaakc\",\"wiyzvqtmnubexkp\"]},{\"name\":\"smond\",\"vlans\":[\"uxvypomgkopkwh\",\"jvp\",\"jqg\"]},{\"name\":\"smocmbq\",\"vlans\":[\"mkcxozapvh\",\"lxprglyatddckcbc\"]}],\"portGroups\":[{\"name\":\"jxgciqibrh\",\"ports\":[\"sdqrhzoymibmrq\",\"ibahwflus\",\"dtmhrkwofyyvoqa\",\"piexpbtgiw\"]},{\"name\":\"oenwashr\",\"ports\":[\"kcnqxwbpo\",\"ulpiuj\"]},{\"name\":\"asipqiio\",\"ports\":[\"qerpqlpqwcc\",\"uqgbdbutauvfbt\",\"uwhhmhykojoxafn\"]},{\"name\":\"lpichk\",\"ports\":[\"kcdyhbpk\",\"pwdreqnovvqf\",\"vljxywsu\",\"syrsndsytgadgvra\"]}]},{\"ipGroups\":[{\"name\":\"e\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"]}],\"vlanGroups\":[{\"name\":\"aknynfsynljphuop\",\"vlans\":[\"lqiyntorzihl\",\"osjswsr\",\"slyzrpzbchckqq\"]}],\"portGroups\":[{\"name\":\"xiy\",\"ports\":[\"i\",\"ynkedyatrwyhqmib\",\"yhwitsmypyynpcdp\",\"mnzgmwznmabi\"]},{\"name\":\"sorgj\",\"ports\":[\"ldtlwwr\",\"kdmtncvokotll\"]},{\"name\":\"yhgsy\",\"ports\":[\"gjltdtbnnhado\",\"crkvcikhnv\",\"amqgxqquezikyw\",\"gxk\"]}]},{\"ipGroups\":[{\"name\":\"tmelw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"cjzkzivgvvcna\",\"rhyrnxxmueed\",\"drd\"]}],\"vlanGroups\":[{\"name\":\"wq\",\"vlans\":[\"healmfmtda\"]},{\"name\":\"gdv\",\"vlans\":[\"piohgwxrtfu\",\"xepxgyqagvrvmn\",\"k\",\"kghimdblxgwimfnj\"]},{\"name\":\"j\",\"vlans\":[\"szkkfoqre\",\"fkzikfj\"]}],\"portGroups\":[{\"name\":\"a\",\"ports\":[\"wczelpci\",\"elsfeaen\",\"abfatkl\"]}]},{\"ipGroups\":[{\"name\":\"jhwuaanozjos\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"l\",\"jrvxaglrv\"]},{\"name\":\"jwosytxitcskfck\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ekkezzikhlyfjh\",\"gqggebdunygae\"]},{\"name\":\"db\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"xllrxcyjm\",\"a\"]},{\"name\":\"uvarmywdmjsjq\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"x\",\"rw\",\"yc\"]}],\"vlanGroups\":[{\"name\":\"p\",\"vlans\":[\"gymare\",\"n\",\"jxqugjhky\",\"ubeddg\"]},{\"name\":\"ofwq\",\"vlans\":[\"alkrmn\"]},{\"name\":\"jpxac\",\"vlans\":[\"dfnbyxbaaabjyv\",\"yffimrzrtuzqogs\",\"xnevfdnwn\"]}],\"portGroups\":[{\"name\":\"zsyyceuzso\",\"ports\":[\"ud\",\"frxtrthzvaytdwk\"]},{\"name\":\"rqubpaxhexiil\",\"ports\":[\"dtiirqt\",\"qoaxoruzfgs\"]},{\"name\":\"yfxrx\",\"ports\":[\"ptramxj\",\"zwl\"]},{\"name\":\"wxuqlcvydypatdoo\",\"ports\":[\"kniod\",\"oo\"]}]}],\"annotation\":\"wnujhemmsbvdk\"}") + "{\"annotation\":\"v\",\"configurationType\":\"Inline\",\"aclsUrl\":\"gwdslfhotwm\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"bjnpg\",\"sequenceNumber\":4922956716051761075,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"ltyfsop\",\"usue\",\"nzwdejba\",\"orxzdmohctbqvud\"],\"vlanMatchCondition\":{\"vlans\":[\"dnvowg\",\"jjugwdkcglhslaz\"],\"innerVlans\":[\"ggd\",\"jixhbk\",\"ofqweykhmenevfye\"],\"vlanGroupNames\":[\"hybcibv\",\"vdcsitynn\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"hfiqscjeypvhe\"],\"ipGroupNames\":[\"gqhcjrefovg\",\"kqsleyyvxy\",\"jpkcattpng\"]},\"etherTypes\":[\"cczsq\",\"jh\",\"mdajv\"],\"fragments\":[\"ounqecano\",\"eupfhyhltrpm\",\"pjmcmatuokthfuiu\",\"odsfcpkvxodpuozm\"],\"ipLengths\":[\"dagfuaxbezyiuok\",\"twhrdxwzywqsm\",\"surex\"],\"ttlValues\":[\"ryocfsfksymdd\"],\"dscpMarkings\":[\"kiiuxhqyudxor\"],\"protocolNeighbors\":[\"b\",\"oczvy\",\"fqrvkdvjsllrmvvd\",\"watkpnpulexxb\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"iqzbq\",\"vsovmyokac\",\"pkwlhz\",\"obpxjmflbvvn\"],\"portGroupNames\":[\"kcciwwzjuqkhr\",\"ajiwkuo\",\"oskg\"],\"flags\":[\"uuimjmvxieduug\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"rrfbyaosvexcson\",\"clhocohsl\",\"ev\"]}}],\"actions\":[{\"type\":\"PoliceRate\",\"counterName\":\"buhfmvfaxkffeiit\",\"remarkComment\":\"vmezy\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Log\",\"counterName\":\"bbzoggig\",\"remarkComment\":\"wburvjxxjnspydpt\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"ou\",\"sequenceNumber\":4770625795152617538,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"bldngkpoc\",\"pazyxoegukg\",\"npiucgygevqznty\",\"mrbpizcdrqj\"],\"vlanMatchCondition\":{\"vlans\":[\"dnfyhxdeoejzicwi\",\"sjttgzfbish\",\"bkh\",\"jdeyeamdpha\"],\"innerVlans\":[\"pbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"vlanGroupNames\":[\"uttmrywnuzoqft\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"qvyxlwhzlsicoho\",\"qnwvlrya\",\"w\",\"heun\"],\"ipGroupNames\":[\"hgyxzkonoc\",\"koklya\",\"uconuqszfkbey\",\"ewrmjmwvvjektc\"]},\"etherTypes\":[\"nhwlrsffrzpwvl\",\"dqgbiqylihkaetc\"],\"fragments\":[\"fcivfsnkym\",\"ctq\",\"jf\",\"ebrjcxe\"],\"ipLengths\":[\"wutttxfvjrbi\",\"phxepcyvahf\",\"ljkyqxjvuuj\",\"gidokgjljyoxgvcl\"],\"ttlValues\":[\"sncghkjeszz\",\"bijhtxfvgxbf\",\"mxnehmp\"],\"dscpMarkings\":[\"xgodebfqkkrbmp\",\"kgriwflzlfbx\"],\"protocolNeighbors\":[\"zycispn\",\"zahmgkbrpyydhibn\",\"qqkpikadrg\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"uynhijg\",\"mebf\",\"iarbutrcvpna\"],\"portGroupNames\":[\"hj\",\"unmpxttd\",\"hrbnlankxmyskpbh\",\"nbtkcxywnytnr\"],\"flags\":[\"lqidyby\",\"czfc\",\"haaxdbabphl\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"fkts\",\"hsucoc\"]}},{\"protocolTypes\":[\"yazttbtwwrqpue\",\"ckzywbiexzfeyue\"],\"vlanMatchCondition\":{\"vlans\":[\"xujwbhqwalmuzyo\"],\"innerVlans\":[\"pdkzjancuxr\",\"d\"],\"vlanGroupNames\":[\"v\",\"bniwdj\",\"wz\",\"s\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"x\"],\"ipGroupNames\":[\"xbzpfzab\",\"lcuhxwtctyqiklb\",\"ovplw\"]},\"etherTypes\":[\"vgyuguos\",\"mkfssxqukkfplgm\",\"sxnkjzkdeslpvlo\"],\"fragments\":[\"yighxpk\"],\"ipLengths\":[\"baiuebbaumny\"],\"ttlValues\":[\"edeojnabc\"],\"dscpMarkings\":[\"mtxpsiebtfh\",\"pesapskrdqmhjj\",\"htldwk\"],\"protocolNeighbors\":[\"uutkncw\",\"cwsvlxotog\",\"wrupqsxvnmicykvc\",\"o\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"oty\",\"jfcn\",\"bkc\",\"x\"],\"portGroupNames\":[\"ttkphywpnvjtoqne\"],\"flags\":[\"lfplp\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"scrpabgyepsbjt\",\"zq\",\"gxywpmue\",\"fjz\"]}},{\"protocolTypes\":[\"kqujidsuyono\",\"glaocq\",\"tcc\"],\"vlanMatchCondition\":{\"vlans\":[\"dxyt\",\"moyrxvwfudwpz\",\"txhdzh\"],\"innerVlans\":[\"jbhckfrlhr\"],\"vlanGroupNames\":[\"kyv\",\"ycanuzbpzkafku\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ehhseyvjusrts\",\"hspkdeemao\",\"mx\",\"gkvtmelmqkrhah\"],\"ipGroupNames\":[\"uahaquhcdhmd\",\"alaexqpvfadmwsrc\",\"gvxp\",\"gomz\"]},\"etherTypes\":[\"isgwbnbbeldawkz\",\"ali\"],\"fragments\":[\"qhakauhashsf\",\"xosow\",\"xcug\"],\"ipLengths\":[\"ooxdjebwpuc\",\"wfvovbv\",\"euecivyhzceuoj\"],\"ttlValues\":[\"wjue\"],\"dscpMarkings\":[\"wmcdytdxwi\"],\"protocolNeighbors\":[\"rjaw\",\"qwgxhniskx\",\"bkpyc\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"hjdauwhvylwz\",\"tdhxujznbmpowuwp\"],\"portGroupNames\":[\"lve\",\"alupjm\",\"hfxobbcswsrtj\",\"iplrbpbewtghfgb\"],\"flags\":[\"wxzvlvqhjkb\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"t\"]}},{\"protocolTypes\":[\"iebwwaloayqcgwrt\",\"j\",\"zg\",\"yzm\"],\"vlanMatchCondition\":{\"vlans\":[\"ngmtsavjcb\",\"wxqpsrknftguvri\"],\"innerVlans\":[\"rwmdyvxqtay\",\"iwwroyqbexrmc\",\"ibycno\"],\"vlanGroupNames\":[\"nmefqsgzvahapj\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"cjrvxdjzlmwlxkv\",\"gfhzovawjvzunlut\",\"nnprn\",\"i\"],\"ipGroupNames\":[\"lpjzuaejxdu\",\"tskzbbtdzumveek\",\"pwo\",\"uh\"]},\"etherTypes\":[\"bsjyofdx\"],\"fragments\":[\"sd\"],\"ipLengths\":[\"uwaboekqvke\",\"nsmvbxwyj\",\"flhhcaal\",\"jixisxyawjoyaqcs\"],\"ttlValues\":[\"pkii\",\"zyexzn\",\"lixhnrztfol\",\"bnxknalaulppg\"],\"dscpMarkings\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"],\"protocolNeighbors\":[\"xgk\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"apkteoellwptfdyg\",\"fqbuaceopzf\",\"rhhuaopppcqeqx\"],\"portGroupNames\":[\"dahzxctobg\"],\"flags\":[\"moizpos\",\"mgrcfbu\",\"rmfqjhhkxbpvj\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"xxjyngudivkrtsw\"]}}],\"actions\":[{\"type\":\"Log\",\"counterName\":\"zjf\",\"remarkComment\":\"vjfdx\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"cqaqtdoqmcbx\",\"remarkComment\":\"vxysl\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"xoblytkbl\",\"sequenceNumber\":5739741395116766160,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"vrnsvshqjohxc\",\"sbfov\",\"srruvwbhsqfsubcg\",\"birx\"],\"vlanMatchCondition\":{\"vlans\":[\"srfbjfdtwss\",\"t\"],\"innerVlans\":[\"vjz\",\"exilzznfqqnvwpmq\"],\"vlanGroupNames\":[\"uoujmkcjhwqy\",\"jrybnwjewgdrjer\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"hin\"],\"ipGroupNames\":[\"gmifthnzd\"]},\"etherTypes\":[\"l\"],\"fragments\":[\"yq\",\"gynduha\",\"hqlkthumaqo\"],\"ipLengths\":[\"ycduier\",\"gccymvaolpssl\"],\"ttlValues\":[\"mmdnbbglzps\",\"iydmcwyhzdxs\"],\"dscpMarkings\":[\"bzmnvdfznud\"],\"protocolNeighbors\":[\"vxzbncb\",\"ylpstdbhhxsrzdz\",\"cers\",\"dntnevf\"],\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"dsslswt\"],\"portGroupNames\":[\"riofzpyqse\",\"wab\",\"ets\"],\"flags\":[\"zhedplvwiw\",\"bmwmbesldnkw\",\"tppjflcx\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"konzmnsik\",\"mkqzeqqkdltfzxmh\",\"v\",\"gureodkwobdag\"]}},{\"protocolTypes\":[\"bqdxbx\",\"akbogqxndlkzgxh\",\"ripl\",\"podxunkb\"],\"vlanMatchCondition\":{\"vlans\":[\"ubyyntw\",\"rbqtkoie\"],\"innerVlans\":[\"otgqrlltmu\"],\"vlanGroupNames\":[\"uwz\",\"zxb\",\"pgcjefuzmuvp\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"p\"],\"ipGroupNames\":[\"bmnzbtbhjpgl\",\"fgohdneuelfphs\",\"yhtozfikdowwqu\",\"v\"]},\"etherTypes\":[\"clvit\",\"hqzonosggbhcoh\"],\"fragments\":[\"sjnkal\",\"utiiswacf\"],\"ipLengths\":[\"k\",\"zewk\",\"vhqcrail\",\"pnppfuf\"],\"ttlValues\":[\"dmhdlxyjr\",\"sag\",\"fcnihgwq\"],\"dscpMarkings\":[\"edgfbcvkcvq\",\"pkeqdcvdrhvoo\"],\"protocolNeighbors\":[\"tbobz\",\"opcjwvnhd\",\"d\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"portGroupNames\":[\"zzlvmbmpaxmodfv\",\"efyw\",\"bpfvm\",\"yhrfouyftaakcpw\"],\"flags\":[\"vqtmnub\",\"xkp\",\"ksmond\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"xvy\",\"omgkopkwho\",\"v\",\"ajqgxy\"]}},{\"protocolTypes\":[\"cmbqfqvmk\",\"xozap\",\"helxprglya\",\"dd\"],\"vlanMatchCondition\":{\"vlans\":[\"cuejrjxgci\",\"ibrhosxsdqr\",\"zoymibmrqyibahw\"],\"innerVlans\":[\"szdtmhrkwof\",\"yvoqa\",\"piexpbtgiw\"],\"vlanGroupNames\":[\"enwash\",\"tdtkcn\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"lpiujwaa\",\"ipqiiobyuqerpq\"],\"ipGroupNames\":[\"wcciuqgbdbu\",\"auvfbtkuwhhmhyk\"]},\"etherTypes\":[\"xafnndlpichko\",\"mkcdyhbpkkpwdre\"],\"fragments\":[\"vvqfovljxyws\",\"w\",\"yrs\",\"dsytgadgvr\"],\"ipLengths\":[\"en\",\"qnzarrwl\",\"uu\"],\"ttlValues\":[\"qkacewii\"],\"dscpMarkings\":[\"ubjibww\",\"f\"],\"protocolNeighbors\":[\"qkvpuvksgplsakn\",\"n\",\"synljphuopxodl\",\"iyntorzihle\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"mslyzrpzbchckqqz\",\"ioxiysuiizyn\",\"edyatrwyhqmibzyh\",\"itsmypyyn\"],\"portGroupNames\":[\"pumnz\",\"mwzn\",\"abikns\"],\"flags\":[\"jhxbld\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"rlkdmtncvokotl\",\"xdy\"]}}],\"actions\":[{\"type\":\"Drop\",\"counterName\":\"ogjltdtbnnhad\",\"remarkComment\":\"crkvcikhnv\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Count\",\"counterName\":\"queziky\",\"remarkComment\":\"gxk\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Log\",\"counterName\":\"lwuip\",\"remarkComment\":\"cjzkzivgvvcna\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}},{\"type\":\"Drop\",\"counterName\":\"xmueed\",\"remarkComment\":\"rdvstkwqqtch\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]},{\"matchConfigurationName\":\"mtdaa\",\"sequenceNumber\":8743531212516395266,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"hgwxrtfudx\",\"pxgy\",\"agvrvmnpkuk\",\"himdbl\"],\"vlanMatchCondition\":{\"vlans\":[\"mfnjh\",\"j\",\"wmszkk\"],\"innerVlans\":[\"rey\",\"kzikfjawneaivxwc\"],\"vlanGroupNames\":[\"pcirelsfeaen\",\"abfatkl\",\"dxbjhwuaanozj\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"pjrvxagl\"],\"ipGroupNames\":[\"mjwosytx\",\"tcs\"]},\"etherTypes\":[\"k\",\"qumiek\",\"ez\",\"ikh\"],\"fragments\":[\"jhdgqggebdunyga\",\"qidbqfatpxllrxcy\"],\"ipLengths\":[\"a\",\"su\"],\"ttlValues\":[\"m\"],\"dscpMarkings\":[\"mjsjqb\",\"hhyxxrw\"],\"protocolNeighbors\":[\"oduhp\"],\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"re\",\"n\"],\"portGroupNames\":[\"qugjhkycube\",\"dgssofwqmzqal\",\"rmnjijpx\",\"cqqudf\"],\"flags\":[\"xbaaabjyv\",\"yffimrzrtuzqogs\",\"xnevfdnwn\",\"mewzsyyc\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"oibjudpfrxtrthz\",\"aytdwkqbrq\",\"bpaxhexiilivpdt\"]}},{\"protocolTypes\":[\"q\"],\"vlanMatchCondition\":{\"vlans\":[\"axoruzfgsquy\",\"xrxxlep\",\"ramxjezwlwnw\"],\"innerVlans\":[\"lcvydy\",\"atdooaojkniod\"],\"vlanGroupNames\":[\"ebwnujhe\",\"msbvdkcrodtjinf\",\"jlfltkacjvefkdlf\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"agaowpulpqblylsy\",\"k\"],\"ipGroupNames\":[\"sjervti\"]},\"etherTypes\":[\"sdszue\",\"psbzkfzbeyvpn\",\"icvi\"],\"fragments\":[\"jjxd\"],\"ipLengths\":[\"uukzclewyhmlw\",\"aztz\",\"ofncckwyfzqwhxxb\",\"yq\"],\"ttlValues\":[\"feqztppriol\",\"or\",\"altol\"],\"dscpMarkings\":[\"wsobqwcsdbn\",\"dcfhucqdpf\",\"vglsbjjca\"],\"protocolNeighbors\":[\"bvtvudutncormr\",\"xqtvcofu\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"u\"],\"portGroupNames\":[\"knnqvsaznq\",\"tor\",\"dsg\"],\"flags\":[\"mkycgra\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"etaebu\",\"u\"]}},{\"protocolTypes\":[\"ovsm\",\"l\",\"wabm\",\"oefki\"],\"vlanMatchCondition\":{\"vlans\":[\"puqujmqlgkfbtn\",\"oaongbjc\"],\"innerVlans\":[\"jitcjedftwwaez\",\"ojvdcpzfoqo\",\"i\"],\"vlanGroupNames\":[\"xarzgszufoxciq\",\"p\",\"doamciodhkha\",\"xkhnzbonlwnto\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"hksz\",\"cmrvexzt\",\"bt\",\"gsfraoyzkoow\"],\"ipGroupNames\":[\"nguxawqaldsy\",\"uximerqfobw\",\"znkbykutwpfhpagm\",\"r\"]},\"etherTypes\":[\"snfdsdoakgtdl\",\"kkze\",\"dlhewp\",\"sdsttwvog\"],\"fragments\":[\"ejdcngqqmoakuf\",\"m\"],\"ipLengths\":[\"wr\"],\"ttlValues\":[\"twaenuuzko\",\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"dscpMarkings\":[\"hoftr\",\"ae\",\"u\",\"ah\"],\"protocolNeighbors\":[\"slfaoqzpiyyl\",\"alnswhccsphk\",\"ivwitqscywugg\",\"oluhczbwemh\"],\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"z\"],\"portGroupNames\":[\"swe\",\"pqwd\",\"ggicccnxqhue\",\"mkttlstvlzywem\"],\"flags\":[\"ncsdtclusiyp\",\"sfgytguslfead\",\"ygqukyhejh\"]},\"icmpConfiguration\":{\"icmpTypes\":[\"gfpelolppvksrpqv\",\"jzraehtwdwrf\",\"swibyr\"]}}],\"actions\":[{\"type\":\"Count\",\"counterName\":\"hfwpracstwit\",\"remarkComment\":\"hevxcced\",\"policeRateConfiguration\":{\"bitRate\":{},\"burstSize\":{}}}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"wzxltjc\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"iugcxnavvwxq\",\"byqunyow\",\"wlmdjrkv\"]},{\"name\":\"bvfvpdbod\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"j\"]},{\"name\":\"hkr\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ibqipqkg\"]},{\"name\":\"xndzwm\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"jpjorwkqnyhgb\",\"j\"]}],\"vlanGroups\":[{\"name\":\"fxzsjabibsyst\",\"vlans\":[\"sdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"]},{\"name\":\"hjjklff\",\"vlans\":[\"uwqlgzrfzeey\"]},{\"name\":\"izikayuhq\",\"vlans\":[\"bs\",\"bbqwrvtldg\"]},{\"name\":\"pgvmpipaslthaqfx\",\"vlans\":[\"wutwbdsre\",\"pdrhne\",\"yowqkdwytisibir\"]}],\"portGroups\":[{\"name\":\"kpzi\",\"ports\":[\"zanl\"]},{\"name\":\"xi\",\"ports\":[\"mbzonokix\",\"jq\"]}]},{\"ipGroups\":[{\"name\":\"zpfrla\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"woiindf\",\"wp\"]}],\"vlanGroups\":[{\"name\":\"bt\",\"vlans\":[\"lsj\",\"dhszfjv\"]},{\"name\":\"gofel\",\"vlans\":[\"rqmq\",\"ldvriiiojnalghfk\",\"tvsexsowuel\"]}],\"portGroups\":[{\"name\":\"ahhxvrh\",\"ports\":[\"wpjgwws\",\"ughftqsx\",\"qxujxukndxd\",\"grjguufzd\"]},{\"name\":\"yqtfihwh\",\"ports\":[\"z\",\"ngamvpphosz\",\"zudphqamvdkfw\"]},{\"name\":\"wcvtbvkayhmtnvyq\",\"ports\":[\"kzwpcnpw\",\"cjaesgvvs\",\"cyajguqf\"]},{\"name\":\"ygz\",\"ports\":[\"nk\",\"xu\"]}]},{\"ipGroups\":[{\"name\":\"wzrmuh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"dpsqx\",\"vpsvuoymgcce\",\"vezrypqlmfeo\"]},{\"name\":\"rqwky\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"pg\",\"edkowepbqpcrfk\",\"wccsnjvcdwxlpqek\"]},{\"name\":\"nkhtjsyingw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tdhtmdvyp\"]},{\"name\":\"kdgszywkbirr\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"hkjoqr\",\"qqaatjinrvgou\",\"mfiibfggj\"]}],\"vlanGroups\":[{\"name\":\"vrwxkv\",\"vlans\":[\"gllqwjy\"]},{\"name\":\"jayvblmhv\",\"vlans\":[\"hbxvvyhgsopbyrqu\",\"egxuvwzf\"]}],\"portGroups\":[{\"name\":\"mctlpdngitv\",\"ports\":[\"hrixkwmy\",\"jejveg\",\"hbpnaixexccbd\",\"eaxhcexdrrvqahqk\"]},{\"name\":\"tpwijnh\",\"ports\":[\"vfycxzb\",\"voowvr\",\"mtg\"]},{\"name\":\"ppyostronzmyhgf\",\"ports\":[\"sxkm\",\"waekrrjreafxtsgu\",\"hjglikk\",\"wslolbqp\"]},{\"name\":\"zlmvfelfktgp\",\"ports\":[\"pwjxezn\"]}]}],\"lastSyncedTime\":\"2021-08-02T02:33:40Z\",\"aclType\":\"Tenant\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"nbsazejjoqkag\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"}") .toObject(AccessControlListProperties.class); - Assertions.assertEquals("wnujhemmsbvdk", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("i", model.aclsUrl()); + Assertions.assertEquals("v", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("gwdslfhotwm", model.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("xqbzvddntwnd", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4634265215487541073L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("zgpphrcgyncocpe", + Assertions.assertEquals("bjnpg", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4922956716051761075L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("ltyfsop", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("y", + Assertions.assertEquals("dnvowg", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vkwlzuvccfwnf", + Assertions.assertEquals("ggd", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("jampmngnzscxaqw", + Assertions.assertEquals("hybcibv", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ipheoflokeyyien", + Assertions.assertEquals("hfiqscjeypvhe", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("slfhotwm", + Assertions.assertEquals("gqhcjrefovg", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("oqvuhr", + Assertions.assertEquals("cczsq", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("qkwpyeicxmqc", + Assertions.assertEquals("ounqecano", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("e", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("m", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("rzayv", + Assertions.assertEquals("dagfuaxbezyiuok", + model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("ryocfsfksymdd", + model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("kiiuxhqyudxor", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("b", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.SCTP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("bhj", + Assertions.assertEquals("iqzbq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("qfbow", + Assertions.assertEquals("kcciwwzjuqkhr", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("fgugnxkrxdqmid", + Assertions.assertEquals("uuimjmvxieduug", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("jektcxsenh", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("vmbmp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, + Assertions.assertEquals("rrfbyaosvexcson", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.POLICE_RATE, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("buhfmvfaxkffeiit", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("vmezy", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("wzxltjc", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("fv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("vmwy", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ouyftaakc", + Assertions.assertEquals("iugcxnavvwxq", + model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("fxzsjabibsyst", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("sdjpvkvp", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("jxgciqibrh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("sdqrhzoymibmrq", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("kpzi", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("zanl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.TENANT, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalAccessControlListActions().enableCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessControlListProperties model - = new AccessControlListProperties().withAnnotation("wnujhemmsbvdk") - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("i") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations( - Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("xqbzvddntwnd") - .withSequenceNumber(4634265215487541073L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( + AccessControlListProperties model = new AccessControlListProperties().withAnnotation("v") + .withConfigurationType(ConfigurationType.INLINE) + .withAclsUrl("gwdslfhotwm") + .withDefaultAction(CommunityActionTypes.DENY) + .withMatchConfigurations(Arrays.asList( + new AccessControlListMatchConfiguration().withMatchConfigurationName("bjnpg") + .withSequenceNumber(4922956716051761075L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("ltyfsop", "usue", "nzwdejba", "orxzdmohctbqvud")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("dnvowg", "jjugwdkcglhslaz")) + .withInnerVlans(Arrays.asList("ggd", "jixhbk", "ofqweykhmenevfye")) + .withVlanGroupNames(Arrays.asList("hybcibv", "vdcsitynn"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("hfiqscjeypvhe")) + .withIpGroupNames(Arrays.asList("gqhcjrefovg", "kqsleyyvxy", "jpkcattpng"))) + .withEtherTypes(Arrays.asList("cczsq", "jh", "mdajv")) + .withFragments( + Arrays.asList("ounqecano", "eupfhyhltrpm", "pjmcmatuokthfuiu", "odsfcpkvxodpuozm")) + .withIpLengths(Arrays.asList("dagfuaxbezyiuok", "twhrdxwzywqsm", "surex")) + .withTtlValues(Arrays.asList("ryocfsfksymdd")) + .withDscpMarkings(Arrays.asList("kiiuxhqyudxor")) + .withProtocolNeighbors(Arrays.asList("b", "oczvy", "fqrvkdvjsllrmvvd", "watkpnpulexxb")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("iqzbq", "vsovmyokac", "pkwlhz", "obpxjmflbvvn")) + .withPortGroupNames(Arrays.asList("kcciwwzjuqkhr", "ajiwkuo", "oskg")) + .withFlags(Arrays.asList("uuimjmvxieduug"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("rrfbyaosvexcson", "clhocohsl", "ev"))))) + .withActions(Arrays.asList( + new AccessControlListAction().withType(AclActionType.POLICE_RATE) + .withCounterName("buhfmvfaxkffeiit") + .withRemarkComment("vmezy") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("bbzoggig") + .withRemarkComment("wburvjxxjnspydpt") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties() + .withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("ou") + .withSequenceNumber(4770625795152617538L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions( + Arrays + .asList( new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("zgpphrcgyncocpe", "fvm", "coofsxlzev", "bmqj")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("y")) - .withInnerVlans(Arrays.asList("vkwlzuvccfwnf", "bacfionlebxetq", "tzxdpnqbqqwx", - "jfeallnwsub")) - .withVlanGroupNames(Arrays.asList("jampmngnzscxaqw", "ochcbonqvpkvl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("ipheoflokeyyien", "bdlwtgrhpdjpj", - "masxazjpqyegu", "lhbxxhejjzzvdud")) - .withIpGroupNames(Arrays.asList("slfhotwm", "ynpwlbj", "pgacftadehxnlty"))) - .withEtherTypes(Arrays.asList("oqvuhr", "cffcyddglmj")) - .withFragments(Arrays.asList("qkwpyeicxmqc", "wqvhkhixuigdt", "pbobjo")) - .withIpLengths(Arrays.asList("e")) - .withTtlValues(Arrays.asList("m")) - .withDscpMarkings(Arrays.asList("rzayv", "t", "gvdfgiotkftutq", "ln")) - .withPortCondition( - new AccessControlListPortCondition().withPortType( - PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("bhj", "big")) - .withPortGroupNames(Arrays.asList("qfbow", "kanyktzlcuiywg", "ywgndrv")) - .withFlags(Arrays.asList("fgugnxkrxdqmid", "thz"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("ounqecano", "eupfhyhltrpm", "pjmcmatuokthfuiu", - "odsfcpkvxodpuozm")) - .withVlanMatchCondition( - new VlanMatchCondition() - .withVlans(Arrays.asList("agfuaxbezyiu", "kktwhrdxw", "ywqsmbsurexim", - "ryocfsfksymdd")) - .withInnerVlans(Arrays.asList("kiiuxhqyudxor")) - .withVlanGroupNames( - Arrays.asList("b", "oczvy", "fqrvkdvjsllrmvvd", "watkpnpulexxb"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withProtocolTypes( + Arrays.asList("bldngkpoc", "pazyxoegukg", "npiucgygevqznty", "mrbpizcdrqj")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans( + Arrays.asList("dnfyhxdeoejzicwi", "sjttgzfbish", "bkh", "jdeyeamdpha")) + .withInnerVlans(Arrays.asList("pbuxwgipwhon", "wkgshwa", "kix", "bin")) + .withVlanGroupNames(Arrays.asList("uttmrywnuzoqft"))) + .withIpCondition(new IpMatchCondition() + .withType(SourceDestinationType.BIDIRECTIONAL) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("qzbqjvsov", "yokacspkw")) + .withIpPrefixValues(Arrays.asList("qvyxlwhzlsicoho", "qnwvlrya", "w", "heun")) .withIpGroupNames( - Arrays.asList("dobpxjmflbvvn", "hrk", "ciwwzjuqkhr", "ajiwkuo"))) - .withEtherTypes(Arrays.asList("ppusuesnzwdejba", "orxzdmohctbqvud", "xdn")) - .withFragments(Arrays.asList("owgujjugwdkcglhs")) - .withIpLengths(Arrays.asList("jdyggdtji")) - .withTtlValues(Arrays.asList("kuofqweykhme")) - .withDscpMarkings(Arrays.asList("fyexfwhy", "cibvyvdcsitynn")) - .withPortCondition( - new AccessControlListPortCondition().withPortType( - PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("fovgmkqsleyyvxy", "jpkcattpng")) - .withPortGroupNames(Arrays.asList("cczsq", "jh", "mdajv")) - .withFlags(Arrays.asList("ectehf", "qsc", "eypvhezrkg"))), + Arrays.asList("hgyxzkonoc", "koklya", "uconuqszfkbey", "ewrmjmwvvjektc"))) + .withEtherTypes(Arrays.asList("nhwlrsffrzpwvl", "dqgbiqylihkaetc")) + .withFragments(Arrays.asList("fcivfsnkym", "ctq", "jf", "ebrjcxe")) + .withIpLengths( + Arrays.asList("wutttxfvjrbi", "phxepcyvahf", "ljkyqxjvuuj", "gidokgjljyoxgvcl")) + .withTtlValues(Arrays.asList("sncghkjeszz", "bijhtxfvgxbf", "mxnehmp")) + .withDscpMarkings(Arrays.asList("xgodebfqkkrbmp", "kgriwflzlfbx")) + .withProtocolNeighbors(Arrays.asList("zycispn", "zahmgkbrpyydhibn", "qqkpikadrg")) + .withPortCondition(new AccessControlListPortCondition() + .withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("uynhijg", "mebf", "iarbutrcvpna")) + .withPortGroupNames( + Arrays.asList("hj", "unmpxttd", "hrbnlankxmyskpbh", "nbtkcxywnytnr")) + .withFlags(Arrays.asList("lqidyby", "czfc", "haaxdbabphl"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("fkts", "hsucoc"))), new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("npiucgygevqznty", "mrbpizcdrqj", "dpydn")) + .withProtocolTypes(Arrays.asList("yazttbtwwrqpue", "ckzywbiexzfeyue")) .withVlanMatchCondition( - new VlanMatchCondition() - .withVlans(Arrays.asList("de", "ejzicwifsjtt", "zfbishcbkhaj")) - .withInnerVlans( - Arrays.asList("eamdp", "agalpbuxwgipwhon", "wkgshwa", "kix")) - .withVlanGroupNames(Arrays.asList("njeputtmrywn", "zoqftiyqzrnkcqvy"))) + new VlanMatchCondition().withVlans(Arrays.asList("xujwbhqwalmuzyo")) + .withInnerVlans(Arrays.asList("pdkzjancuxr", "d")) + .withVlanGroupNames(Arrays.asList("v", "bniwdj", "wz", "s"))) .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("cohoq", "nwvlryavwhheunmm", "hgyxzkonoc")) - .withIpGroupNames(Arrays.asList("klyaxuconu", "szfkbe", "pewr"))) - .withEtherTypes(Arrays.asList("kg", "sauuimj", "vxieduugidyj")) - .withFragments(Arrays.asList("byao")) - .withIpLengths(Arrays.asList("xc")) - .withTtlValues(Arrays.asList("pclhocohslk")) - .withDscpMarkings(Arrays.asList("eggzfb", "hfmvfaxkffe")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xwburvjxxjns", "ydptkoen")) - .withPortGroupNames(Arrays.asList("knvudwtiukb", "dng", "pocipazyxoegu")) - .withFlags(Arrays.asList("lvmezyvshxmzsbbz"))))) - .withActions( - Arrays - .asList( - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("jektcxsenh"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("ffrzpwvlqdqgbiqy"), - new AccessControlListAction().withType(AclActionType.COUNT) - .withCounterName("aetcktvfcivfs"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("uctqhjfbe"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("jcxerfuwu") - .withSequenceNumber(3193420375672203078L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("hrbnlankxmyskpbh")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("kcxywnyt", "rsyn", "qidybyx", "zfcl")) - .withInnerVlans(Arrays.asList("xdbabphlwr", "lfktsths")) - .withVlanGroupNames(Arrays.asList("cmnyyazttb", "wwrq", "uedck", "ywbiexzfeyueax"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("qwalmuzyoxaepd")) - .withIpGroupNames(Arrays.asList("ancuxrhd", "bavxbniwdjswzt"))) - .withEtherTypes(Arrays.asList("rp")) - .withFragments(Arrays.asList("pcyvahfnljkyqx", "vuujq", "idokgjlj")) - .withIpLengths(Arrays.asList("gvcl", "bgsncghkjeszzhb")) - .withTtlValues(Arrays.asList("txfvgx", "fsm", "nehmpvecx", "odebfqkkrbmpu")) - .withDscpMarkings(Arrays.asList("iw", "lzlfbxzpuz", "cispnqzahmgkbr")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("ijggmebfsiar", "utrc")) - .withPortGroupNames(Arrays.asList("azzmhjrunmpxt")) - .withFlags(Arrays.asList("hibnuqqkpika", "rgvtqag"))), + .withIpPrefixValues(Arrays.asList("x")) + .withIpGroupNames(Arrays.asList("xbzpfzab", "lcuhxwtctyqiklb", "ovplw"))) + .withEtherTypes(Arrays.asList("vgyuguos", "mkfssxqukkfplgm", "sxnkjzkdeslpvlo")) + .withFragments(Arrays.asList("yighxpk")) + .withIpLengths(Arrays.asList("baiuebbaumny")) + .withTtlValues(Arrays.asList("edeojnabc")) + .withDscpMarkings(Arrays.asList("mtxpsiebtfh", "pesapskrdqmhjj", "htldwk")) + .withProtocolNeighbors( + Arrays.asList("uutkncw", "cwsvlxotog", "wrupqsxvnmicykvc", "o")) + .withPortCondition(new AccessControlListPortCondition() + .withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("oty", "jfcn", "bkc", "x")) + .withPortGroupNames(Arrays.asList("ttkphywpnvjtoqne")) + .withFlags(Arrays.asList("lfplp"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("scrpabgyepsbjt", "zq", "gxywpmue", "fjz"))), new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("njbkcnxdhbttkph", "wpn", "jtoqne")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("fpl", "hoxus")) - .withInnerVlans(Arrays.asList("abgy", "psbjta")) - .withVlanGroupNames(Arrays.asList("gxywpmue", "fjz", "fqkquj"))) + .withProtocolTypes(Arrays.asList("kqujidsuyono", "glaocq", "tcc")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("dxyt", "moyrxvwfudwpz", "txhdzh")) + .withInnerVlans(Arrays.asList("jbhckfrlhr")) + .withVlanGroupNames(Arrays.asList("kyv", "ycanuzbpzkafku"))) .withIpCondition( new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("bglaocqxtccm", "yudxytlmoy", "xv")) - .withIpGroupNames(Arrays.asList("dw"))) - .withEtherTypes(Arrays.asList("pgn")) - .withFragments(Arrays.asList("x")) - .withIpLengths(Arrays.asList("xbzpfzab", "lcuhxwtctyqiklb", "ovplw")) - .withTtlValues(Arrays.asList("vgyuguos", "mkfssxqukkfplgm", "sxnkjzkdeslpvlo")) - .withDscpMarkings(Arrays.asList("yighxpk")) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("ehhseyvjusrts", "hspkdeemao", "mx", "gkvtmelmqkrhah")) + .withIpGroupNames( + Arrays.asList("uahaquhcdhmd", "alaexqpvfadmwsrc", "gvxp", "gomz"))) + .withEtherTypes(Arrays.asList("isgwbnbbeldawkz", "ali")) + .withFragments(Arrays.asList("qhakauhashsf", "xosow", "xcug")) + .withIpLengths(Arrays.asList("ooxdjebwpuc", "wfvovbv", "euecivyhzceuoj")) + .withTtlValues(Arrays.asList("wjue")) + .withDscpMarkings(Arrays.asList("wmcdytdxwi")) + .withProtocolNeighbors(Arrays.asList("rjaw", "qwgxhniskx", "bkpyc")) .withPortCondition( new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("rdqmhjjdhtldwkyz", "uutkncw")) - .withPortGroupNames(Arrays.asList("svlxotogtwrup", "sx", "nmic", - "kvceoveilovnotyf")) - .withFlags( - Arrays.asList("aiuebbaumnyqu", "edeojnabc", "hsmtxpsiebtfhvp"))))) - .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("dzhlrq"), - new AccessControlListAction().withType(AclActionType.LOG) - .withCounterName("kfrlhrxsbky"), - new AccessControlListAction().withType(AclActionType.DROP) - .withCounterName("anuzbpzkafkuw"), - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("wbme"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("seyvj") - .withSequenceNumber(2840663437896188419L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays.asList( - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("kpycgklwndnhjd", "uwhvylwzbtdhxujz")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("ow")) - .withInnerVlans(Arrays.asList("rzqlveu", "lupj")) - .withVlanGroupNames(Arrays.asList("fxobbcsws", "tjrip", "rbpbewtghfgblcg", - "xzvlvqhjkbegib"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("waloayqcgwr", "zjuzgwyz", "htxongmtsavjc", "pwxqp")) - .withIpGroupNames(Arrays.asList("nftguvriuhpr", "mdyvxqtayriw", "ro"))) - .withEtherTypes(Arrays.asList("deemao", "mx", "gkvtmelmqkrhah", "ljuahaquhcdh")) - .withFragments(Arrays.asList("alaexqpvfadmwsrc", "gvxp", "gomz", "fmisg")) - .withIpLengths(Arrays.asList("b", "e")) - .withTtlValues(Arrays.asList("wkz")) - .withDscpMarkings(Arrays.asList("io", "rqhakauha", "hsfwxosowzxcug")) - .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("eiotwmcdytdx", "it", "nrjawgqwg")) - .withPortGroupNames(Arrays.asList("isk")) - .withFlags(Arrays.asList("oxdjebwpuc", "wfvovbv", "euecivyhzceuoj"))), - new AccessControlListMatchCondition() - .withProtocolTypes(Arrays.asList("wwncwzzhxgk", "rmgucnap")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("ellwptfdy", "pfqbuaceopzf")) - .withInnerVlans(Arrays.asList("huaoppp", "qeqxo")) - .withVlanGroupNames(Arrays.asList("ahzxctobgbk", "moizpos", "mgrcfbu"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("kxbpvj", "mjh")) - .withIpGroupNames(Arrays.asList("yngudivk"))) - .withEtherTypes(Arrays.asList("exrmcqibycnojvk", "mefqsgzvahapjyzh")) - .withFragments(Arrays.asList("qzcjrvxdj", "lmwlxkvugfhzo")) - .withIpLengths(Arrays.asList("jvzunluthnnp", "nxipeil", "jzuaejxdultskzbb")) - .withTtlValues(Arrays.asList("umveekgpwozuhkf", "bsjyofdx", "uusdttouwa")) - .withDscpMarkings(Arrays.asList("kqvkelnsmvbxwyjs", "lh")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("cslyjpk", "idzyexznelixhnr", "tfolhbnx")) + .withPorts(Arrays.asList("hjdauwhvylwz", "tdhxujznbmpowuwp")) .withPortGroupNames( - Arrays.asList("laulppg", "dtpnapnyiropuhp", "gvpgy", "gqgitxmedjvcsl")) - .withFlags(Arrays.asList("lnjixisxya"))))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.DROP).withCounterName("qzvszjf"), - new AccessControlListAction() - .withType(AclActionType.LOG) - .withCounterName("fdxxivetvtcqaqtd"))), - new AccessControlListMatchConfiguration().withMatchConfigurationName("mcbxvwvxysl") - .withSequenceNumber(2902711033817845170L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList( + Arrays.asList("lve", "alupjm", "hfxobbcswsrtj", "iplrbpbewtghfgb")) + .withFlags(Arrays.asList("wxzvlvqhjkb"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("t"))), new AccessControlListMatchCondition() - .withProtocolTypes( - Arrays.asList("gccymvaolpssl", "lfmmdnbbglzpswi", "d", "cwyhzdxssa")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("nvdfznuda", "dvxzbncblylpst")) - .withInnerVlans(Arrays.asList("hxsrzdzucersc")) - .withVlanGroupNames(Arrays.asList("nevf"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("sslswtmweriof", "pyqs")) - .withIpGroupNames(Arrays.asList("abnetshh"))) - .withEtherTypes(Arrays.asList("tkblmpewww", "bkrvrnsvshqj", "hxcr")) - .withFragments(Arrays.asList("ovasrruvwbhsqfsu", "cgjbirxbp")) - .withIpLengths(Arrays.asList("rfbjf", "twss", "t")) - .withTtlValues(Arrays.asList("vjz", "exilzznfqqnvwpmq")) - .withDscpMarkings(Arrays.asList("uoujmkcjhwqy", "jrybnwjewgdrjer")) + .withProtocolTypes(Arrays.asList("iebwwaloayqcgwrt", "j", "zg", "yzm")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("ngmtsavjcb", "wxqpsrknftguvri")) + .withInnerVlans(Arrays.asList("rwmdyvxqtay", "iwwroyqbexrmc", "ibycno")) + .withVlanGroupNames(Arrays.asList("nmefqsgzvahapj"))) + .withIpCondition(new IpMatchCondition() + .withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("cjrvxdjzlmwlxkv", "gfhzovawjvzunlut", "nnprn", "i")) + .withIpGroupNames(Arrays.asList("lpjzuaejxdu", "tskzbbtdzumveek", "pwo", "uh"))) + .withEtherTypes(Arrays.asList("bsjyofdx")) + .withFragments(Arrays.asList("sd")) + .withIpLengths( + Arrays.asList("uwaboekqvke", "nsmvbxwyj", "flhhcaal", "jixisxyawjoyaqcs")) + .withTtlValues(Arrays.asList("pkii", "zyexzn", "lixhnrztfol", "bnxknalaulppg")) + .withDscpMarkings( + Arrays.asList("pnapnyiropuh", "igvpgylg", "git", "medjvcslynqwwncw")) + .withProtocolNeighbors(Arrays.asList("xgk")) + .withPortCondition(new AccessControlListPortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("apkteoellwptfdyg", "fqbuaceopzf", "rhhuaopppcqeqx")) + .withPortGroupNames(Arrays.asList("dahzxctobg")) + .withFlags(Arrays.asList("moizpos", "mgrcfbu", "rmfqjhhkxbpvj"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("xxjyngudivkrtsw"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("zjf") + .withRemarkComment("vjfdx") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("cqaqtdoqmcbx") + .withRemarkComment("vxysl") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("xoblytkbl") + .withSequenceNumber(5739741395116766160L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("vrnsvshqjohxc", "sbfov", "srruvwbhsqfsubcg", "birx")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("srfbjfdtwss", "t")) + .withInnerVlans(Arrays.asList("vjz", "exilzznfqqnvwpmq")) + .withVlanGroupNames(Arrays.asList("uoujmkcjhwqy", "jrybnwjewgdrjer"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("hin")) + .withIpGroupNames(Arrays.asList("gmifthnzd"))) + .withEtherTypes(Arrays.asList("l")) + .withFragments(Arrays.asList("yq", "gynduha", "hqlkthumaqo")) + .withIpLengths(Arrays.asList("ycduier", "gccymvaolpssl")) + .withTtlValues(Arrays.asList("mmdnbbglzps", "iydmcwyhzdxs")) + .withDscpMarkings(Arrays.asList("bzmnvdfznud")) + .withProtocolNeighbors(Arrays.asList("vxzbncb", "ylpstdbhhxsrzdz", "cers", "dntnevf")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("dsslswt")) + .withPortGroupNames(Arrays.asList("riofzpyqse", "wab", "ets")) + .withFlags(Arrays.asList("zhedplvwiw", "bmwmbesldnkw", "tppjflcx"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("konzmnsik", "mkqzeqqkdltfzxmh", "v", "gureodkwobdag"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("bqdxbx", "akbogqxndlkzgxh", "ripl", "podxunkb")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("ubyyntw", "rbqtkoie")) + .withInnerVlans(Arrays.asList("otgqrlltmu")) + .withVlanGroupNames(Arrays.asList("uwz", "zxb", "pgcjefuzmuvp"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("p")) + .withIpGroupNames( + Arrays.asList("bmnzbtbhjpgl", "fgohdneuelfphs", "yhtozfikdowwqu", "v"))) + .withEtherTypes(Arrays.asList("clvit", "hqzonosggbhcoh")) + .withFragments(Arrays.asList("sjnkal", "utiiswacf")) + .withIpLengths(Arrays.asList("k", "zewk", "vhqcrail", "pnppfuf")) + .withTtlValues(Arrays.asList("dmhdlxyjr", "sag", "fcnihgwq")) + .withDscpMarkings(Arrays.asList("edgfbcvkcvq", "pkeqdcvdrhvoo")) + .withProtocolNeighbors(Arrays.asList("tbobz", "opcjwvnhd", "d")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) + .withPortGroupNames( + Arrays.asList("zzlvmbmpaxmodfv", "efyw", "bpfvm", "yhrfouyftaakcpw")) + .withFlags(Arrays.asList("vqtmnub", "xkp", "ksmond"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("xvy", "omgkopkwho", "v", "ajqgxy"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("cmbqfqvmk", "xozap", "helxprglya", "dd")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("cuejrjxgci", "ibrhosxsdqr", "zoymibmrqyibahw")) + .withInnerVlans(Arrays.asList("szdtmhrkwof", "yvoqa", "piexpbtgiw")) + .withVlanGroupNames(Arrays.asList("enwash", "tdtkcn"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("lpiujwaa", "ipqiiobyuqerpq")) + .withIpGroupNames(Arrays.asList("wcciuqgbdbu", "auvfbtkuwhhmhyk"))) + .withEtherTypes(Arrays.asList("xafnndlpichko", "mkcdyhbpkkpwdre")) + .withFragments(Arrays.asList("vvqfovljxyws", "w", "yrs", "dsytgadgvr")) + .withIpLengths(Arrays.asList("en", "qnzarrwl", "uu")) + .withTtlValues(Arrays.asList("qkacewii")) + .withDscpMarkings(Arrays.asList("ubjibww", "f")) + .withProtocolNeighbors( + Arrays.asList("qkvpuvksgplsakn", "n", "synljphuopxodl", "iyntorzihle")) + .withPortCondition(new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts( + Arrays.asList("mslyzrpzbchckqqz", "ioxiysuiizyn", "edyatrwyhqmibzyh", "itsmypyyn")) + .withPortGroupNames(Arrays.asList("pumnz", "mwzn", "abikns")) + .withFlags(Arrays.asList("jhxbld"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("rlkdmtncvokotl", "xdy"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.DROP) + .withCounterName("ogjltdtbnnhad") + .withRemarkComment("crkvcikhnv") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("queziky") + .withRemarkComment("gxk") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.LOG) + .withCounterName("lwuip") + .withRemarkComment("cjzkzivgvvcna") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())), + new AccessControlListAction().withType(AclActionType.DROP) + .withCounterName("xmueed") + .withRemarkComment("rdvstkwqqtch") + .withPoliceRateConfiguration( + new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))), + new AccessControlListMatchConfiguration().withMatchConfigurationName("mtdaa") + .withSequenceNumber(8743531212516395266L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("hgwxrtfudx", "pxgy", "agvrvmnpkuk", "himdbl")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("mfnjh", "j", "wmszkk")) + .withInnerVlans(Arrays.asList("rey", "kzikfjawneaivxwc")) + .withVlanGroupNames(Arrays.asList("pcirelsfeaen", "abfatkl", "dxbjhwuaanozj"))) + .withIpCondition(new IpMatchCondition() + .withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("pjrvxagl")) + .withIpGroupNames(Arrays.asList("mjwosytx", "tcs"))) + .withEtherTypes(Arrays.asList("k", "qumiek", "ez", "ikh")) + .withFragments(Arrays.asList("jhdgqggebdunyga", "qidbqfatpxllrxcy")) + .withIpLengths(Arrays.asList("a", "su")) + .withTtlValues(Arrays.asList("m")) + .withDscpMarkings(Arrays.asList("mjsjqb", "hhyxxrw")) + .withProtocolNeighbors(Arrays.asList("oduhp")) .withPortCondition( - new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("mifthnzdnd", "l", "nayqi")) - .withPortGroupNames(Arrays.asList("duhavhqlkt", "umaq", "lbg", "cdui")) - .withFlags(Arrays.asList("nqpeh"))), - new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("xzxcl")) + new AccessControlListPortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("re", "n")) + .withPortGroupNames( + Arrays.asList("qugjhkycube", "dgssofwqmzqal", "rmnjijpx", "cqqudf")) + .withFlags( + Arrays.asList("xbaaabjyv", "yffimrzrtuzqogs", "xnevfdnwn", "mewzsyyc"))) + .withIcmpConfiguration( + new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("oibjudpfrxtrthz", + "aytdwkqbrq", "bpaxhexiilivpdt"))), + new AccessControlListMatchCondition().withProtocolTypes(Arrays.asList("q")) .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("hqzonosggbhcoh", "wdsjnkalju", "iiswacffgdkzze")) - .withInnerVlans(Arrays.asList("vhqcrail", "pnppfuf")) - .withVlanGroupNames(Arrays.asList("dmhdlxyjr", "sag", "fcnihgwq"))) + .withVlans(Arrays.asList("axoruzfgsquy", "xrxxlep", "ramxjezwlwnw")) + .withInnerVlans(Arrays.asList("lcvydy", "atdooaojkniod")) + .withVlanGroupNames( + Arrays.asList("ebwnujhe", "msbvdkcrodtjinf", "jlfltkacjvefkdlf"))) .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("cvkcvqvpkeqdcv", "rhvoods", "tbobz")) - .withIpGroupNames(Arrays.asList("cjwvn", "dldwmgxc"))) - .withEtherTypes(Arrays.asList("edplvwiwubmw")) - .withFragments(Arrays.asList("sldnkwwtppjflcxo")) - .withIpLengths(Arrays.asList("konzmnsik", "mkqzeqqkdltfzxmh", "v", "gureodkwobdag")) - .withTtlValues(Arrays.asList("bqdxbx", "akbogqxndlkzgxh", "ripl", "podxunkb")) - .withDscpMarkings(Arrays.asList("mubyynt", "lrb", "tkoievseotgq", "l")) - .withPortCondition(new AccessControlListPortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("muvp", "ttdumorppxebmnzb", "bhjpglkfgohdne", "el")) - .withPortGroupNames(Arrays.asList("sdyhtozfikdowwq")) - .withFlags(Arrays.asList("wlauwzizxbmpg"))))) - .withActions(Arrays.asList( - new AccessControlListAction().withType(AclActionType.COUNT).withCounterName("utwu"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("pkhjwni"), - new AccessControlListAction().withType(AclActionType.LOG).withCounterName("uicpd"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("vmbmp") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("fv", "efyw")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("vmwy") - .withVlans(Arrays.asList("ouyftaakc", "wiyzvqtmnubexkp")), - new VlanGroupProperties().withName("smond") - .withVlans(Arrays.asList("uxvypomgkopkwh", "jvp", "jqg")), - new VlanGroupProperties().withName("smocmbq") - .withVlans(Arrays.asList("mkcxozapvh", "lxprglyatddckcbc")))) - .withPortGroups(Arrays.asList(new PortGroupProperties() - .withName("jxgciqibrh") - .withPorts(Arrays.asList("sdqrhzoymibmrq", "ibahwflus", "dtmhrkwofyyvoqa", "piexpbtgiw")), - new PortGroupProperties().withName("oenwashr") - .withPorts(Arrays.asList("kcnqxwbpo", "ulpiuj")), - new PortGroupProperties().withName("asipqiio") - .withPorts(Arrays.asList("qerpqlpqwcc", "uqgbdbutauvfbt", "uwhhmhykojoxafn")), - new PortGroupProperties().withName("lpichk") - .withPorts(Arrays.asList("kcdyhbpk", "pwdreqnovvqf", "vljxywsu", "syrsndsytgadgvra")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("e") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("rwlqu", "ijfqkacewiipfp", "bjibwwiftohq", "vpuvks")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("aknynfsynljphuop") - .withVlans(Arrays.asList("lqiyntorzihl", "osjswsr", "slyzrpzbchckqq")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("xiy") - .withPorts(Arrays.asList("i", "ynkedyatrwyhqmib", "yhwitsmypyynpcdp", "mnzgmwznmabi")), - new PortGroupProperties().withName("sorgj") - .withPorts(Arrays.asList("ldtlwwr", "kdmtncvokotll")), - new PortGroupProperties().withName("yhgsy") - .withPorts(Arrays.asList("gjltdtbnnhado", "crkvcikhnv", "amqgxqquezikyw", "gxk")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("tmelw") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("cjzkzivgvvcna", "rhyrnxxmueed", "drd")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("wq").withVlans(Arrays.asList("healmfmtda")), - new VlanGroupProperties().withName("gdv") - .withVlans(Arrays.asList("piohgwxrtfu", "xepxgyqagvrvmn", "k", "kghimdblxgwimfnj")), - new VlanGroupProperties().withName("j").withVlans(Arrays.asList("szkkfoqre", "fkzikfj")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("a") - .withPorts(Arrays.asList("wczelpci", "elsfeaen", "abfatkl")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("jhwuaanozjos") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("l", "jrvxaglrv")), - new IpGroupProperties().withName("jwosytxitcskfck") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("ekkezzikhlyfjh", "gqggebdunygae")), - new IpGroupProperties().withName("db") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("xllrxcyjm", "a")), - new IpGroupProperties().withName("uvarmywdmjsjq") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("x", "rw", "yc")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("p") - .withVlans(Arrays.asList("gymare", "n", "jxqugjhky", "ubeddg")), - new VlanGroupProperties().withName("ofwq").withVlans(Arrays.asList("alkrmn")), - new VlanGroupProperties().withName("jpxac") - .withVlans(Arrays.asList("dfnbyxbaaabjyv", "yffimrzrtuzqogs", "xnevfdnwn")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("zsyyceuzso") - .withPorts(Arrays.asList("ud", "frxtrthzvaytdwk")), - new PortGroupProperties().withName("rqubpaxhexiil") - .withPorts(Arrays.asList("dtiirqt", "qoaxoruzfgs")), - new PortGroupProperties().withName("yfxrx").withPorts(Arrays.asList("ptramxj", "zwl")), - new PortGroupProperties().withName("wxuqlcvydypatdoo") - .withPorts(Arrays.asList("kniod", "oo")))))); + .withIpPrefixValues(Arrays.asList("agaowpulpqblylsy", "k")) + .withIpGroupNames(Arrays.asList("sjervti"))) + .withEtherTypes(Arrays.asList("sdszue", "psbzkfzbeyvpn", "icvi")) + .withFragments(Arrays.asList("jjxd")) + .withIpLengths(Arrays.asList("uukzclewyhmlw", "aztz", "ofncckwyfzqwhxxb", "yq")) + .withTtlValues(Arrays.asList("feqztppriol", "or", "altol")) + .withDscpMarkings(Arrays.asList("wsobqwcsdbn", "dcfhucqdpf", "vglsbjjca")) + .withProtocolNeighbors(Arrays.asList("bvtvudutncormr", "xqtvcofu")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("u")) + .withPortGroupNames(Arrays.asList("knnqvsaznq", "tor", "dsg")) + .withFlags(Arrays.asList("mkycgra"))) + .withIcmpConfiguration(new IcmpConfigurationProperties().withIcmpTypes( + Arrays.asList("etaebu", "u"))), + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("ovsm", "l", "wabm", "oefki")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("puqujmqlgkfbtn", "oaongbjc")) + .withInnerVlans(Arrays.asList("jitcjedftwwaez", "ojvdcpzfoqo", "i")) + .withVlanGroupNames( + Arrays.asList("xarzgszufoxciq", "p", "doamciodhkha", "xkhnzbonlwnto"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("hksz", "cmrvexzt", "bt", "gsfraoyzkoow")) + .withIpGroupNames( + Arrays.asList("nguxawqaldsy", "uximerqfobw", "znkbykutwpfhpagm", "r"))) + .withEtherTypes(Arrays.asList("snfdsdoakgtdl", "kkze", "dlhewp", "sdsttwvog")) + .withFragments(Arrays.asList("ejdcngqqmoakuf", "m")) + .withIpLengths(Arrays.asList("wr")) + .withTtlValues(Arrays.asList("twaenuuzko", "bminrfdwoyuhhzi", "iefozbhdmsml")) + .withDscpMarkings(Arrays.asList("hoftr", "ae", "u", "ah")) + .withProtocolNeighbors( + Arrays.asList("slfaoqzpiyyl", "alnswhccsphk", "ivwitqscywugg", "oluhczbwemh")) + .withPortCondition( + new AccessControlListPortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("z")) + .withPortGroupNames( + Arrays.asList("swe", "pqwd", "ggicccnxqhue", "mkttlstvlzywem")) + .withFlags(Arrays.asList("ncsdtclusiyp", "sfgytguslfead", "ygqukyhejh"))) + .withIcmpConfiguration(new IcmpConfigurationProperties() + .withIcmpTypes(Arrays.asList("gfpelolppvksrpqv", "jzraehtwdwrf", "swibyr"))))) + .withActions(Arrays.asList(new AccessControlListAction().withType(AclActionType.COUNT) + .withCounterName("hfwpracstwit") + .withRemarkComment("hevxcced") + .withPoliceRateConfiguration(new PoliceRateConfigurationProperties().withBitRate(new BitRate()) + .withBurstSize(new BurstSize())))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("wzxltjc") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("iugcxnavvwxq", "byqunyow", "wlmdjrkv")), + new IpGroupProperties().withName("bvfvpdbod") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("j")), + new IpGroupProperties().withName("hkr") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("ibqipqkg")), + new IpGroupProperties().withName("xndzwm") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("jpjorwkqnyhgb", "j")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("fxzsjabibsyst") + .withVlans(Arrays.asList("sdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo")), + new VlanGroupProperties().withName("hjjklff").withVlans(Arrays.asList("uwqlgzrfzeey")), + new VlanGroupProperties().withName("izikayuhq").withVlans(Arrays.asList("bs", "bbqwrvtldg")), + new VlanGroupProperties().withName("pgvmpipaslthaqfx") + .withVlans(Arrays.asList("wutwbdsre", "pdrhne", "yowqkdwytisibir")))) + .withPortGroups( + Arrays.asList(new PortGroupProperties().withName("kpzi").withPorts(Arrays.asList("zanl")), + new PortGroupProperties().withName("xi").withPorts(Arrays.asList("mbzonokix", "jq")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("zpfrla") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("woiindf", "wp")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("bt").withVlans(Arrays.asList("lsj", "dhszfjv")), + new VlanGroupProperties().withName("gofel") + .withVlans(Arrays.asList("rqmq", "ldvriiiojnalghfk", "tvsexsowuel")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("ahhxvrh") + .withPorts(Arrays.asList("wpjgwws", "ughftqsx", "qxujxukndxd", "grjguufzd")), + new PortGroupProperties().withName("yqtfihwh") + .withPorts(Arrays.asList("z", "ngamvpphosz", "zudphqamvdkfw")), + new PortGroupProperties().withName("wcvtbvkayhmtnvyq") + .withPorts(Arrays.asList("kzwpcnpw", "cjaesgvvs", "cyajguqf")), + new PortGroupProperties().withName("ygz").withPorts(Arrays.asList("nk", "xu")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("wzrmuh") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("dpsqx", "vpsvuoymgcce", "vezrypqlmfeo")), + new IpGroupProperties().withName("rqwky") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("pg", "edkowepbqpcrfk", "wccsnjvcdwxlpqek")), + new IpGroupProperties().withName("nkhtjsyingw") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("tdhtmdvyp")), + new IpGroupProperties().withName("kdgszywkbirr") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("hkjoqr", "qqaatjinrvgou", "mfiibfggj")))) + .withVlanGroups( + Arrays.asList(new VlanGroupProperties().withName("vrwxkv").withVlans(Arrays.asList("gllqwjy")), + new VlanGroupProperties().withName("jayvblmhv") + .withVlans(Arrays.asList("hbxvvyhgsopbyrqu", "egxuvwzf")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("mctlpdngitv") + .withPorts(Arrays.asList("hrixkwmy", "jejveg", "hbpnaixexccbd", "eaxhcexdrrvqahqk")), + new PortGroupProperties().withName("tpwijnh") + .withPorts(Arrays.asList("vfycxzb", "voowvr", "mtg")), + new PortGroupProperties().withName("ppyostronzmyhgf") + .withPorts(Arrays.asList("sxkm", "waekrrjreafxtsgu", "hjglikk", "wslolbqp")), + new PortGroupProperties().withName("zlmvfelfktgp").withPorts(Arrays.asList("pwjxezn")))))) + .withAclType(AclType.TENANT) + .withDeviceRole(DeviceRole.NPB) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE)); model = BinaryData.fromObject(model).toObject(AccessControlListProperties.class); - Assertions.assertEquals("wnujhemmsbvdk", model.annotation()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("i", model.aclsUrl()); + Assertions.assertEquals("v", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("gwdslfhotwm", model.aclsUrl()); Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("xqbzvddntwnd", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4634265215487541073L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("zgpphrcgyncocpe", + Assertions.assertEquals("bjnpg", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4922956716051761075L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("ltyfsop", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("y", + Assertions.assertEquals("dnvowg", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vkwlzuvccfwnf", + Assertions.assertEquals("ggd", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("jampmngnzscxaqw", + Assertions.assertEquals("hybcibv", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("ipheoflokeyyien", + Assertions.assertEquals("hfiqscjeypvhe", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("slfhotwm", + Assertions.assertEquals("gqhcjrefovg", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals("oqvuhr", + Assertions.assertEquals("cczsq", model.matchConfigurations().get(0).matchConditions().get(0).etherTypes().get(0)); - Assertions.assertEquals("qkwpyeicxmqc", + Assertions.assertEquals("ounqecano", model.matchConfigurations().get(0).matchConditions().get(0).fragments().get(0)); - Assertions.assertEquals("e", model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); - Assertions.assertEquals("m", model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); - Assertions.assertEquals("rzayv", + Assertions.assertEquals("dagfuaxbezyiuok", + model.matchConfigurations().get(0).matchConditions().get(0).ipLengths().get(0)); + Assertions.assertEquals("ryocfsfksymdd", + model.matchConfigurations().get(0).matchConditions().get(0).ttlValues().get(0)); + Assertions.assertEquals("kiiuxhqyudxor", model.matchConfigurations().get(0).matchConditions().get(0).dscpMarkings().get(0)); + Assertions.assertEquals("b", + model.matchConfigurations().get(0).matchConditions().get(0).protocolNeighbors().get(0)); Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, + Assertions.assertEquals(Layer4Protocol.SCTP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("bhj", + Assertions.assertEquals("iqzbq", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("qfbow", + Assertions.assertEquals("kcciwwzjuqkhr", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals("fgugnxkrxdqmid", + Assertions.assertEquals("uuimjmvxieduug", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().flags().get(0)); - Assertions.assertEquals(AclActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("jektcxsenh", model.matchConfigurations().get(0).actions().get(0).counterName()); - Assertions.assertEquals("vmbmp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, + Assertions.assertEquals("rrfbyaosvexcson", + model.matchConfigurations().get(0).matchConditions().get(0).icmpConfiguration().icmpTypes().get(0)); + Assertions.assertEquals(AclActionType.POLICE_RATE, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("buhfmvfaxkffeiit", model.matchConfigurations().get(0).actions().get(0).counterName()); + Assertions.assertEquals("vmezy", model.matchConfigurations().get(0).actions().get(0).remarkComment()); + Assertions.assertEquals("wzxltjc", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("fv", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("vmwy", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ouyftaakc", + Assertions.assertEquals("iugcxnavvwxq", + model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("fxzsjabibsyst", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("sdjpvkvp", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("jxgciqibrh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("sdqrhzoymibmrq", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("kpzi", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("zanl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(AclType.TENANT, model.aclType()); + Assertions.assertEquals(DeviceRole.NPB, model.deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalAccessControlListActions().enableCount()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java index 69245fa2680b..350f24d6fa85 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateMockTests.java @@ -1,23 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; 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.AccessControlListProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; @@ -34,68 +39,72 @@ public final class AccessControlListsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"lastSyncedTime\":\"2021-01-14T10:52:54Z\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"configurationType\":\"Inline\",\"aclsUrl\":\"jkjqpizdnuehxwlt\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"bnklgerxac\",\"sequenceNumber\":1385317157229113948,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"hjrmp\",\"sequenceNumber\":5198363061422888849,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]}],\"annotation\":\"armyb\"},\"location\":\"rotgeysyq\",\"tags\":{\"xia\":\"ehfwwcbf\"},\"id\":\"uvjucfjisosfzlnr\",\"name\":\"xnfyzgu\",\"type\":\"xfh\"}"; + = "{\"properties\":{\"annotation\":\"vz\",\"configurationType\":\"File\",\"aclsUrl\":\"kfeomotquqlqeyis\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"dpfvlsqmmetwtla\",\"sequenceNumber\":8308518742671531249,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{}]}],\"lastSyncedTime\":\"2021-06-19T18:52:07Z\",\"aclType\":\"ControlPlaneTrafficPolicy\",\"deviceRole\":\"NPB\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"hrchmetvz\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"dskwvb\",\"tags\":{\"nyotgnmze\":\"wwayqts\",\"yhheexz\":\"creluedcmk\",\"djklfsdntk\":\"hllxwknoo\"},\"id\":\"iymmddslwnlgj\",\"name\":\"lhmkspybnnn\",\"type\":\"pqdnn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccessControlList response = manager.accessControlLists() - .define("vbmnhtwofx") - .withRegion("cynbu") - .withExistingResourceGroup("tebjkjgeecwtfma") - .withTags(mapOf("voneey", "iehedm")) - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("rml") - .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations( - Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("jgqqrugwesps") - .withSequenceNumber(5755899523459666377L) - .withIpAddressType(IpAddressType.IPV6) + .define("r") + .withRegion("mwfwzlmpxfmdjsio") + .withExistingResourceGroup("clpkr") + .withProperties(new AccessControlListProperties().withAnnotation("mjjviut") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("fn") + .withDefaultAction(CommunityActionTypes.DENY) + .withMatchConfigurations(Arrays.asList( + new AccessControlListMatchConfiguration().withMatchConfigurationName("mgftjviiloh") + .withSequenceNumber(4948649589211237650L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition())) + .withActions(Arrays.asList(new AccessControlListAction())), + new AccessControlListMatchConfiguration().withMatchConfigurationName("nsjxwfogb") + .withSequenceNumber(6444949860271673704L) + .withIpAddressType(IPAddressType.IPV6) .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), + new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("zfvzasupcv") - .withSequenceNumber(214884224548552199L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("m") - .withSequenceNumber(2567619873631405084L) - .withIpAddressType(IpAddressType.IPV6) + .withActions(Arrays.asList(new AccessControlListAction())), + new AccessControlListMatchConfiguration().withMatchConfigurationName("rlnuom") + .withSequenceNumber(1382656018915000574L) + .withIpAddressType(IPAddressType.IPV4) .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) .withActions(Arrays.asList(new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() + .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), new IpGroupProperties(), new IpGroupProperties())) .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups( - Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("lmajpuyxoafrmz") + new PortGroupProperties())))) + .withAclType(AclType.TENANT) + .withDeviceRole(DeviceRole.TOR) + .withGlobalAccessControlListActions( + new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.FALSE))) + .withTags(mapOf("r", "zphxul")) .create(); - Assertions.assertEquals("rotgeysyq", response.location()); - Assertions.assertEquals("ehfwwcbf", response.tags().get("xia")); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("jkjqpizdnuehxwlt", response.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); - Assertions.assertEquals("bnklgerxac", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1385317157229113948L, response.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("armyb", response.annotation()); + Assertions.assertEquals("dskwvb", response.location()); + Assertions.assertEquals("wwayqts", response.tags().get("nyotgnmze")); + Assertions.assertEquals("vz", response.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.properties().configurationType()); + Assertions.assertEquals("kfeomotquqlqeyis", response.properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.properties().defaultAction()); + Assertions.assertEquals("dpfvlsqmmetwtla", + response.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(8308518742671531249L, + response.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, response.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(AclType.CP, response.properties().aclType()); + Assertions.assertEquals(DeviceRole.NPB, response.properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.properties().globalAccessControlListActions().enableCount()); } // Use "Map.of" if available 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 index 927be4594f8f..847241bd862f 100644 --- 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 @@ -1,19 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,27 +27,33 @@ public final class AccessControlListsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"lastSyncedTime\":\"2021-11-22T15:22:40Z\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"aclsUrl\":\"ciyoypoedk\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"py\",\"sequenceNumber\":2877359021254224088,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"te\",\"sequenceNumber\":5641083204128969165,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]}],\"annotation\":\"obpmgqlw\"},\"location\":\"znbbyzposzfut\",\"tags\":{\"ewflwzhxzuxe\":\"ygbnbcmoiqgtzpv\",\"jdajdqxymxxyfrd\":\"xhywlrkqsqvvdkfp\"},\"id\":\"idcetfvgwfwsldi\",\"name\":\"wouppvyddq\",\"type\":\"vclrsn\"}"; + = "{\"properties\":{\"annotation\":\"kqclnfusr\",\"configurationType\":\"Inline\",\"aclsUrl\":\"skkhbm\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"uahvyeik\",\"sequenceNumber\":843735323918696105,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]}],\"lastSyncedTime\":\"2021-09-11T19:40:20Z\",\"aclType\":\"ControlPlaneTrafficPolicy\",\"deviceRole\":\"ManagementSwitch\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"m\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\"},\"location\":\"avbghoucvkand\",\"tags\":{\"kmqfwbg\":\"ima\",\"pfigrxxtrcodb\":\"mfvybfmpotal\",\"sxrwqlwdfl\":\"eogldmxxbjhspva\"},\"id\":\"qrplzeqzvd\",\"name\":\"b\",\"type\":\"ffgxtaelxtpfc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccessControlList response = manager.accessControlLists() - .getByResourceGroupWithResponse("hgxuwudgcyqruvum", "yddnqivah", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("fgpbcbkc", "ympdjieas", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("znbbyzposzfut", response.location()); - Assertions.assertEquals("ygbnbcmoiqgtzpv", response.tags().get("ewflwzhxzuxe")); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("ciyoypoedk", response.aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); - Assertions.assertEquals("py", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2877359021254224088L, response.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("obpmgqlw", response.annotation()); + Assertions.assertEquals("avbghoucvkand", response.location()); + Assertions.assertEquals("ima", response.tags().get("kmqfwbg")); + Assertions.assertEquals("kqclnfusr", response.properties().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, response.properties().configurationType()); + Assertions.assertEquals("skkhbm", response.properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.properties().defaultAction()); + Assertions.assertEquals("uahvyeik", + response.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(843735323918696105L, + response.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, response.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(AclType.CP, response.properties().aclType()); + Assertions.assertEquals(DeviceRole.MANAGEMENT_SWITCH, response.properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.properties().globalAccessControlListActions().enableCount()); } } 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 index ab905e78d44c..7b56101f6715 100644 --- 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 @@ -1,20 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,28 +28,33 @@ public final class AccessControlListsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"lastSyncedTime\":\"2021-06-10T23:25:07Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"File\",\"aclsUrl\":\"qzfxaitiqmcjbs\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"n\",\"sequenceNumber\":4707408565326769917,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"obwkeuzlte\",\"sequenceNumber\":349078752510706470,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"txjbrixy\"},\"location\":\"kikkqyvurhwishy\",\"tags\":{\"evnkyakck\":\"zcq\",\"uaz\":\"ehognsddjkkdede\",\"g\":\"gfcnxc\",\"ifjc\":\"umtcqxmyvkxixypa\"},\"id\":\"g\",\"name\":\"hvpsuwichm\",\"type\":\"czbyfkocgm\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"rvyvtkmxvztshn\",\"configurationType\":\"File\",\"aclsUrl\":\"bpei\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"vriqtuzwbkqcgz\",\"sequenceNumber\":155559647247530387,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]}],\"lastSyncedTime\":\"2021-10-08T14:24:48Z\",\"aclType\":\"Management\",\"deviceRole\":\"ToR\",\"globalAccessControlListActions\":{\"enableCount\":\"False\"},\"lastOperation\":{\"details\":\"q\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\"},\"location\":\"bilnszyjbuw\",\"tags\":{\"vkayi\":\"sydsci\",\"ombodvdgfuakqsj\":\"xpqgqsblclef\",\"qktcktnbpk\":\"mcfvvzceuy\",\"z\":\"nxrlncm\"},\"id\":\"vrmesfhqsac\",\"name\":\"qzr\",\"type\":\"vfwcbawapndm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.accessControlLists().listByResourceGroup("frppwwqclmdmt", com.azure.core.util.Context.NONE); + = manager.accessControlLists().listByResourceGroup("atbx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kikkqyvurhwishy", response.iterator().next().location()); - Assertions.assertEquals("zcq", response.iterator().next().tags().get("evnkyakck")); - Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().configurationType()); - Assertions.assertEquals("qzfxaitiqmcjbs", response.iterator().next().aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().defaultAction()); - Assertions.assertEquals("n", response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4707408565326769917L, - response.iterator().next().matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, - response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("txjbrixy", response.iterator().next().annotation()); + Assertions.assertEquals("bilnszyjbuw", response.iterator().next().location()); + Assertions.assertEquals("sydsci", response.iterator().next().tags().get("vkayi")); + Assertions.assertEquals("rvyvtkmxvztshn", response.iterator().next().properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().properties().configurationType()); + Assertions.assertEquals("bpei", response.iterator().next().properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().properties().defaultAction()); + Assertions.assertEquals("vriqtuzwbkqcgz", + response.iterator().next().properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(155559647247530387L, + response.iterator().next().properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, + response.iterator().next().properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(AclType.MANAGEMENT, response.iterator().next().properties().aclType()); + Assertions.assertEquals(DeviceRole.TOR, response.iterator().next().properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.iterator().next().properties().globalAccessControlListActions().enableCount()); } } 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 index a4eb8bf82b48..e037b5bef634 100644 --- 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 @@ -1,20 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; +import com.azure.resourcemanager.managednetworkfabric.models.AclType; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRole; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,28 +28,32 @@ public final class AccessControlListsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"lastSyncedTime\":\"2021-06-02T04:48:35Z\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"File\",\"aclsUrl\":\"gt\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"wvplksdksutacuc\",\"sequenceNumber\":7440105137289779135,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"hxvpmqququxlp\",\"sequenceNumber\":9014005016063545013,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"orocrqicgym\",\"sequenceNumber\":8021729751205463698,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"vijvwmrgcnzhr\",\"sequenceNumber\":7600565246090759969,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]}],\"annotation\":\"mbky\"},\"location\":\"xjdqosxzmdzlybq\",\"tags\":{\"ki\":\"kekz\"},\"id\":\"xh\",\"name\":\"evmnk\",\"type\":\"ghvsryjokv\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"vmkmzv\",\"configurationType\":\"File\",\"aclsUrl\":\"xfblsxyfq\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"llefmizdcsrv\",\"sequenceNumber\":1248685677672825715,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"xcgqbmxbp\",\"sequenceNumber\":2983873518589299759,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"mazuflfpiuufhp\",\"sequenceNumber\":5973018229064045584,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]}],\"lastSyncedTime\":\"2021-02-05T02:38:14Z\",\"aclType\":\"ControlPlaneTrafficPolicy\",\"deviceRole\":\"CE\",\"globalAccessControlListActions\":{\"enableCount\":\"True\"},\"lastOperation\":{\"details\":\"wcduyrgcay\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\"},\"location\":\"wreudgsawham\",\"tags\":{\"k\":\"qzmfkiaag\"},\"id\":\"xjkc\",\"name\":\"eenubr\",\"type\":\"kjfkxnwtzs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.accessControlLists().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("xjdqosxzmdzlybq", response.iterator().next().location()); - Assertions.assertEquals("kekz", response.iterator().next().tags().get("ki")); - Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().configurationType()); - Assertions.assertEquals("gt", response.iterator().next().aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().defaultAction()); - Assertions.assertEquals("wvplksdksutacuc", - response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(7440105137289779135L, - response.iterator().next().matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, - response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("mbky", response.iterator().next().annotation()); + Assertions.assertEquals("wreudgsawham", response.iterator().next().location()); + Assertions.assertEquals("qzmfkiaag", response.iterator().next().tags().get("k")); + Assertions.assertEquals("vmkmzv", response.iterator().next().properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().properties().configurationType()); + Assertions.assertEquals("xfblsxyfq", response.iterator().next().properties().aclsUrl()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().properties().defaultAction()); + Assertions.assertEquals("llefmizdcsrv", + response.iterator().next().properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(1248685677672825715L, + response.iterator().next().properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, + response.iterator().next().properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(AclType.CP, response.iterator().next().properties().aclType()); + Assertions.assertEquals(DeviceRole.CE, response.iterator().next().properties().deviceRole()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.iterator().next().properties().globalAccessControlListActions().enableCount()); } } 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 14828883a546..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) 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.AccessControlListAction; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListsListResult; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -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.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -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\":{\"lastSyncedTime\":\"2021-06-01T23:38:48Z\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"configurationType\":\"Inline\",\"aclsUrl\":\"myccx\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"ovne\",\"sequenceNumber\":7587304831403189204,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"tjxtxr\",\"sequenceNumber\":2960888766726834281,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"epu\",\"sequenceNumber\":7392352189892774319,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"asiz\",\"sequenceNumber\":6533192365973677613,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]}],\"annotation\":\"rswnjlxuzrhwp\"},\"location\":\"xjbaqehgpdohzjq\",\"tags\":{\"e\":\"coi\",\"bnwgfmxj\":\"xncnwfe\"},\"id\":\"cgbjbgdlfgt\",\"name\":\"y\",\"type\":\"naquflq\"},{\"properties\":{\"lastSyncedTime\":\"2021-05-03T03:00:46Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"configurationType\":\"File\",\"aclsUrl\":\"kqzeqyjleziunjx\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"kwcegyamlbn\",\"sequenceNumber\":1472551635473753949,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"guooqjagmdit\",\"sequenceNumber\":1873486568020601508,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"nfxofvcj\"},\"location\":\"dirazf\",\"tags\":{\"jtmvc\":\"jwabmd\",\"kyqltqsrogt\":\"pexcmjurbuhh\",\"ysidfvclgl\":\"wkffdjkt\",\"uijtkbu\":\"n\"},\"id\":\"qogsfikayian\",\"name\":\"haru\",\"type\":\"t\"},{\"properties\":{\"lastSyncedTime\":\"2021-09-02T16:26Z\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"aclsUrl\":\"wkpqhjpenuygbq\",\"defaultAction\":\"Deny\",\"matchConfigurations\":[{\"matchConfigurationName\":\"wv\",\"sequenceNumber\":5031872996137755111,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"mfdjwn\",\"sequenceNumber\":7067033284012194422,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"ntsj\"},\"location\":\"rsxypruuu\",\"tags\":{\"oyuelyetn\":\"chrszi\",\"qyggagfl\":\"nb\",\"byrplrohkpig\":\"lgmtrwahzjmucf\"},\"id\":\"fusuckzmkwklsno\",\"name\":\"axmqeqal\",\"type\":\"hjnhgwydyynfsvk\"},{\"properties\":{\"lastSyncedTime\":\"2020-12-23T07:31:38Z\",\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"configurationType\":\"Inline\",\"aclsUrl\":\"lpu\",\"defaultAction\":\"Permit\",\"matchConfigurations\":[{\"matchConfigurationName\":\"eizjcpeogkhnmg\",\"sequenceNumber\":7213187921154412641,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"tehtuevrhrljyoog\"},\"location\":\"hnsduugwbsreur\",\"tags\":{\"lnvnafvvkyfedev\":\"fuarenlvhht\",\"lcqxypokk\":\"bo\",\"zng\":\"minqcym\"},\"id\":\"bdxxe\",\"name\":\"unin\",\"type\":\"udbchaqdtv\"}],\"nextLink\":\"crqctmxxdtddmflh\"}") - .toObject(AccessControlListsListResult.class); - Assertions.assertEquals("xjbaqehgpdohzjq", model.value().get(0).location()); - Assertions.assertEquals("coi", model.value().get(0).tags().get("e")); - Assertions.assertEquals(ConfigurationType.INLINE, model.value().get(0).configurationType()); - Assertions.assertEquals("myccx", model.value().get(0).aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).defaultAction()); - Assertions.assertEquals("ovne", model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(7587304831403189204L, - model.value().get(0).matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("rswnjlxuzrhwp", model.value().get(0).annotation()); - Assertions.assertEquals("crqctmxxdtddmflh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListsListResult model = new AccessControlListsListResult() - .withValue(Arrays.asList( - new AccessControlListInner().withLocation("xjbaqehgpdohzjq") - .withTags(mapOf("e", "coi", "bnwgfmxj", "xncnwfe")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("myccx") - .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("ovne") - .withSequenceNumber(7587304831403189204L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("tjxtxr") - .withSequenceNumber(2960888766726834281L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("epu") - .withSequenceNumber(7392352189892774319L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("asiz") - .withSequenceNumber(6533192365973677613L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("rswnjlxuzrhwp"), - new AccessControlListInner().withLocation("dirazf") - .withTags(mapOf("jtmvc", "jwabmd", "kyqltqsrogt", "pexcmjurbuhh", "ysidfvclgl", "wkffdjkt", - "uijtkbu", "n")) - .withConfigurationType(ConfigurationType.FILE) - .withAclsUrl("kqzeqyjleziunjx") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("kwcegyamlbn") - .withSequenceNumber(1472551635473753949L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("guooqjagmdit") - .withSequenceNumber(1873486568020601508L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction(), - new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("nfxofvcj"), - new AccessControlListInner().withLocation("rsxypruuu") - .withTags(mapOf("oyuelyetn", "chrszi", "qyggagfl", "nb", "byrplrohkpig", "lgmtrwahzjmucf")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("wkpqhjpenuygbq") - .withDefaultAction(CommunityActionTypes.DENY) - .withMatchConfigurations(Arrays.asList( - new AccessControlListMatchConfiguration().withMatchConfigurationName("wv") - .withSequenceNumber(5031872996137755111L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays - .asList(new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())), - new AccessControlListMatchConfiguration().withMatchConfigurationName("mfdjwn") - .withSequenceNumber(7067033284012194422L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction(), new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("ntsj"), - new AccessControlListInner().withLocation("hnsduugwbsreur") - .withTags(mapOf("lnvnafvvkyfedev", "fuarenlvhht", "lcqxypokk", "bo", "zng", "minqcym")) - .withConfigurationType(ConfigurationType.INLINE) - .withAclsUrl("lpu") - .withDefaultAction(CommunityActionTypes.PERMIT) - .withMatchConfigurations(Arrays - .asList(new AccessControlListMatchConfiguration().withMatchConfigurationName("eizjcpeogkhnmg") - .withSequenceNumber(7213187921154412641L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new AccessControlListMatchCondition(), - new AccessControlListMatchCondition(), new AccessControlListMatchCondition(), - new AccessControlListMatchCondition())) - .withActions(Arrays.asList(new AccessControlListAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("tehtuevrhrljyoog"))) - .withNextLink("crqctmxxdtddmflh"); - model = BinaryData.fromObject(model).toObject(AccessControlListsListResult.class); - Assertions.assertEquals("xjbaqehgpdohzjq", model.value().get(0).location()); - Assertions.assertEquals("coi", model.value().get(0).tags().get("e")); - Assertions.assertEquals(ConfigurationType.INLINE, model.value().get(0).configurationType()); - Assertions.assertEquals("myccx", model.value().get(0).aclsUrl()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).defaultAction()); - Assertions.assertEquals("ovne", model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(7587304831403189204L, - model.value().get(0).matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("rswnjlxuzrhwp", model.value().get(0).annotation()); - Assertions.assertEquals("crqctmxxdtddmflh", model.nextLink()); - } - - // Use "Map.of" if available - @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/ActionIpCommunityPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPatchPropertiesTests.java new file mode 100644 index 000000000000..5cafa4e159de --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPatchPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ActionIpCommunityPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionIpCommunityPatchProperties model = BinaryData.fromString( + "{\"add\":{\"ipCommunityIds\":[\"dquupirnbnlqyv\",\"sqxkj\",\"dz\",\"virzy\"]},\"delete\":{\"ipCommunityIds\":[\"ux\"]},\"set\":{\"ipCommunityIds\":[\"mlfouqpskva\",\"db\",\"mrrhyjxcqcacz\"]}}") + .toObject(ActionIpCommunityPatchProperties.class); + Assertions.assertEquals("dquupirnbnlqyv", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("ux", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("mlfouqpskva", model.set().ipCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActionIpCommunityPatchProperties model = new ActionIpCommunityPatchProperties() + .withAdd( + new IpCommunityIdList().withIpCommunityIds(Arrays.asList("dquupirnbnlqyv", "sqxkj", "dz", "virzy"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ux"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("mlfouqpskva", "db", "mrrhyjxcqcacz"))); + model = BinaryData.fromObject(model).toObject(ActionIpCommunityPatchProperties.class); + Assertions.assertEquals("dquupirnbnlqyv", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("ux", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("mlfouqpskva", model.set().ipCommunityIds().get(0)); + } +} 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 index 799eb81054d1..9cb33c4586e1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,24 +14,23 @@ public final class ActionIpCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ActionIpCommunityProperties model = BinaryData.fromString( - "{\"delete\":{\"ipCommunityIds\":[\"omepxwsicvwqzo\"]},\"set\":{\"ipCommunityIds\":[\"hennmsgpywdib\",\"gvnrgalvwrhr\",\"ibrbknuubxc\",\"ojtu\"]},\"add\":{\"ipCommunityIds\":[\"npyeevffifu\",\"gtdow\",\"xmwefcbybpc\",\"rtczwjcujyznvyrj\"]}}") + "{\"add\":{\"ipCommunityIds\":[\"pmlutyju\",\"kedputocrb\"]},\"delete\":{\"ipCommunityIds\":[\"cmdrgcuzjmvkrw\",\"jcqhgcmljzksqim\",\"bqjvfiomhcaqpvhs\",\"ope\"]},\"set\":{\"ipCommunityIds\":[\"dswbsskgq\",\"emosq\"]}}") .toObject(ActionIpCommunityProperties.class); - Assertions.assertEquals("npyeevffifu", model.add().ipCommunityIds().get(0)); - Assertions.assertEquals("omepxwsicvwqzo", model.delete().ipCommunityIds().get(0)); - Assertions.assertEquals("hennmsgpywdib", model.set().ipCommunityIds().get(0)); + Assertions.assertEquals("pmlutyju", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("cmdrgcuzjmvkrw", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("dswbsskgq", 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("npyeevffifu", "gtdow", "xmwefcbybpc", "rtczwjcujyznvyrj"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("omepxwsicvwqzo"))) - .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("hennmsgpywdib", "gvnrgalvwrhr", "ibrbknuubxc", "ojtu"))); + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("pmlutyju", "kedputocrb"))) + .withDelete(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("cmdrgcuzjmvkrw", "jcqhgcmljzksqim", "bqjvfiomhcaqpvhs", "ope"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("dswbsskgq", "emosq"))); model = BinaryData.fromObject(model).toObject(ActionIpCommunityProperties.class); - Assertions.assertEquals("npyeevffifu", model.add().ipCommunityIds().get(0)); - Assertions.assertEquals("omepxwsicvwqzo", model.delete().ipCommunityIds().get(0)); - Assertions.assertEquals("hennmsgpywdib", model.set().ipCommunityIds().get(0)); + Assertions.assertEquals("pmlutyju", model.add().ipCommunityIds().get(0)); + Assertions.assertEquals("cmdrgcuzjmvkrw", model.delete().ipCommunityIds().get(0)); + Assertions.assertEquals("dswbsskgq", model.set().ipCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java new file mode 100644 index 000000000000..330c5529c1fa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPatchPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ActionIpExtendedCommunityPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionIpExtendedCommunityPatchProperties model = BinaryData.fromString( + "{\"add\":{\"ipExtendedCommunityIds\":[\"ezttqjqyfy\",\"qlyyslg\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"dsvkllrzhs\",\"hkbchcazkg\",\"jthprgfwhfzhhr\",\"rmrfyyqjcni\"]},\"set\":{\"ipExtendedCommunityIds\":[\"sddcuqddlda\",\"yvfzt\",\"ew\",\"joj\"]}}") + .toObject(ActionIpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("ezttqjqyfy", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("dsvkllrzhs", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("sddcuqddlda", model.set().ipExtendedCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActionIpExtendedCommunityPatchProperties model = new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ezttqjqyfy", "qlyyslg"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("dsvkllrzhs", "hkbchcazkg", "jthprgfwhfzhhr", "rmrfyyqjcni"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("sddcuqddlda", "yvfzt", "ew", "joj"))); + model = BinaryData.fromObject(model).toObject(ActionIpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("ezttqjqyfy", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("dsvkllrzhs", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("sddcuqddlda", model.set().ipExtendedCommunityIds().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 index 3439162d8bd7..c0e047d311bc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,22 +14,23 @@ public final class ActionIpExtendedCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ActionIpExtendedCommunityProperties model = BinaryData.fromString( - "{\"delete\":{\"ipExtendedCommunityIds\":[\"uw\"]},\"set\":{\"ipExtendedCommunityIds\":[\"fgijydgs\"]},\"add\":{\"ipExtendedCommunityIds\":[\"y\",\"tevaebzm\",\"ywhr\"]}}") + "{\"add\":{\"ipExtendedCommunityIds\":[\"gtxlzncoqxtvytzq\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"jvzmxyrazzstjvc\",\"zbdbrlbo\",\"ltyo\",\"acbibtk\"]},\"set\":{\"ipExtendedCommunityIds\":[\"upmwxdsokrlnrpey\"]}}") .toObject(ActionIpExtendedCommunityProperties.class); - Assertions.assertEquals("y", model.add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("uw", model.delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("fgijydgs", model.set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gtxlzncoqxtvytzq", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("jvzmxyrazzstjvc", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("upmwxdsokrlnrpey", 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("y", "tevaebzm", "ywhr"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("uw"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("fgijydgs"))); + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("gtxlzncoqxtvytzq"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("jvzmxyrazzstjvc", "zbdbrlbo", "ltyo", "acbibtk"))) + .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("upmwxdsokrlnrpey"))); model = BinaryData.fromObject(model).toObject(ActionIpExtendedCommunityProperties.class); - Assertions.assertEquals("y", model.add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("uw", model.delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("fgijydgs", model.set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("gtxlzncoqxtvytzq", model.add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("jvzmxyrazzstjvc", model.delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("upmwxdsokrlnrpey", 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 index aaa780272277..0d1b10c41f49 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,20 +14,20 @@ public final class AggregateRouteConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AggregateRouteConfiguration model = BinaryData.fromString( - "{\"ipv4Routes\":[{\"prefix\":\"i\"},{\"prefix\":\"jpnwynudql\"},{\"prefix\":\"zsauzp\"}],\"ipv6Routes\":[{\"prefix\":\"eehuxiqhzlray\"}]}") + "{\"ipv4Routes\":[{\"prefix\":\"gzvkiwrsiwdyj\"},{\"prefix\":\"urykcrraueekcs\"}],\"ipv6Routes\":[{\"prefix\":\"ogd\"}]}") .toObject(AggregateRouteConfiguration.class); - Assertions.assertEquals("i", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eehuxiqhzlray", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("gzvkiwrsiwdyj", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ogd", 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("i"), - new AggregateRoute().withPrefix("jpnwynudql"), new AggregateRoute().withPrefix("zsauzp"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("eehuxiqhzlray"))); + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("gzvkiwrsiwdyj"), + new AggregateRoute().withPrefix("urykcrraueekcs"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("ogd"))); model = BinaryData.fromObject(model).toObject(AggregateRouteConfiguration.class); - Assertions.assertEquals("i", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eehuxiqhzlray", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("gzvkiwrsiwdyj", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ogd", model.ipv6Routes().get(0).prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..3c558c1cc6b1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRoutePatchConfigurationTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.AggregateRoutePatchConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AggregateRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AggregateRoutePatchConfiguration model + = BinaryData.fromString("{\"ipv4Routes\":[{\"prefix\":\"qhtkbt\"}],\"ipv6Routes\":[{\"prefix\":\"rngl\"}]}") + .toObject(AggregateRoutePatchConfiguration.class); + Assertions.assertEquals("qhtkbt", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rngl", model.ipv6Routes().get(0).prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AggregateRoutePatchConfiguration model = new AggregateRoutePatchConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("qhtkbt"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("rngl"))); + model = BinaryData.fromObject(model).toObject(AggregateRoutePatchConfiguration.class); + Assertions.assertEquals("qhtkbt", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rngl", 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 index 571fc0513424..4036c93f00d1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,14 +11,14 @@ public final class AggregateRouteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AggregateRoute model = BinaryData.fromString("{\"prefix\":\"ezxlskihm\"}").toObject(AggregateRoute.class); - Assertions.assertEquals("ezxlskihm", model.prefix()); + AggregateRoute model = BinaryData.fromString("{\"prefix\":\"acbcb\"}").toObject(AggregateRoute.class); + Assertions.assertEquals("acbcb", model.prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AggregateRoute model = new AggregateRoute().withPrefix("ezxlskihm"); + AggregateRoute model = new AggregateRoute().withPrefix("acbcb"); model = BinaryData.fromObject(model).toObject(AggregateRoute.class); - Assertions.assertEquals("ezxlskihm", model.prefix()); + Assertions.assertEquals("acbcb", 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 b28186f5d670..000000000000 --- 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\":\"odtji\"}").toObject(AnnotationResource.class); - Assertions.assertEquals("odtji", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AnnotationResource model = new AnnotationResource().withAnnotation("odtji"); - model = BinaryData.fromObject(model).toObject(AnnotationResource.class); - Assertions.assertEquals("odtji", model.annotation()); - } -} 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 index b76f45b900fb..21c3a9eb5c46 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,18 +13,18 @@ public final class BfdConfigurationTests { public void testDeserialize() throws Exception { BfdConfiguration model = BinaryData .fromString( - "{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1056742134,\"multiplier\":1974850281}") + "{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":272961138,\"multiplier\":1899435614}") .toObject(BfdConfiguration.class); - Assertions.assertEquals(1056742134, model.intervalInMilliSeconds()); - Assertions.assertEquals(1974850281, model.multiplier()); + Assertions.assertEquals(272961138, model.intervalInMilliSeconds()); + Assertions.assertEquals(1899435614, model.multiplier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BfdConfiguration model - = new BfdConfiguration().withIntervalInMilliSeconds(1056742134).withMultiplier(1974850281); + = new BfdConfiguration().withIntervalInMilliSeconds(272961138).withMultiplier(1899435614); model = BinaryData.fromObject(model).toObject(BfdConfiguration.class); - Assertions.assertEquals(1056742134, model.intervalInMilliSeconds()); - Assertions.assertEquals(1974850281, model.multiplier()); + Assertions.assertEquals(272961138, model.intervalInMilliSeconds()); + Assertions.assertEquals(1899435614, model.multiplier()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java new file mode 100644 index 000000000000..544b964fd812 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdPatchConfigurationTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class BfdPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BfdPatchConfiguration model = BinaryData.fromString( + "{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1840935716,\"multiplier\":1345765640}") + .toObject(BfdPatchConfiguration.class); + Assertions.assertEquals(1840935716, model.intervalInMilliSeconds()); + Assertions.assertEquals(1345765640, model.multiplier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BfdPatchConfiguration model + = new BfdPatchConfiguration().withIntervalInMilliSeconds(1840935716).withMultiplier(1345765640); + model = BinaryData.fromObject(model).toObject(BfdPatchConfiguration.class); + Assertions.assertEquals(1840935716, model.intervalInMilliSeconds()); + Assertions.assertEquals(1345765640, model.multiplier()); + } +} 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 index b24177a88913..c598f824a425 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,8 +8,12 @@ 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.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -17,46 +21,60 @@ public final class BgpConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BgpConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":826879471,\"multiplier\":1682795627},\"defaultRouteOriginate\":\"False\",\"allowAS\":367335862,\"allowASOverride\":\"Enable\",\"fabricASN\":9149739822165155444,\"peerASN\":1426374752263433647,\"ipv4ListenRangePrefixes\":[\"a\",\"wmzwdfkbnrzorpdl\",\"bqc\",\"qjf\"],\"ipv6ListenRangePrefixes\":[\"saetgzdgvpyig\",\"aqqilzdcduwjoed\"],\"ipv4NeighborAddress\":[{\"address\":\"caifpaurww\",\"configurationState\":\"Provisioned\"},{\"address\":\"jqqacdmkx\",\"configurationState\":\"ErrorProvisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"wcyz\",\"configurationState\":\"Succeeded\"}],\"annotation\":\"ciqchxrtuicd\"}") + "{\"annotation\":\"v\",\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":36054895,\"multiplier\":925672952},\"defaultRouteOriginate\":\"False\",\"allowAS\":1063009582,\"allowASOverride\":\"Disable\",\"fabricASN\":8460229893949881794,\"peerASN\":6352858447791454944,\"ipv4ListenRangePrefixes\":[\"mvokatuz\",\"jctibpvbkae\"],\"ipv6ListenRangePrefixes\":[\"mzy\"],\"ipv4NeighborAddress\":[{\"address\":\"akw\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioning\"},{\"address\":\"hysowljuxlkbect\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"maiubavlzwp\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"azmgokedgjqafk\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"hqet\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"znq\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Accepted\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"ceituuge\",\"hfpjstlzmbls\",\"jdeolctae\",\"fsyrledjc\"],\"bmpConfigurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\"}") .toObject(BgpConfiguration.class); - Assertions.assertEquals("ciqchxrtuicd", model.annotation()); - Assertions.assertEquals(826879471, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1682795627, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("v", model.annotation()); + Assertions.assertEquals(36054895, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(925672952, model.bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); - Assertions.assertEquals(367335862, model.allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.allowASOverride()); - Assertions.assertEquals(1426374752263433647L, model.peerAsn()); - Assertions.assertEquals("a", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("saetgzdgvpyig", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("caifpaurww", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("wcyz", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals(1063009582, model.allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); + Assertions.assertEquals(6352858447791454944L, model.peerASN()); + Assertions.assertEquals("mvokatuz", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("mzy", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("akw", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("maiubavlzwp", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("ceituuge", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BgpConfiguration model = new BgpConfiguration().withAnnotation("ciqchxrtuicd") - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(826879471).withMultiplier(1682795627)) + BgpConfiguration model = new BgpConfiguration().withAnnotation("v") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(36054895).withMultiplier(925672952)) .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(367335862) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(1426374752263433647L) - .withIpv4ListenRangePrefixes(Arrays.asList("a", "wmzwdfkbnrzorpdl", "bqc", "qjf")) - .withIpv6ListenRangePrefixes(Arrays.asList("saetgzdgvpyig", "aqqilzdcduwjoed")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("caifpaurww"), - new NeighborAddress().withAddress("jqqacdmkx"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("wcyz"))); + .withAllowAS(1063009582) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerASN(6352858447791454944L) + .withIpv4ListenRangePrefixes(Arrays.asList("mvokatuz", "jctibpvbkae")) + .withIpv6ListenRangePrefixes(Arrays.asList("mzy")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("akw"), + new NeighborAddress().withAddress("hysowljuxlkbect"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("maiubavlzwp"), + new NeighborAddress().withAddress("azmgokedgjqafk"), new NeighborAddress().withAddress("hqet"), + new NeighborAddress().withAddress("znq"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("ceituuge", "hfpjstlzmbls", "jdeolctae", "fsyrledjc")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED); model = BinaryData.fromObject(model).toObject(BgpConfiguration.class); - Assertions.assertEquals("ciqchxrtuicd", model.annotation()); - Assertions.assertEquals(826879471, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1682795627, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("v", model.annotation()); + Assertions.assertEquals(36054895, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(925672952, model.bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); - Assertions.assertEquals(367335862, model.allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.allowASOverride()); - Assertions.assertEquals(1426374752263433647L, model.peerAsn()); - Assertions.assertEquals("a", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("saetgzdgvpyig", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("caifpaurww", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("wcyz", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals(1063009582, model.allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); + Assertions.assertEquals(6352858447791454944L, model.peerASN()); + Assertions.assertEquals("mvokatuz", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("mzy", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("akw", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("maiubavlzwp", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("ceituuge", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java new file mode 100644 index 000000000000..ec61e6b15903 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpPatchConfigurationTests.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BgpPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BgpPatchConfiguration model = BinaryData.fromString( + "{\"annotation\":\"omtmjzwxuqgov\",\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":495737053,\"multiplier\":895367862},\"defaultRouteOriginate\":\"False\",\"allowAS\":1928605741,\"allowASOverride\":\"Disable\",\"fabricASN\":4256600008678417626,\"peerASN\":4891435980141713838,\"ipv4ListenRangePrefixes\":[\"cgrllc\",\"na\",\"vjowazhpabac\"],\"ipv6ListenRangePrefixes\":[\"yotgkwsxnsrqorc\",\"enmvcebxeetq\"],\"ipv4NeighborAddress\":[{\"address\":\"xxqn\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"qurcgojmrvv\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"ehqqrsilcchs\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"vri\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioned\"}],\"ipv6NeighborAddress\":[{\"address\":\"fuctejrthcf\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"qjros\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"},{\"address\":\"z\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"DeferredControl\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"lxrdhabsrwrsn\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\"}") + .toObject(BgpPatchConfiguration.class); + Assertions.assertEquals("omtmjzwxuqgov", model.annotation()); + Assertions.assertEquals(495737053, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(895367862, model.bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); + Assertions.assertEquals(1928605741, model.allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); + Assertions.assertEquals(4891435980141713838L, model.peerASN()); + Assertions.assertEquals("cgrllc", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("yotgkwsxnsrqorc", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("xxqn", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("fuctejrthcf", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("lxrdhabsrwrsn", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BgpPatchConfiguration model = new BgpPatchConfiguration().withAnnotation("omtmjzwxuqgov") + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(495737053).withMultiplier(895367862)) + .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) + .withAllowAS(1928605741) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerASN(4891435980141713838L) + .withIpv4ListenRangePrefixes(Arrays.asList("cgrllc", "na", "vjowazhpabac")) + .withIpv6ListenRangePrefixes(Arrays.asList("yotgkwsxnsrqorc", "enmvcebxeetq")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("xxqn"), + new NeighborAddressPatch().withAddress("qurcgojmrvv"), + new NeighborAddressPatch().withAddress("ehqqrsilcchs"), new NeighborAddressPatch().withAddress("vri"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("fuctejrthcf"), + new NeighborAddressPatch().withAddress("qjros"), new NeighborAddressPatch().withAddress("z"))) + .withBmpConfiguration( + new InternalNetworkBmpPatchProperties().withNeighborIpExclusions(Arrays.asList("lxrdhabsrwrsn")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED); + model = BinaryData.fromObject(model).toObject(BgpPatchConfiguration.class); + Assertions.assertEquals("omtmjzwxuqgov", model.annotation()); + Assertions.assertEquals(495737053, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(895367862, model.bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); + Assertions.assertEquals(1928605741, model.allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); + Assertions.assertEquals(4891435980141713838L, model.peerASN()); + Assertions.assertEquals("cgrllc", model.ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("yotgkwsxnsrqorc", model.ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("xxqn", model.ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("fuctejrthcf", model.ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("lxrdhabsrwrsn", model.bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java new file mode 100644 index 000000000000..a1b192da6e5c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BitRateTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import org.junit.jupiter.api.Assertions; + +public final class BitRateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BitRate model + = BinaryData.fromString("{\"rate\":5794733482613719586,\"unit\":\"Mbps\"}").toObject(BitRate.class); + Assertions.assertEquals(5794733482613719586L, model.rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BitRate model = new BitRate().withRate(5794733482613719586L).withUnit(BitRateUnit.MBPS); + model = BinaryData.fromObject(model).toObject(BitRate.class); + Assertions.assertEquals(5794733482613719586L, model.rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..1e026b6ec437 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPatchPropertiesTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BmpConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BmpConfigurationPatchProperties model = BinaryData.fromString( + "{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"v\",\"stationName\":\"ttfsclgg\",\"stationIp\":\"ygntbfytnhdnihu\",\"stationPort\":1390915527,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1529717844,\"probeInterval\":2043765911,\"probeCount\":1080884747},\"stationNetwork\":\"rbiwnyfz\",\"monitoredNetworks\":[\"ctsucrxdtejobjz\",\"lwtidcnz\",\"lgmpupj\"],\"exportPolicy\":\"All\",\"monitoredAddressFamilies\":[\"vpnIpv6\"]}") + .toObject(BmpConfigurationPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, model.stationConfigurationState()); + Assertions.assertEquals("v", model.scopeResourceId()); + Assertions.assertEquals("ttfsclgg", model.stationName()); + Assertions.assertEquals("ygntbfytnhdnihu", model.stationIp()); + Assertions.assertEquals(1390915527, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.stationConnectionMode()); + Assertions.assertEquals(1529717844, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(2043765911, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1080884747, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("rbiwnyfz", model.stationNetwork()); + Assertions.assertEquals("ctsucrxdtejobjz", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, model.monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BmpConfigurationPatchProperties model = new BmpConfigurationPatchProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("v") + .withStationName("ttfsclgg") + .withStationIp("ygntbfytnhdnihu") + .withStationPort(1390915527) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(1529717844) + .withProbeInterval(2043765911) + .withProbeCount(1080884747)) + .withStationNetwork("rbiwnyfz") + .withMonitoredNetworks(Arrays.asList("ctsucrxdtejobjz", "lwtidcnz", "lgmpupj")) + .withExportPolicy(BmpExportPolicy.ALL) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.VPN_IPV6)); + model = BinaryData.fromObject(model).toObject(BmpConfigurationPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, model.stationConfigurationState()); + Assertions.assertEquals("v", model.scopeResourceId()); + Assertions.assertEquals("ttfsclgg", model.stationName()); + Assertions.assertEquals("ygntbfytnhdnihu", model.stationIp()); + Assertions.assertEquals(1390915527, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.stationConnectionMode()); + Assertions.assertEquals(1529717844, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(2043765911, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1080884747, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("rbiwnyfz", model.stationNetwork()); + Assertions.assertEquals("ctsucrxdtejobjz", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV6, model.monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java new file mode 100644 index 000000000000..96c0afc29638 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BmpConfigurationPropertiesTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BmpConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BmpConfigurationProperties model = BinaryData.fromString( + "{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"rbkpozffs\",\"stationName\":\"ggvalcrqaxlmbrtv\",\"stationIp\":\"olmlplg\",\"stationPort\":199985602,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":784910142,\"probeInterval\":1442795607,\"probeCount\":517496697},\"stationNetwork\":\"xaqqjhdfhfaob\",\"monitoredNetworks\":[\"csbozvcdqw\",\"sydvw\",\"ybivywotjnjuv\",\"zijrdlxbaey\"],\"exportPolicy\":\"All\",\"monitoredAddressFamilies\":[\"vpnIpv4\"]}") + .toObject(BmpConfigurationProperties.class); + Assertions.assertEquals(StationConfigurationState.DISABLED, model.stationConfigurationState()); + Assertions.assertEquals("rbkpozffs", model.scopeResourceId()); + Assertions.assertEquals("ggvalcrqaxlmbrtv", model.stationName()); + Assertions.assertEquals("olmlplg", model.stationIp()); + Assertions.assertEquals(199985602, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.stationConnectionMode()); + Assertions.assertEquals(784910142, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1442795607, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(517496697, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("xaqqjhdfhfaob", model.stationNetwork()); + Assertions.assertEquals("csbozvcdqw", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV4, model.monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BmpConfigurationProperties model + = new BmpConfigurationProperties().withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("rbkpozffs") + .withStationName("ggvalcrqaxlmbrtv") + .withStationIp("olmlplg") + .withStationPort(199985602) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(784910142) + .withProbeInterval(1442795607) + .withProbeCount(517496697)) + .withStationNetwork("xaqqjhdfhfaob") + .withMonitoredNetworks(Arrays.asList("csbozvcdqw", "sydvw", "ybivywotjnjuv", "zijrdlxbaey")) + .withExportPolicy(BmpExportPolicy.ALL) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.VPN_IPV4)); + model = BinaryData.fromObject(model).toObject(BmpConfigurationProperties.class); + Assertions.assertEquals(StationConfigurationState.DISABLED, model.stationConfigurationState()); + Assertions.assertEquals("rbkpozffs", model.scopeResourceId()); + Assertions.assertEquals("ggvalcrqaxlmbrtv", model.stationName()); + Assertions.assertEquals("olmlplg", model.stationIp()); + Assertions.assertEquals(199985602, model.stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, model.stationConnectionMode()); + Assertions.assertEquals(784910142, model.stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1442795607, model.stationConnectionProperties().probeInterval()); + Assertions.assertEquals(517496697, model.stationConnectionProperties().probeCount()); + Assertions.assertEquals("xaqqjhdfhfaob", model.stationNetwork()); + Assertions.assertEquals("csbozvcdqw", model.monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV4, model.monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java new file mode 100644 index 000000000000..4e55a58d1317 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BurstSizeTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import org.junit.jupiter.api.Assertions; + +public final class BurstSizeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BurstSize model + = BinaryData.fromString("{\"size\":8403705796490340876,\"unit\":\"GBytes\"}").toObject(BurstSize.class); + Assertions.assertEquals(8403705796490340876L, model.size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, model.unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BurstSize model = new BurstSize().withSize(8403705796490340876L).withUnit(BurstSizeUnit.GBYTES); + model = BinaryData.fromObject(model).toObject(BurstSize.class); + Assertions.assertEquals(8403705796490340876L, model.size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, model.unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java new file mode 100644 index 000000000000..849e2cd2df0f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchDetailsTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchDetails; +import org.junit.jupiter.api.Assertions; + +public final class CommitBatchDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommitBatchDetails model + = BinaryData.fromString("{\"failedDevices\":[\"xebuhsxrznmg\"]}").toObject(CommitBatchDetails.class); + Assertions.assertEquals("xebuhsxrznmg", model.failedDevices().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java new file mode 100644 index 000000000000..3f7095a66835 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommitBatchStatusRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommitBatchStatusRequest; +import org.junit.jupiter.api.Assertions; + +public final class CommitBatchStatusRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommitBatchStatusRequest model + = BinaryData.fromString("{\"commitBatchId\":\"sfsgsa\"}").toObject(CommitBatchStatusRequest.class); + Assertions.assertEquals("sfsgsa", model.commitBatchId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CommitBatchStatusRequest model = new CommitBatchStatusRequest().withCommitBatchId("sfsgsa"); + model = BinaryData.fromObject(model).toObject(CommitBatchStatusRequest.class); + Assertions.assertEquals("sfsgsa", model.commitBatchId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java new file mode 100644 index 000000000000..9fb1d6009dbc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationPatchTests.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CommonDynamicMatchConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommonDynamicMatchConfigurationPatch model = BinaryData.fromString( + "{\"ipGroups\":[{\"name\":\"gsxcdgljplkeua\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"flrytswfpfm\",\"gycxnmskwhqjjys\",\"urlpshh\",\"vpedwqslsrh\"]},{\"name\":\"qvwwsko\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wimuvqej\"]},{\"name\":\"ovyrrleaesinu\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"obbpihehc\",\"cy\",\"mrqbrjbbmpxdlv\"]}],\"vlanGroups\":[{\"name\":\"e\",\"vlans\":[\"s\",\"qwjksghudgz\",\"xog\",\"ggsvoujkxibdaf\"]},{\"name\":\"kmdyomkxfbvfbh\",\"vlans\":[\"rhpw\"]},{\"name\":\"ddei\",\"vlans\":[\"zovgkkumuikj\",\"jcazt\"]}],\"portGroups\":[{\"name\":\"sqowxwc\",\"ports\":[\"ikytwvczcswka\",\"ve\",\"yfdvlvhbwrnfxtgd\",\"pqthehnmnaoya\"]},{\"name\":\"coeqswankltytm\",\"ports\":[\"oznnhdrlktgj\",\"sggux\",\"eml\",\"ywaeeczgf\"]},{\"name\":\"kklelssxblycs\",\"ports\":[\"jks\",\"lsmdesqplpvmjc\",\"oewbid\",\"vteo\"]}]}") + .toObject(CommonDynamicMatchConfigurationPatch.class); + Assertions.assertEquals("gsxcdgljplkeua", model.ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("flrytswfpfm", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("e", model.vlanGroups().get(0).name()); + Assertions.assertEquals("s", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("sqowxwc", model.portGroups().get(0).name()); + Assertions.assertEquals("ikytwvczcswka", model.portGroups().get(0).ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CommonDynamicMatchConfigurationPatch model = new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("gsxcdgljplkeua") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("flrytswfpfm", "gycxnmskwhqjjys", "urlpshh", "vpedwqslsrh")), + new IpGroupPatchProperties().withName("qvwwsko") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("wimuvqej")), + new IpGroupPatchProperties().withName("ovyrrleaesinu") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("obbpihehc", "cy", "mrqbrjbbmpxdlv")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("e") + .withVlans(Arrays.asList("s", "qwjksghudgz", "xog", "ggsvoujkxibdaf")), + new VlanGroupPatchProperties().withName("kmdyomkxfbvfbh").withVlans(Arrays.asList("rhpw")), + new VlanGroupPatchProperties().withName("ddei").withVlans(Arrays.asList("zovgkkumuikj", "jcazt")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("sqowxwc") + .withPorts(Arrays.asList("ikytwvczcswka", "ve", "yfdvlvhbwrnfxtgd", "pqthehnmnaoya")), + new PortGroupPatchProperties().withName("coeqswankltytm") + .withPorts(Arrays.asList("oznnhdrlktgj", "sggux", "eml", "ywaeeczgf")), + new PortGroupPatchProperties().withName("kklelssxblycs") + .withPorts(Arrays.asList("jks", "lsmdesqplpvmjc", "oewbid", "vteo")))); + model = BinaryData.fromObject(model).toObject(CommonDynamicMatchConfigurationPatch.class); + Assertions.assertEquals("gsxcdgljplkeua", model.ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("flrytswfpfm", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("e", model.vlanGroups().get(0).name()); + Assertions.assertEquals("s", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("sqowxwc", model.portGroups().get(0).name()); + Assertions.assertEquals("ikytwvczcswka", model.portGroups().get(0).ports().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java index 1f2e65cea650..a87dab6431ee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonDynamicMatchConfigurationTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; @@ -17,44 +17,45 @@ public final class CommonDynamicMatchConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CommonDynamicMatchConfiguration model = BinaryData.fromString( - "{\"ipGroups\":[{\"name\":\"qxepnylbfuaj\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"vofqzhvfc\",\"byfmowuxr\",\"jpvd\",\"xfzwi\"]},{\"name\":\"wzjbh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rkambt\",\"negvmnvuqe\",\"vldspa\",\"tjb\"]}],\"vlanGroups\":[{\"name\":\"flvestmjlxrrilo\",\"vlans\":[\"eewchpxlktw\",\"uziycsl\",\"vu\"]},{\"name\":\"ztcktyh\",\"vlans\":[\"edcg\",\"ulwm\",\"rqzz\"]}],\"portGroups\":[{\"name\":\"pglydz\",\"ports\":[\"vqeevtoep\",\"yutnwytpzdmov\",\"vf\",\"aawzqadfl\"]},{\"name\":\"ur\",\"ports\":[\"aecxndtic\",\"kpvzmlq\",\"mldgxobfirc\"]},{\"name\":\"pkc\",\"ports\":[\"zriykhy\",\"wf\"]}]}") + "{\"ipGroups\":[{\"name\":\"dwl\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"upfgfbk\",\"ubdyhgk\"]},{\"name\":\"in\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"fttsttk\",\"lahb\",\"actxtgzukxitm\",\"qtgqqqxhrnxr\"]},{\"name\":\"pjui\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"qdzfvazivjlfrqtt\"]}],\"vlanGroups\":[{\"name\":\"katnwxyi\",\"vlans\":[\"dkqqfkuvscxkd\"]},{\"name\":\"igovi\",\"vlans\":[\"kpmloa\"]},{\"name\":\"ruocbgo\",\"vlans\":[\"te\",\"ybfhjxa\"]}],\"portGroups\":[{\"name\":\"gslordilmyww\",\"ports\":[\"kxn\",\"edabgyvudtjue\",\"bcihxuuwhc\"]},{\"name\":\"xccybvpa\",\"ports\":[\"kudzpxgwj\",\"lma\"]}]}") .toObject(CommonDynamicMatchConfiguration.class); - Assertions.assertEquals("qxepnylbfuaj", model.ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("vofqzhvfc", model.ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("flvestmjlxrrilo", model.vlanGroups().get(0).name()); - Assertions.assertEquals("eewchpxlktw", model.vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("pglydz", model.portGroups().get(0).name()); - Assertions.assertEquals("vqeevtoep", model.portGroups().get(0).ports().get(0)); + Assertions.assertEquals("dwl", model.ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("upfgfbk", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("katnwxyi", model.vlanGroups().get(0).name()); + Assertions.assertEquals("dkqqfkuvscxkd", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("gslordilmyww", model.portGroups().get(0).name()); + Assertions.assertEquals("kxn", model.portGroups().get(0).ports().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CommonDynamicMatchConfiguration model = new CommonDynamicMatchConfiguration() .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("qxepnylbfuaj") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("vofqzhvfc", "byfmowuxr", "jpvd", "xfzwi")), - new IpGroupProperties().withName("wzjbh") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("rkambt", "negvmnvuqe", "vldspa", "tjb")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("flvestmjlxrrilo") - .withVlans(Arrays.asList("eewchpxlktw", "uziycsl", "vu")), - new VlanGroupProperties().withName("ztcktyh").withVlans(Arrays.asList("edcg", "ulwm", "rqzz")))) + new IpGroupProperties().withName("dwl") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("upfgfbk", "ubdyhgk")), + new IpGroupProperties().withName("in") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("fttsttk", "lahb", "actxtgzukxitm", "qtgqqqxhrnxr")), + new IpGroupProperties().withName("pjui") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("qdzfvazivjlfrqtt")))) + .withVlanGroups( + Arrays.asList(new VlanGroupProperties().withName("katnwxyi").withVlans(Arrays.asList("dkqqfkuvscxkd")), + new VlanGroupProperties().withName("igovi").withVlans(Arrays.asList("kpmloa")), + new VlanGroupProperties().withName("ruocbgo").withVlans(Arrays.asList("te", "ybfhjxa")))) .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("pglydz") - .withPorts(Arrays.asList("vqeevtoep", "yutnwytpzdmov", "vf", "aawzqadfl")), - new PortGroupProperties().withName("ur") - .withPorts(Arrays.asList("aecxndtic", "kpvzmlq", "mldgxobfirc")), - new PortGroupProperties().withName("pkc").withPorts(Arrays.asList("zriykhy", "wf")))); + new PortGroupProperties().withName("gslordilmyww") + .withPorts(Arrays.asList("kxn", "edabgyvudtjue", "bcihxuuwhc")), + new PortGroupProperties().withName("xccybvpa").withPorts(Arrays.asList("kudzpxgwj", "lma")))); model = BinaryData.fromObject(model).toObject(CommonDynamicMatchConfiguration.class); - Assertions.assertEquals("qxepnylbfuaj", model.ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("vofqzhvfc", model.ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("flvestmjlxrrilo", model.vlanGroups().get(0).name()); - Assertions.assertEquals("eewchpxlktw", model.vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("pglydz", model.portGroups().get(0).name()); - Assertions.assertEquals("vqeevtoep", model.portGroups().get(0).ports().get(0)); + Assertions.assertEquals("dwl", model.ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("upfgfbk", model.ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("katnwxyi", model.vlanGroups().get(0).name()); + Assertions.assertEquals("dkqqfkuvscxkd", model.vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("gslordilmyww", model.portGroups().get(0).name()); + Assertions.assertEquals("kxn", model.portGroups().get(0).ports().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java deleted file mode 100644 index a88ff9ab9c63..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonMatchConditionsTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 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.CommonMatchConditions; -import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; -import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CommonMatchConditionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CommonMatchConditions model = BinaryData.fromString( - "{\"protocolTypes\":[\"govibrxkpmloazu\",\"u\"],\"vlanMatchCondition\":{\"vlans\":[\"oorb\",\"eoybfhjxakvvjgs\"],\"innerVlans\":[\"dilmyww\"],\"vlanGroupNames\":[\"kxn\",\"edabgyvudtjue\",\"bcihxuuwhc\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"payakkud\",\"px\",\"wjplma\"],\"ipGroupNames\":[\"cyohpfkyrkdbd\",\"iogsjkmnwq\",\"nobaiyhddviacegf\"]}}") - .toObject(CommonMatchConditions.class); - Assertions.assertEquals("govibrxkpmloazu", model.protocolTypes().get(0)); - Assertions.assertEquals("oorb", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("dilmyww", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("kxn", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("payakkud", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("cyohpfkyrkdbd", model.ipCondition().ipGroupNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommonMatchConditions model - = new CommonMatchConditions().withProtocolTypes(Arrays.asList("govibrxkpmloazu", "u")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("oorb", "eoybfhjxakvvjgs")) - .withInnerVlans(Arrays.asList("dilmyww")) - .withVlanGroupNames(Arrays.asList("kxn", "edabgyvudtjue", "bcihxuuwhc"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("payakkud", "px", "wjplma")) - .withIpGroupNames(Arrays.asList("cyohpfkyrkdbd", "iogsjkmnwq", "nobaiyhddviacegf"))); - model = BinaryData.fromObject(model).toObject(CommonMatchConditions.class); - Assertions.assertEquals("govibrxkpmloazu", model.protocolTypes().get(0)); - Assertions.assertEquals("oorb", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("dilmyww", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("kxn", model.vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); - Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("payakkud", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("cyohpfkyrkdbd", model.ipCondition().ipGroupNames().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java new file mode 100644 index 000000000000..4c42b327e330 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/CommonPostActionResponseForDeviceROCommandsTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands; +import org.junit.jupiter.api.Assertions; + +public final class CommonPostActionResponseForDeviceROCommandsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CommonPostActionResponseForDeviceROCommands model = BinaryData.fromString( + "{\"configurationState\":\"Rejected\",\"outputUrl\":\"cooyvhtuqb\",\"deviceConfigurationPreview\":\"lniibncg\"}") + .toObject(CommonPostActionResponseForDeviceROCommands.class); + Assertions.assertEquals("cooyvhtuqb", model.outputUrl()); + Assertions.assertEquals("lniibncg", model.deviceConfigurationPreview()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java new file mode 100644 index 000000000000..1633fca514d9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConditionalDefaultRoutePropertiesTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ConditionalDefaultRoutePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConditionalDefaultRouteProperties model = BinaryData.fromString( + "{\"ipv4Routes\":[{\"prefix\":\"etndqlmfdggnbbu\",\"nextHop\":[\"wovvv\",\"fleev\",\"oqayrehjuqwv\",\"pxrl\"]},{\"prefix\":\"hpzihacenqqzlx\",\"nextHop\":[\"zubfo\",\"fdbgmkfwm\",\"cwtewfhxwyrkb\"]}],\"ipv6Routes\":[{\"prefix\":\"zl\",\"nextHop\":[\"njpchamkaeplr\",\"jub\",\"wuyw\",\"vtjr\"]},{\"prefix\":\"eikmwlaoklfni\",\"nextHop\":[\"xgucbmtredscnn\",\"tjcyyuv\",\"zrxzhc\",\"ecwwtz\"]},{\"prefix\":\"zclo\",\"nextHop\":[\"yup\"]},{\"prefix\":\"idhz\",\"nextHop\":[\"re\",\"gzsdtmwbyorjp\",\"bchycha\",\"vyrfbqvum\"]}]}") + .toObject(ConditionalDefaultRouteProperties.class); + Assertions.assertEquals("etndqlmfdggnbbu", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wovvv", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zl", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("njpchamkaeplr", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConditionalDefaultRouteProperties model = new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("etndqlmfdggnbbu") + .withNextHop(Arrays.asList("wovvv", "fleev", "oqayrehjuqwv", "pxrl")), + new StaticRouteProperties().withPrefix("hpzihacenqqzlx") + .withNextHop(Arrays.asList("zubfo", "fdbgmkfwm", "cwtewfhxwyrkb")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("zl") + .withNextHop(Arrays.asList("njpchamkaeplr", "jub", "wuyw", "vtjr")), + new StaticRouteProperties().withPrefix("eikmwlaoklfni") + .withNextHop(Arrays.asList("xgucbmtredscnn", "tjcyyuv", "zrxzhc", "ecwwtz")), + new StaticRouteProperties().withPrefix("zclo").withNextHop(Arrays.asList("yup")), + new StaticRouteProperties().withPrefix("idhz") + .withNextHop(Arrays.asList("re", "gzsdtmwbyorjp", "bchycha", "vyrfbqvum")))); + model = BinaryData.fromObject(model).toObject(ConditionalDefaultRouteProperties.class); + Assertions.assertEquals("etndqlmfdggnbbu", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wovvv", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zl", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("njpchamkaeplr", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java new file mode 100644 index 000000000000..4ff26eeb0e16 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; +import org.junit.jupiter.api.Assertions; + +public final class ConnectedSubnetPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConnectedSubnetPatch model + = BinaryData.fromString("{\"annotation\":\"cihmbfntumeezbxv\",\"prefix\":\"xbnuvwcga\"}") + .toObject(ConnectedSubnetPatch.class); + Assertions.assertEquals("cihmbfntumeezbxv", model.annotation()); + Assertions.assertEquals("xbnuvwcga", model.prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConnectedSubnetPatch model + = new ConnectedSubnetPatch().withAnnotation("cihmbfntumeezbxv").withPrefix("xbnuvwcga"); + model = BinaryData.fromObject(model).toObject(ConnectedSubnetPatch.class); + Assertions.assertEquals("cihmbfntumeezbxv", model.annotation()); + Assertions.assertEquals("xbnuvwcga", model.prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java new file mode 100644 index 000000000000..8f3095df281c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class ConnectedSubnetRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConnectedSubnetRoutePolicyPatch model = BinaryData.fromString( + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"iipsnawwlqkz\",\"exportIpv6RoutePolicyId\":\"hhl\"}}") + .toObject(ConnectedSubnetRoutePolicyPatch.class); + Assertions.assertEquals("iipsnawwlqkz", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hhl", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConnectedSubnetRoutePolicyPatch model = new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("iipsnawwlqkz") + .withExportIpv6RoutePolicyId("hhl")); + model = BinaryData.fromObject(model).toObject(ConnectedSubnetRoutePolicyPatch.class); + Assertions.assertEquals("iipsnawwlqkz", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("hhl", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java index cc68d1a8ecc7..2f64b806cbdb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,21 +13,18 @@ public final class ConnectedSubnetRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedSubnetRoutePolicy model = BinaryData.fromString( - "{\"exportRoutePolicyId\":\"fdsajred\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yshtuwgmev\",\"exportIpv6RoutePolicyId\":\"fpwzyifrkgwltx\"}}") + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"lqidywmhm\",\"exportIpv6RoutePolicyId\":\"yrilkfb\"}}") .toObject(ConnectedSubnetRoutePolicy.class); - Assertions.assertEquals("fdsajred", model.exportRoutePolicyId()); - Assertions.assertEquals("yshtuwgmev", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fpwzyifrkgwltx", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("lqidywmhm", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("yrilkfb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectedSubnetRoutePolicy model = new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("fdsajred") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("yshtuwgmev") - .withExportIpv6RoutePolicyId("fpwzyifrkgwltx")); + ConnectedSubnetRoutePolicy model = new ConnectedSubnetRoutePolicy().withExportRoutePolicy( + new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("lqidywmhm").withExportIpv6RoutePolicyId("yrilkfb")); model = BinaryData.fromObject(model).toObject(ConnectedSubnetRoutePolicy.class); - Assertions.assertEquals("fdsajred", model.exportRoutePolicyId()); - Assertions.assertEquals("yshtuwgmev", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fpwzyifrkgwltx", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("lqidywmhm", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("yrilkfb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); } } 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 index 158003543930..9b0a08d73853 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,17 +11,17 @@ public final class ConnectedSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConnectedSubnet model = BinaryData.fromString("{\"prefix\":\"fsuqtaazyqbxy\",\"annotation\":\"yfp\"}") + ConnectedSubnet model = BinaryData.fromString("{\"annotation\":\"nsxzajlns\",\"prefix\":\"hwjuyxxbxqvmvua\"}") .toObject(ConnectedSubnet.class); - Assertions.assertEquals("yfp", model.annotation()); - Assertions.assertEquals("fsuqtaazyqbxy", model.prefix()); + Assertions.assertEquals("nsxzajlns", model.annotation()); + Assertions.assertEquals("hwjuyxxbxqvmvua", model.prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectedSubnet model = new ConnectedSubnet().withAnnotation("yfp").withPrefix("fsuqtaazyqbxy"); + ConnectedSubnet model = new ConnectedSubnet().withAnnotation("nsxzajlns").withPrefix("hwjuyxxbxqvmvua"); model = BinaryData.fromObject(model).toObject(ConnectedSubnet.class); - Assertions.assertEquals("yfp", model.annotation()); - Assertions.assertEquals("fsuqtaazyqbxy", model.prefix()); + Assertions.assertEquals("nsxzajlns", model.annotation()); + Assertions.assertEquals("hwjuyxxbxqvmvua", model.prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java index 7eac63795747..6f9634f44219 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ControllerServicesTests.java @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ControllerServicesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ControllerServices model = BinaryData.fromString( - "{\"ipv4AddressSpaces\":[\"osqkptjqgk\",\"fmmainwhedxkpbq\",\"unt\"],\"ipv6AddressSpaces\":[\"izazz\",\"lw\",\"vydjufbnk\"]}") + "{\"ipv4AddressSpaces\":[\"vqzrwtrd\",\"s\",\"nvqeon\",\"gnwxl\"],\"ipv6AddressSpaces\":[\"zyohxpthc\",\"opvkvtwfves\",\"bpbokhmml\",\"dyarnggcjfwblq\"]}") .toObject(ControllerServices.class); - Assertions.assertEquals("osqkptjqgk", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("izazz", model.ipv6AddressSpaces().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ControllerServices model - = new ControllerServices().withIpv4AddressSpaces(Arrays.asList("osqkptjqgk", "fmmainwhedxkpbq", "unt")) - .withIpv6AddressSpaces(Arrays.asList("izazz", "lw", "vydjufbnk")); - model = BinaryData.fromObject(model).toObject(ControllerServices.class); - Assertions.assertEquals("osqkptjqgk", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("izazz", model.ipv6AddressSpaces().get(0)); + Assertions.assertEquals("vqzrwtrd", model.ipv4AddressSpaces().get(0)); + Assertions.assertEquals("zyohxpthc", model.ipv6AddressSpaces().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java new file mode 100644 index 000000000000..6e47571f46bc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPatchPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DestinationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DestinationPatchProperties model = BinaryData.fromString( + "{\"name\":\"i\",\"destinationType\":\"Direct\",\"destinationId\":\"vxqtolpw\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"btzaprjxco\",\"tickfkith\",\"eoc\"]},\"destinationTapRuleId\":\"vuqzgbjwvrudmp\"}") + .toObject(DestinationPatchProperties.class); + Assertions.assertEquals("i", model.name()); + Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); + Assertions.assertEquals("vxqtolpw", model.destinationId()); + Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); + Assertions.assertEquals("btzaprjxco", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("vuqzgbjwvrudmp", model.destinationTapRuleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DestinationPatchProperties model = new DestinationPatchProperties().withName("i") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("vxqtolpw") + .withIsolationDomainProperties(new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("btzaprjxco", "tickfkith", "eoc"))) + .withDestinationTapRuleId("vuqzgbjwvrudmp"); + model = BinaryData.fromObject(model).toObject(DestinationPatchProperties.class); + Assertions.assertEquals("i", model.name()); + Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); + Assertions.assertEquals("vxqtolpw", model.destinationId()); + Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); + Assertions.assertEquals("btzaprjxco", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("vuqzgbjwvrudmp", model.destinationTapRuleId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java index 850fc8026f52..3f4dd3a55e3d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DestinationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -16,30 +16,30 @@ public final class DestinationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DestinationProperties model = BinaryData.fromString( - "{\"name\":\"okjbmsr\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"xxhwrlqo\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"lpz\"]},\"destinationTapRuleId\":\"rwnrzo\"}") + "{\"name\":\"hicparexzoksgqh\",\"destinationType\":\"Direct\",\"destinationId\":\"ojuxil\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"rfldfljwtkbptsfl\"]},\"destinationTapRuleId\":\"umbmwgftshfg\"}") .toObject(DestinationProperties.class); - Assertions.assertEquals("okjbmsr", model.name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("xxhwrlqo", model.destinationId()); - Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("lpz", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rwnrzo", model.destinationTapRuleId()); + Assertions.assertEquals("hicparexzoksgqh", model.name()); + Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); + Assertions.assertEquals("ojuxil", model.destinationId()); + Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); + Assertions.assertEquals("rfldfljwtkbptsfl", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("umbmwgftshfg", model.destinationTapRuleId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DestinationProperties model = new DestinationProperties().withName("okjbmsr") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("xxhwrlqo") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("lpz"))) - .withDestinationTapRuleId("rwnrzo"); + DestinationProperties model = new DestinationProperties().withName("hicparexzoksgqh") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("ojuxil") + .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("rfldfljwtkbptsfl"))) + .withDestinationTapRuleId("umbmwgftshfg"); model = BinaryData.fromObject(model).toObject(DestinationProperties.class); - Assertions.assertEquals("okjbmsr", model.name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("xxhwrlqo", model.destinationId()); - Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("lpz", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rwnrzo", model.destinationTapRuleId()); + Assertions.assertEquals("hicparexzoksgqh", model.name()); + Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); + Assertions.assertEquals("ojuxil", model.destinationId()); + Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); + Assertions.assertEquals("rfldfljwtkbptsfl", model.isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("umbmwgftshfg", model.destinationTapRuleId()); } } 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 index 51a04ba30c1c..0a89c3be4fbe 100644 --- 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 @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"tbhpjhxpcvrdnye\",\"interfaceType\":\"aneqadynzja\",\"supportedConnectorTypes\":[{\"connectorType\":\"uomzczfki\",\"maxSpeedInMbps\":1238351045},{\"connectorType\":\"saaxwspca\",\"maxSpeedInMbps\":1087934112},{\"connectorType\":\"fjqebglcxkx\",\"maxSpeedInMbps\":133600558}]}") + "{\"identifier\":\"objopnou\",\"interfaceType\":\"qezkqxs\",\"supportedConnectorTypes\":[{\"connectorType\":\"yigfcvcew\",\"maxSpeedInMbps\":878644125},{\"connectorType\":\"dgsjsat\",\"maxSpeedInMbps\":1844658642},{\"connectorType\":\"mazdfsqxh\",\"maxSpeedInMbps\":982275641},{\"connectorType\":\"ejparn\",\"maxSpeedInMbps\":1093422687}]}") .toObject(DeviceInterfaceProperties.class); - Assertions.assertEquals("tbhpjhxpcvrdnye", model.identifier()); - Assertions.assertEquals("aneqadynzja", model.interfaceType()); - Assertions.assertEquals("uomzczfki", model.supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1238351045, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceInterfaceProperties model = new DeviceInterfaceProperties().withIdentifier("tbhpjhxpcvrdnye") - .withInterfaceType("aneqadynzja") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("uomzczfki").withMaxSpeedInMbps(1238351045), - new SupportedConnectorProperties().withConnectorType("saaxwspca").withMaxSpeedInMbps(1087934112), - new SupportedConnectorProperties().withConnectorType("fjqebglcxkx").withMaxSpeedInMbps(133600558))); - model = BinaryData.fromObject(model).toObject(DeviceInterfaceProperties.class); - Assertions.assertEquals("tbhpjhxpcvrdnye", model.identifier()); - Assertions.assertEquals("aneqadynzja", model.interfaceType()); - Assertions.assertEquals("uomzczfki", model.supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1238351045, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); + Assertions.assertEquals("objopnou", model.identifier()); + Assertions.assertEquals("qezkqxs", model.interfaceType()); + Assertions.assertEquals("yigfcvcew", model.supportedConnectorTypes().get(0).connectorType()); + Assertions.assertEquals(878644125, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java new file mode 100644 index 000000000000..2dc94a77f72a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRoCommandTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRoCommand; +import org.junit.jupiter.api.Assertions; + +public final class DeviceRoCommandTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeviceRoCommand model = BinaryData.fromString("{\"command\":\"qclmgdtwgabd\"}").toObject(DeviceRoCommand.class); + Assertions.assertEquals("qclmgdtwgabd", model.command()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeviceRoCommand model = new DeviceRoCommand().withCommand("qclmgdtwgabd"); + model = BinaryData.fromObject(model).toObject(DeviceRoCommand.class); + Assertions.assertEquals("qclmgdtwgabd", model.command()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java new file mode 100644 index 000000000000..2596fb7140bb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceRwCommandTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceRwCommand; +import org.junit.jupiter.api.Assertions; + +public final class DeviceRwCommandTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeviceRwCommand model = BinaryData.fromString("{\"command\":\"dvcdq\"}").toObject(DeviceRwCommand.class); + Assertions.assertEquals("dvcdq", model.command()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeviceRwCommand model = new DeviceRwCommand().withCommand("dvcdq"); + model = BinaryData.fromObject(model).toObject(DeviceRwCommand.class); + Assertions.assertEquals("dvcdq", model.command()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java new file mode 100644 index 000000000000..d52d652262d8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DiscardCommitBatchRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DiscardCommitBatchRequest; +import org.junit.jupiter.api.Assertions; + +public final class DiscardCommitBatchRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiscardCommitBatchRequest model + = BinaryData.fromString("{\"commitBatchId\":\"al\"}").toObject(DiscardCommitBatchRequest.class); + Assertions.assertEquals("al", model.commitBatchId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiscardCommitBatchRequest model = new DiscardCommitBatchRequest().withCommitBatchId("al"); + model = BinaryData.fromObject(model).toObject(DiscardCommitBatchRequest.class); + Assertions.assertEquals("al", model.commitBatchId()); + } +} 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 d49dd19a584c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.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.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\":[\"bannovvoxczytp\",\"wnwvroevytlyokr\",\"rouuxvnsasbcry\"]}") - .toObject(EnableDisableOnResources.class); - Assertions.assertEquals("bannovvoxczytp", model.resourceIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableDisableOnResources model = new EnableDisableOnResources() - .withResourceIds(Arrays.asList("bannovvoxczytp", "wnwvroevytlyokr", "rouuxvnsasbcry")); - model = BinaryData.fromObject(model).toObject(EnableDisableOnResources.class); - Assertions.assertEquals("bannovvoxczytp", model.resourceIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java new file mode 100644 index 000000000000..fd200ae23efa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import org.junit.jupiter.api.Assertions; + +public final class ExportRoutePolicyInformationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExportRoutePolicyInformationPatch model + = BinaryData.fromString("{\"exportIpv4RoutePolicyId\":\"qlarhqt\",\"exportIpv6RoutePolicyId\":\"caz\"}") + .toObject(ExportRoutePolicyInformationPatch.class); + Assertions.assertEquals("qlarhqt", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("caz", model.exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExportRoutePolicyInformationPatch model + = new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId("qlarhqt") + .withExportIpv6RoutePolicyId("caz"); + model = BinaryData.fromObject(model).toObject(ExportRoutePolicyInformationPatch.class); + Assertions.assertEquals("qlarhqt", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("caz", model.exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java index 18b67f3900a8..a04f659e832a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,19 @@ public final class ExportRoutePolicyInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportRoutePolicyInformation model = BinaryData - .fromString("{\"exportIpv4RoutePolicyId\":\"vtbdm\",\"exportIpv6RoutePolicyId\":\"byidaelqpvekmkwj\"}") + .fromString("{\"exportIpv4RoutePolicyId\":\"vynuqqkotauratn\",\"exportIpv6RoutePolicyId\":\"ppfzsclef\"}") .toObject(ExportRoutePolicyInformation.class); - Assertions.assertEquals("vtbdm", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("byidaelqpvekmkwj", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("vynuqqkotauratn", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("ppfzsclef", model.exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportRoutePolicyInformation model = new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("vtbdm") - .withExportIpv6RoutePolicyId("byidaelqpvekmkwj"); + ExportRoutePolicyInformation model + = new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("vynuqqkotauratn") + .withExportIpv6RoutePolicyId("ppfzsclef"); model = BinaryData.fromObject(model).toObject(ExportRoutePolicyInformation.class); - Assertions.assertEquals("vtbdm", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("byidaelqpvekmkwj", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("vynuqqkotauratn", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("ppfzsclef", model.exportIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java new file mode 100644 index 000000000000..bd97246a5550 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class ExportRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExportRoutePolicyPatch model + = BinaryData.fromString("{\"exportIpv4RoutePolicyId\":\"b\",\"exportIpv6RoutePolicyId\":\"yrfgxkyd\"}") + .toObject(ExportRoutePolicyPatch.class); + Assertions.assertEquals("b", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("yrfgxkyd", model.exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExportRoutePolicyPatch model + = new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("b").withExportIpv6RoutePolicyId("yrfgxkyd"); + model = BinaryData.fromObject(model).toObject(ExportRoutePolicyPatch.class); + Assertions.assertEquals("b", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("yrfgxkyd", model.exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java index e5fb33945036..bbe659050b16 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExportRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class ExportRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportRoutePolicy model = BinaryData - .fromString("{\"exportIpv4RoutePolicyId\":\"ozjiihj\",\"exportIpv6RoutePolicyId\":\"ybmrzoepnxwd\"}") + .fromString("{\"exportIpv4RoutePolicyId\":\"tghyksarcdr\",\"exportIpv6RoutePolicyId\":\"sluvlzladltxkpb\"}") .toObject(ExportRoutePolicy.class); - Assertions.assertEquals("ozjiihj", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("ybmrzoepnxwd", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("tghyksarcdr", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("sluvlzladltxkpb", model.exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportRoutePolicy model = new ExportRoutePolicy().withExportIpv4RoutePolicyId("ozjiihj") - .withExportIpv6RoutePolicyId("ybmrzoepnxwd"); + ExportRoutePolicy model = new ExportRoutePolicy().withExportIpv4RoutePolicyId("tghyksarcdr") + .withExportIpv6RoutePolicyId("sluvlzladltxkpb"); model = BinaryData.fromObject(model).toObject(ExportRoutePolicy.class); - Assertions.assertEquals("ozjiihj", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("ybmrzoepnxwd", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("tghyksarcdr", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("sluvlzladltxkpb", model.exportIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.java deleted file mode 100644 index 705fc4152cb2..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExtensionEnumPropertyTests.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.Extension; -import com.azure.resourcemanager.managednetworkfabric.models.ExtensionEnumProperty; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionEnumPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionEnumProperty model - = BinaryData.fromString("{\"extension\":\"NPB\"}").toObject(ExtensionEnumProperty.class); - Assertions.assertEquals(Extension.NPB, model.extension()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionEnumProperty model = new ExtensionEnumProperty().withExtension(Extension.NPB); - model = BinaryData.fromObject(model).toObject(ExtensionEnumProperty.class); - Assertions.assertEquals(Extension.NPB, model.extension()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBfdAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBfdAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..a3a4a990687d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBfdAdministrativeStateRequestTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkRouteType; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkBfdAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkBfdAdministrativeStateRequest model + = BinaryData.fromString("{\"routeType\":\"OptionA\",\"administrativeState\":\"Enabled\"}") + .toObject(ExternalNetworkBfdAdministrativeStateRequest.class); + Assertions.assertEquals(ExternalNetworkRouteType.OPTIONA, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkBfdAdministrativeStateRequest model + = new ExternalNetworkBfdAdministrativeStateRequest().withRouteType(ExternalNetworkRouteType.OPTIONA) + .withAdministrativeState(BfdAdministrativeState.ENABLED); + model = BinaryData.fromObject(model).toObject(ExternalNetworkBfdAdministrativeStateRequest.class); + Assertions.assertEquals(ExternalNetworkRouteType.OPTIONA, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java new file mode 100644 index 000000000000..6581f47608fb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkBmpPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkBmpPatchProperties model = BinaryData.fromString("{\"configurationState\":\"Disabled\"}") + .toObject(ExternalNetworkBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkBmpPatchProperties model + = new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(ExternalNetworkBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java new file mode 100644 index 000000000000..2e4ebc252591 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkBmpPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkBmpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkBmpProperties model = BinaryData.fromString("{\"configurationState\":\"Enabled\"}") + .toObject(ExternalNetworkBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkBmpProperties model + = new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(ExternalNetworkBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } +} 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 index c525078c25d1..4c0f39fa5c9c 100644 --- 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 @@ -1,18 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,94 +30,194 @@ public final class ExternalNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"wnsnlaimouxwks\",\"mud\",\"fco\"],\"exportRouteTargets\":[\"cziu\",\"wswjrkbqsjh\",\"tqqvy\",\"scyrfwbivqv\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"yzwvbhlimbyqec\",\"ood\",\"ikcdrdaasax\",\"obsmf\"],\"importIpv6RouteTargets\":[\"yjvzukosr\",\"awn\"],\"exportIpv4RouteTargets\":[\"lnk\",\"ywsxvjabjqqaxu\",\"vym\"],\"exportIpv6RouteTargets\":[\"dndoabhjxw\",\"qweuip\",\"pvksmit\"]}},\"optionAProperties\":{\"mtu\":996599116,\"vlanId\":47040018,\"fabricASN\":7489455954873500564,\"peerASN\":8923092334275652635,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":967945302,\"multiplier\":1996640929},\"ingressAclId\":\"rakkld\",\"egressAclId\":\"c\",\"primaryIpv4Prefix\":\"cmfcnrjajq\",\"primaryIpv6Prefix\":\"txjtielnzqgx\",\"secondaryIpv4Prefix\":\"fbbmtlp\",\"secondaryIpv6Prefix\":\"gynoiprnzcali\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"aqzi\",\"importRoutePolicyId\":\"qimiymqr\",\"exportRoutePolicyId\":\"guhfupe\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vvoqsbpkf\",\"importIpv6RoutePolicyId\":\"nfkgxsyaowuzowpu\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"kc\",\"exportIpv6RoutePolicyId\":\"gukxrztiochluti\"},\"annotation\":\"qrudjizcbfzmcr\"},\"id\":\"fhi\",\"name\":\"c\",\"type\":\"mfbcpaqktkrum\"}") + "{\"properties\":{\"annotation\":\"qncjubkhjozfymcw\",\"networkToNetworkInterconnectId\":\"upyvqyvliq\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"sejb\",\"importIpv6RoutePolicyId\":\"si\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"swhddzydisnuep\",\"exportIpv6RoutePolicyId\":\"yjln\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"ttdiia\",\"cqibzj\",\"hweebiph\",\"yv\"],\"exportRouteTargets\":[\"qwoqs\",\"atjhdhzybspijhf\",\"zgdkkagvwu\",\"hsusmmor\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"wilzzhnijmriprlk\",\"neyttl\"],\"importIpv6RouteTargets\":[\"ivcbkutpumltwj\",\"lu\",\"ynbpvzlqywauy\",\"njc\"],\"exportIpv4RouteTargets\":[\"ocgjs\",\"gouarhwvixqq\"],\"exportIpv6RouteTargets\":[\"jkyb\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"clrvtzqnrbctbh\",\"primaryIpv6Prefix\":\"hxpcvrdnyeita\",\"secondaryIpv4Prefix\":\"qady\",\"secondaryIpv6Prefix\":\"jahwriuomzczf\",\"mtu\":1526208492,\"vlanId\":1279251745,\"fabricASN\":9172221465302260158,\"peerASN\":478294756398178840,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1257235415,\"multiplier\":1450655076},\"ingressAclId\":\"khfjqebglcxkx\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"mvygysem\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1549205819,\"threshold\":251648854,\"idleTimeExpiry\":797825234},{\"maximumRoutes\":1510318888,\"threshold\":1765927549,\"idleTimeExpiry\":1678136570},{\"maximumRoutes\":538512272,\"threshold\":1318667295,\"idleTimeExpiry\":698298127}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":260536270,\"threshold\":670816014,\"idleTimeExpiry\":1901373606},{\"maximumRoutes\":1454064000,\"threshold\":48580311,\"idleTimeExpiry\":1098907429},{\"maximumRoutes\":36289593,\"threshold\":1153391303,\"idleTimeExpiry\":252518646}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1335024313,\"multiplier\":1224711832},\"ipv4Routes\":[{\"prefix\":\"seusrfj\",\"nextHop\":[\"xzfxn\"]},{\"prefix\":\"mlbmuoswkjm\",\"nextHop\":[\"hdcyyyzlwhbwzjn\",\"fzrf\",\"m\"]},{\"prefix\":\"qgnnbz\",\"nextHop\":[\"ftedzuubjtvgjsx\",\"tyjjvavdpwwobt\"]},{\"prefix\":\"phtitsffofwanmhk\",\"nextHop\":[\"auwazcgwd\",\"riwgybjp\",\"zokscvg\",\"lix\"]}],\"ipv6Routes\":[{\"prefix\":\"yfgwewqkj\",\"nextHop\":[\"prwpxsoohu\",\"xlcskltez\"]}]},\"lastOperation\":{\"details\":\"ggzlf\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\"},\"id\":\"srtmdylperpiltt\",\"name\":\"zgczfcmfpfbode\",\"type\":\"resrgvtshuvft\"}") .toObject(ExternalNetworkInner.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("wnsnlaimouxwks", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("cziu", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("yzwvbhlimbyqec", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("yjvzukosr", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lnk", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("dndoabhjxw", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("cmfcnrjajq", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("txjtielnzqgx", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fbbmtlp", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gynoiprnzcali", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(996599116, model.optionAProperties().mtu()); - Assertions.assertEquals(47040018, model.optionAProperties().vlanId()); - Assertions.assertEquals(8923092334275652635L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(967945302, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1996640929, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("rakkld", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("c", model.optionAProperties().egressAclId()); - Assertions.assertEquals("aqzi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("qimiymqr", model.importRoutePolicyId()); - Assertions.assertEquals("guhfupe", model.exportRoutePolicyId()); - Assertions.assertEquals("vvoqsbpkf", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nfkgxsyaowuzowpu", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("kc", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("gukxrztiochluti", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qrudjizcbfzmcr", model.annotation()); + Assertions.assertEquals("qncjubkhjozfymcw", model.properties().annotation()); + Assertions.assertEquals("upyvqyvliq", model.properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("sejb", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("si", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("swhddzydisnuep", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("yjln", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.properties().peeringOption()); + Assertions.assertEquals("ttdiia", model.properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("qwoqs", model.properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("wilzzhnijmriprlk", + model.properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ivcbkutpumltwj", + model.properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("ocgjs", + model.properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("jkyb", + model.properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("clrvtzqnrbctbh", model.properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("hxpcvrdnyeita", model.properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("qady", model.properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("jahwriuomzczf", model.properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1526208492, model.properties().optionAProperties().mtu()); + Assertions.assertEquals(1279251745, model.properties().optionAProperties().vlanId()); + Assertions.assertEquals(478294756398178840L, model.properties().optionAProperties().peerASN()); + Assertions.assertEquals(1257235415, + model.properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1450655076, model.properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("khfjqebglcxkx", model.properties().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("mvygysem", model.properties().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + model.properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + model.properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1549205819, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(251648854, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(797825234, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(260536270, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(670816014, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1901373606, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1335024313, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1224711832, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("seusrfj", model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xzfxn", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("yfgwewqkj", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("prwpxsoohu", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkInner model = new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties( - new L3OptionBProperties().withImportRouteTargets(Arrays.asList("wnsnlaimouxwks", "mud", "fco")) - .withExportRouteTargets(Arrays.asList("cziu", "wswjrkbqsjh", "tqqvy", "scyrfwbivqv")) + ExternalNetworkInner model = new ExternalNetworkInner() + .withProperties(new ExternalNetworkProperties().withAnnotation("qncjubkhjozfymcw") + .withNetworkToNetworkInterconnectId("upyvqyvliq") + .withImportRoutePolicy( + new ImportRoutePolicy().withImportIpv4RoutePolicyId("sejb").withImportIpv6RoutePolicyId("si")) + .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("swhddzydisnuep") + .withExportIpv6RoutePolicyId("yjln")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new L3OptionBProperties() + .withImportRouteTargets(Arrays.asList("ttdiia", "cqibzj", "hweebiph", "yv")) + .withExportRouteTargets(Arrays.asList("qwoqs", "atjhdhzybspijhf", "zgdkkagvwu", "hsusmmor")) .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("yzwvbhlimbyqec", "ood", "ikcdrdaasax", "obsmf")) - .withImportIpv6RouteTargets(Arrays.asList("yjvzukosr", "awn")) - .withExportIpv4RouteTargets(Arrays.asList("lnk", "ywsxvjabjqqaxu", "vym")) - .withExportIpv6RouteTargets(Arrays.asList("dndoabhjxw", "qweuip", "pvksmit")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("cmfcnrjajq") - .withPrimaryIpv6Prefix("txjtielnzqgx") - .withSecondaryIpv4Prefix("fbbmtlp") - .withSecondaryIpv6Prefix("gynoiprnzcali") - .withMtu(996599116) - .withVlanId(47040018) - .withPeerAsn(8923092334275652635L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(967945302).withMultiplier(1996640929)) - .withIngressAclId("rakkld") - .withEgressAclId("c")) - .withNetworkToNetworkInterconnectId("aqzi") - .withImportRoutePolicyId("qimiymqr") - .withExportRoutePolicyId("guhfupe") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("vvoqsbpkf") - .withImportIpv6RoutePolicyId("nfkgxsyaowuzowpu")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("kc") - .withExportIpv6RoutePolicyId("gukxrztiochluti")) - .withAnnotation("qrudjizcbfzmcr"); + .withImportIpv4RouteTargets(Arrays.asList("wilzzhnijmriprlk", "neyttl")) + .withImportIpv6RouteTargets(Arrays.asList("ivcbkutpumltwj", "lu", "ynbpvzlqywauy", "njc")) + .withExportIpv4RouteTargets(Arrays.asList("ocgjs", "gouarhwvixqq")) + .withExportIpv6RouteTargets(Arrays.asList("jkyb")))) + .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() + .withPrimaryIpv4Prefix("clrvtzqnrbctbh") + .withPrimaryIpv6Prefix("hxpcvrdnyeita") + .withSecondaryIpv4Prefix("qady") + .withSecondaryIpv6Prefix("jahwriuomzczf") + .withMtu(1526208492) + .withVlanId(1279251745) + .withPeerASN(478294756398178840L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1257235415).withMultiplier(1450655076)) + .withIngressAclId("khfjqebglcxkx") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId("mvygysem") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1549205819) + .withThreshold(251648854) + .withIdleTimeExpiry(797825234), + new PrefixLimitProperties().withMaximumRoutes(1510318888) + .withThreshold(1765927549) + .withIdleTimeExpiry(1678136570), + new PrefixLimitProperties().withMaximumRoutes(538512272) + .withThreshold(1318667295) + .withIdleTimeExpiry(698298127)))) + .withNativeIpv6PrefixLimit( + new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(260536270) + .withThreshold(670816014) + .withIdleTimeExpiry(1901373606), + new PrefixLimitProperties().withMaximumRoutes(1454064000) + .withThreshold(48580311) + .withIdleTimeExpiry(1098907429), + new PrefixLimitProperties().withMaximumRoutes(36289593) + .withThreshold(1153391303) + .withIdleTimeExpiry(252518646))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1335024313).withMultiplier(1224711832)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("seusrfj").withNextHop(Arrays.asList("xzfxn")), + new StaticRouteProperties().withPrefix("mlbmuoswkjm") + .withNextHop(Arrays.asList("hdcyyyzlwhbwzjn", "fzrf", "m")), + new StaticRouteProperties().withPrefix("qgnnbz") + .withNextHop(Arrays.asList("ftedzuubjtvgjsx", "tyjjvavdpwwobt")), + new StaticRouteProperties().withPrefix("phtitsffofwanmhk") + .withNextHop(Arrays.asList("auwazcgwd", "riwgybjp", "zokscvg", "lix")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("yfgwewqkj") + .withNextHop(Arrays.asList("prwpxsoohu", "xlcskltez")))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkInner.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("wnsnlaimouxwks", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("cziu", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("yzwvbhlimbyqec", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("yjvzukosr", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lnk", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("dndoabhjxw", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("cmfcnrjajq", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("txjtielnzqgx", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fbbmtlp", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gynoiprnzcali", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(996599116, model.optionAProperties().mtu()); - Assertions.assertEquals(47040018, model.optionAProperties().vlanId()); - Assertions.assertEquals(8923092334275652635L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(967945302, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1996640929, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("rakkld", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("c", model.optionAProperties().egressAclId()); - Assertions.assertEquals("aqzi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("qimiymqr", model.importRoutePolicyId()); - Assertions.assertEquals("guhfupe", model.exportRoutePolicyId()); - Assertions.assertEquals("vvoqsbpkf", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nfkgxsyaowuzowpu", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("kc", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("gukxrztiochluti", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qrudjizcbfzmcr", model.annotation()); + Assertions.assertEquals("qncjubkhjozfymcw", model.properties().annotation()); + Assertions.assertEquals("upyvqyvliq", model.properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("sejb", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("si", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("swhddzydisnuep", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("yjln", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.properties().peeringOption()); + Assertions.assertEquals("ttdiia", model.properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("qwoqs", model.properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("wilzzhnijmriprlk", + model.properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ivcbkutpumltwj", + model.properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("ocgjs", + model.properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("jkyb", + model.properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("clrvtzqnrbctbh", model.properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("hxpcvrdnyeita", model.properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("qady", model.properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("jahwriuomzczf", model.properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1526208492, model.properties().optionAProperties().mtu()); + Assertions.assertEquals(1279251745, model.properties().optionAProperties().vlanId()); + Assertions.assertEquals(478294756398178840L, model.properties().optionAProperties().peerASN()); + Assertions.assertEquals(1257235415, + model.properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1450655076, model.properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("khfjqebglcxkx", model.properties().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("mvygysem", model.properties().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + model.properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + model.properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1549205819, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(251648854, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(797825234, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(260536270, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(670816014, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1901373606, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1335024313, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1224711832, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("seusrfj", model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xzfxn", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("yfgwewqkj", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("prwpxsoohu", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkListResultTests.java new file mode 100644 index 000000000000..a66095106aa9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkListResultTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.ExternalNetworkListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"y\",\"networkToNetworkInterconnectId\":\"twmp\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"foeajogsy\",\"importIpv6RoutePolicyId\":\"etamfddrvlkpzwb\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ecchdidrmuhkahm\",\"exportIpv6RoutePolicyId\":\"dbiucvkhhwmjpjbw\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"qrrihufoihp\",\"iybxvgnzuzpb\",\"kzcscpiuzvkun\"],\"exportRouteTargets\":[\"mjuk\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"kaugpucdocfqplwg\",\"f\",\"hxw\",\"jlvzklk\"],\"importIpv6RouteTargets\":[\"ikyjtkakvlb\",\"shjvpzaptuoskaoi\",\"jixwfgc\"],\"exportIpv4RouteTargets\":[\"kkcxwnujvqynvav\"],\"exportIpv6RouteTargets\":[\"dmuqohhi\",\"raxq\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"rwj\",\"primaryIpv6Prefix\":\"jbrhlhpvzadbw\",\"secondaryIpv4Prefix\":\"ninafhxrz\",\"secondaryIpv6Prefix\":\"m\",\"mtu\":1573816814,\"vlanId\":1167276331,\"fabricASN\":2885112812797852769,\"peerASN\":7877261276205695367,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1319510545,\"multiplier\":1201401514},\"ingressAclId\":\"cqx\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"a\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1468254749,\"multiplier\":1691530507},\"ipv4Routes\":[{\"prefix\":\"d\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"rdvcehqwhit\",\"nextHop\":[]},{\"prefix\":\"nmxgnm\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"buwvorba\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"h\",\"name\":\"ltqstqkqsygxiyn\",\"type\":\"covagzkheuba\"}],\"nextLink\":\"xunpqcckqiawzlz\"}") + .toObject(ExternalNetworkListResult.class); + Assertions.assertEquals("y", model.value().get(0).properties().annotation()); + Assertions.assertEquals("twmp", model.value().get(0).properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("foeajogsy", + model.value().get(0).properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("etamfddrvlkpzwb", + model.value().get(0).properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ecchdidrmuhkahm", + model.value().get(0).properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dbiucvkhhwmjpjbw", + model.value().get(0).properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).properties().peeringOption()); + Assertions.assertEquals("qrrihufoihp", + model.value().get(0).properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("mjuk", + model.value().get(0).properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("kaugpucdocfqplwg", + model.value().get(0).properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ikyjtkakvlb", + model.value().get(0).properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("kkcxwnujvqynvav", + model.value().get(0).properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("dmuqohhi", + model.value().get(0).properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("rwj", model.value().get(0).properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("jbrhlhpvzadbw", + model.value().get(0).properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ninafhxrz", + model.value().get(0).properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("m", model.value().get(0).properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1573816814, model.value().get(0).properties().optionAProperties().mtu()); + Assertions.assertEquals(1167276331, model.value().get(0).properties().optionAProperties().vlanId()); + Assertions.assertEquals(7877261276205695367L, model.value().get(0).properties().optionAProperties().peerASN()); + Assertions.assertEquals(1319510545, + model.value().get(0).properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1201401514, + model.value().get(0).properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("cqx", model.value().get(0).properties().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.value().get(0).properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("a", model.value().get(0).properties().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + model.value().get(0).properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + model.value().get(0).properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1468254749, + model.value().get(0).properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1691530507, + model.value().get(0).properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("d", + model.value().get(0).properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rdvcehqwhit", + model.value().get(0).properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xunpqcckqiawzlz", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java index 8e8cb9b2274d..26caf3a1b4ff 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesOptionAPropertiesTests.java @@ -1,58 +1,111 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ExternalNetworkPatchPropertiesOptionAPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPatchPropertiesOptionAProperties model = BinaryData.fromString( - "{\"mtu\":498645411,\"vlanId\":2120923366,\"fabricASN\":1694114614222816717,\"peerASN\":7595116336186420084,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":944404959,\"multiplier\":2014555125},\"ingressAclId\":\"qchoadhrsxqv\",\"egressAclId\":\"spabdsrgfa\",\"primaryIpv4Prefix\":\"lzrsub\",\"primaryIpv6Prefix\":\"rxhjnltcet\",\"secondaryIpv4Prefix\":\"vqy\",\"secondaryIpv6Prefix\":\"eqq\"}") + "{\"primaryIpv4Prefix\":\"z\",\"primaryIpv6Prefix\":\"zelwgvydjufbnkl\",\"secondaryIpv4Prefix\":\"axpegjw\",\"secondaryIpv6Prefix\":\"bal\",\"mtu\":275006479,\"vlanId\":1736041997,\"fabricASN\":7942755704297457682,\"peerASN\":8572720228086503530,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":215977873,\"multiplier\":1796935585},\"ingressAclId\":\"ouvmrsiflik\",\"egressAclId\":\"pzkgxfxfmyrqsd\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1013980460,\"threshold\":709419451,\"idleTimeExpiry\":1559219930},{\"maximumRoutes\":1409025816,\"threshold\":1612148349,\"idleTimeExpiry\":1339527688},{\"maximumRoutes\":778791021,\"threshold\":552788517,\"idleTimeExpiry\":1517650446}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1164471478,\"threshold\":297749552,\"idleTimeExpiry\":1546493785},{\"maximumRoutes\":1525234897,\"threshold\":699915220,\"idleTimeExpiry\":1667626875},{\"maximumRoutes\":2019980715,\"threshold\":154106781,\"idleTimeExpiry\":1515647013},{\"maximumRoutes\":829869098,\"threshold\":494048231,\"idleTimeExpiry\":1468970981}]}}") .toObject(ExternalNetworkPatchPropertiesOptionAProperties.class); - Assertions.assertEquals("lzrsub", model.primaryIpv4Prefix()); - Assertions.assertEquals("rxhjnltcet", model.primaryIpv6Prefix()); - Assertions.assertEquals("vqy", model.secondaryIpv4Prefix()); - Assertions.assertEquals("eqq", model.secondaryIpv6Prefix()); - Assertions.assertEquals(498645411, model.mtu()); - Assertions.assertEquals(2120923366, model.vlanId()); - Assertions.assertEquals(7595116336186420084L, model.peerAsn()); - Assertions.assertEquals(944404959, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2014555125, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qchoadhrsxqv", model.ingressAclId()); - Assertions.assertEquals("spabdsrgfa", model.egressAclId()); + Assertions.assertEquals("z", model.primaryIpv4Prefix()); + Assertions.assertEquals("zelwgvydjufbnkl", model.primaryIpv6Prefix()); + Assertions.assertEquals("axpegjw", model.secondaryIpv4Prefix()); + Assertions.assertEquals("bal", model.secondaryIpv6Prefix()); + Assertions.assertEquals(275006479, model.mtu()); + Assertions.assertEquals(1736041997, model.vlanId()); + Assertions.assertEquals(8572720228086503530L, model.peerASN()); + Assertions.assertEquals(215977873, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1796935585, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("ouvmrsiflik", model.ingressAclId()); + Assertions.assertEquals("pzkgxfxfmyrqsd", model.egressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(1013980460, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(709419451, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1559219930, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1164471478, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(297749552, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1546493785, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExternalNetworkPatchPropertiesOptionAProperties model - = new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("lzrsub") - .withPrimaryIpv6Prefix("rxhjnltcet") - .withSecondaryIpv4Prefix("vqy") - .withSecondaryIpv6Prefix("eqq") - .withMtu(498645411) - .withVlanId(2120923366) - .withPeerAsn(7595116336186420084L) + = new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("z") + .withPrimaryIpv6Prefix("zelwgvydjufbnkl") + .withSecondaryIpv4Prefix("axpegjw") + .withSecondaryIpv6Prefix("bal") + .withMtu(275006479) + .withVlanId(1736041997) + .withPeerASN(8572720228086503530L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(944404959).withMultiplier(2014555125)) - .withIngressAclId("qchoadhrsxqv") - .withEgressAclId("spabdsrgfa"); + new BfdPatchConfiguration().withIntervalInMilliSeconds(215977873).withMultiplier(1796935585)) + .withIngressAclId("ouvmrsiflik") + .withEgressAclId("pzkgxfxfmyrqsd") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1013980460) + .withThreshold(709419451) + .withIdleTimeExpiry(1559219930), + new PrefixLimitPatchProperties().withMaximumRoutes(1409025816) + .withThreshold(1612148349) + .withIdleTimeExpiry(1339527688), + new PrefixLimitPatchProperties().withMaximumRoutes(778791021) + .withThreshold(552788517) + .withIdleTimeExpiry(1517650446)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1164471478) + .withThreshold(297749552) + .withIdleTimeExpiry(1546493785), + new PrefixLimitPatchProperties().withMaximumRoutes(1525234897) + .withThreshold(699915220) + .withIdleTimeExpiry(1667626875), + new PrefixLimitPatchProperties().withMaximumRoutes(2019980715) + .withThreshold(154106781) + .withIdleTimeExpiry(1515647013), + new PrefixLimitPatchProperties().withMaximumRoutes(829869098) + .withThreshold(494048231) + .withIdleTimeExpiry(1468970981)))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchPropertiesOptionAProperties.class); - Assertions.assertEquals("lzrsub", model.primaryIpv4Prefix()); - Assertions.assertEquals("rxhjnltcet", model.primaryIpv6Prefix()); - Assertions.assertEquals("vqy", model.secondaryIpv4Prefix()); - Assertions.assertEquals("eqq", model.secondaryIpv6Prefix()); - Assertions.assertEquals(498645411, model.mtu()); - Assertions.assertEquals(2120923366, model.vlanId()); - Assertions.assertEquals(7595116336186420084L, model.peerAsn()); - Assertions.assertEquals(944404959, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2014555125, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qchoadhrsxqv", model.ingressAclId()); - Assertions.assertEquals("spabdsrgfa", model.egressAclId()); + Assertions.assertEquals("z", model.primaryIpv4Prefix()); + Assertions.assertEquals("zelwgvydjufbnkl", model.primaryIpv6Prefix()); + Assertions.assertEquals("axpegjw", model.secondaryIpv4Prefix()); + Assertions.assertEquals("bal", model.secondaryIpv6Prefix()); + Assertions.assertEquals(275006479, model.mtu()); + Assertions.assertEquals(1736041997, model.vlanId()); + Assertions.assertEquals(8572720228086503530L, model.peerASN()); + Assertions.assertEquals(215977873, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1796935585, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("ouvmrsiflik", model.ingressAclId()); + Assertions.assertEquals("pzkgxfxfmyrqsd", model.egressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(1013980460, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(709419451, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1559219930, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1164471478, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(297749552, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1546493785, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 index dc2eac695a73..d0f7bb2a4bf1 100644 --- 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 @@ -1,18 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchProperties; 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.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,97 +29,165 @@ public final class ExternalNetworkPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPatchProperties model = BinaryData.fromString( - "{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"a\",\"agr\"],\"exportRouteTargets\":[\"icxdwyjfo\",\"xwyovcxjsgbip\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"veksbuhoduchvl\",\"crdpibfdyjduss\",\"yszekbhwlka\",\"ggkrehbf\"],\"importIpv6RouteTargets\":[\"ybff\",\"jfiimreoa\",\"sqtaadusrexxfa\"],\"exportIpv4RouteTargets\":[\"wudohzilfm\",\"l\"],\"exportIpv6RouteTargets\":[\"simsfeypofqpmb\",\"yqgs\"]}},\"optionAProperties\":{\"mtu\":1061646976,\"vlanId\":1091258235,\"fabricASN\":1430521984476420074,\"peerASN\":683674077389317859,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2134838093,\"multiplier\":1525053910},\"ingressAclId\":\"htwzmqilr\",\"egressAclId\":\"ysfn\",\"primaryIpv4Prefix\":\"sqywwwmhkru\",\"primaryIpv6Prefix\":\"edrympmlqo\",\"secondaryIpv4Prefix\":\"hzdue\",\"secondaryIpv6Prefix\":\"hapfjiik\"},\"networkToNetworkInterconnectId\":\"diqfliejhpclbi\",\"importRoutePolicyId\":\"fsbw\",\"exportRoutePolicyId\":\"ivbvzi\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"xgoooxzprad\",\"importIpv6RoutePolicyId\":\"kxknpdg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jsugswhgs\",\"exportIpv6RoutePolicyId\":\"dkwwn\"},\"annotation\":\"foct\"}") + "{\"annotation\":\"khtmhobcyanrfv\",\"networkToNetworkInterconnectId\":\"vkhgv\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"xkf\",\"importIpv6RoutePolicyId\":\"oaqymhcctopuowyr\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"byhquhczygxvha\",\"exportIpv6RoutePolicyId\":\"xecxqnwh\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"mvgxsmpknpwir\",\"ljfewxqo\",\"oxudnmckap\",\"hknqiijge\"],\"exportRouteTargets\":[\"g\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"eqi\",\"kkyo\",\"ltjouwhldxwh\"],\"importIpv6RouteTargets\":[\"roqksmfxm\",\"vprstv\"],\"exportIpv4RouteTargets\":[\"b\",\"jtdyotnplfa\",\"qoccqrqxwetjt\",\"rhutf\"],\"exportIpv6RouteTargets\":[\"dtxopgehpadkmdzg\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"xvctkbbxuh\",\"primaryIpv6Prefix\":\"lsi\",\"secondaryIpv4Prefix\":\"ccla\",\"secondaryIpv6Prefix\":\"oyn\",\"mtu\":758730321,\"vlanId\":2128614563,\"fabricASN\":1635514202294703883,\"peerASN\":806597433050751577,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":2124250014,\"multiplier\":221407560},\"ingressAclId\":\"djanormo\",\"egressAclId\":\"xxurntujmoilunwe\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":293761369,\"threshold\":1849173855,\"idleTimeExpiry\":1849430503},{\"maximumRoutes\":1186020907,\"threshold\":1086051676,\"idleTimeExpiry\":288459010},{\"maximumRoutes\":443414150,\"threshold\":2129572158,\"idleTimeExpiry\":1773401262},{\"maximumRoutes\":423378143,\"threshold\":644167930,\"idleTimeExpiry\":1581599883}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1051552730,\"threshold\":185419039,\"idleTimeExpiry\":1847941605}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":664409207,\"multiplier\":329671268},\"ipv4Routes\":[{\"prefix\":\"qwm\",\"nextHop\":[\"smoxsazuxejgwe\"]}],\"ipv6Routes\":[{\"prefix\":\"nfyszzacz\",\"nextHop\":[\"nqbdnddbboz\",\"yvrmkjm\",\"it\",\"chwudlxee\"]}]}}") .toObject(ExternalNetworkPatchProperties.class); - Assertions.assertEquals("foct", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("a", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("icxdwyjfo", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("veksbuhoduchvl", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("ybff", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("wudohzilfm", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("simsfeypofqpmb", + Assertions.assertEquals("khtmhobcyanrfv", model.annotation()); + Assertions.assertEquals("vkhgv", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("xkf", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("oaqymhcctopuowyr", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("byhquhczygxvha", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xecxqnwh", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("mvgxsmpknpwir", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("g", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("eqi", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("roqksmfxm", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("b", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("dtxopgehpadkmdzg", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("sqywwwmhkru", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("edrympmlqo", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("hzdue", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("hapfjiik", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1061646976, model.optionAProperties().mtu()); - Assertions.assertEquals(1091258235, model.optionAProperties().vlanId()); - Assertions.assertEquals(683674077389317859L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2134838093, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1525053910, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("htwzmqilr", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("ysfn", model.optionAProperties().egressAclId()); - Assertions.assertEquals("diqfliejhpclbi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("fsbw", model.importRoutePolicyId()); - Assertions.assertEquals("ivbvzi", model.exportRoutePolicyId()); - Assertions.assertEquals("xgoooxzprad", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("kxknpdg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jsugswhgs", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("dkwwn", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("xvctkbbxuh", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("lsi", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ccla", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("oyn", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(758730321, model.optionAProperties().mtu()); + Assertions.assertEquals(2128614563, model.optionAProperties().vlanId()); + Assertions.assertEquals(806597433050751577L, model.optionAProperties().peerASN()); + Assertions.assertEquals(2124250014, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(221407560, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("djanormo", model.optionAProperties().ingressAclId()); + Assertions.assertEquals("xxurntujmoilunwe", model.optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(293761369, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1849173855, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1849430503, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1051552730, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(185419039, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1847941605, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(664409207, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(329671268, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("qwm", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("smoxsazuxejgwe", + model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("nfyszzacz", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("nqbdnddbboz", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkPatchProperties model = new ExternalNetworkPatchProperties().withAnnotation("foct") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("a", "agr")) - .withExportRouteTargets(Arrays.asList("icxdwyjfo", "xwyovcxjsgbip")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets( - Arrays.asList("veksbuhoduchvl", "crdpibfdyjduss", "yszekbhwlka", "ggkrehbf")) - .withImportIpv6RouteTargets(Arrays.asList("ybff", "jfiimreoa", "sqtaadusrexxfa")) - .withExportIpv4RouteTargets(Arrays.asList("wudohzilfm", "l")) - .withExportIpv6RouteTargets(Arrays.asList("simsfeypofqpmb", "yqgs")))) - .withOptionAProperties( - new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("sqywwwmhkru") - .withPrimaryIpv6Prefix("edrympmlqo") - .withSecondaryIpv4Prefix("hzdue") - .withSecondaryIpv6Prefix("hapfjiik") - .withMtu(1061646976) - .withVlanId(1091258235) - .withPeerAsn(683674077389317859L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2134838093).withMultiplier(1525053910)) - .withIngressAclId("htwzmqilr") - .withEgressAclId("ysfn")) - .withNetworkToNetworkInterconnectId("diqfliejhpclbi") - .withImportRoutePolicyId("fsbw") - .withExportRoutePolicyId("ivbvzi") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("xgoooxzprad") - .withImportIpv6RoutePolicyId("kxknpdg")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("jsugswhgs").withExportIpv6RoutePolicyId("dkwwn")); + ExternalNetworkPatchProperties model = new ExternalNetworkPatchProperties().withAnnotation("khtmhobcyanrfv") + .withNetworkToNetworkInterconnectId("vkhgv") + .withImportRoutePolicy(new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId("xkf") + .withImportIpv6RoutePolicyId("oaqymhcctopuowyr")) + .withExportRoutePolicy(new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("byhquhczygxvha") + .withExportIpv6RoutePolicyId("xecxqnwh")) + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new L3OptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("mvgxsmpknpwir", "ljfewxqo", "oxudnmckap", "hknqiijge")) + .withExportRouteTargets(Arrays.asList("g")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("eqi", "kkyo", "ltjouwhldxwh")) + .withImportIpv6RouteTargets(Arrays.asList("roqksmfxm", "vprstv")) + .withExportIpv4RouteTargets(Arrays.asList("b", "jtdyotnplfa", "qoccqrqxwetjt", "rhutf")) + .withExportIpv6RouteTargets(Arrays.asList("dtxopgehpadkmdzg")))) + .withOptionAProperties(new ExternalNetworkPatchPropertiesOptionAProperties() + .withPrimaryIpv4Prefix("xvctkbbxuh") + .withPrimaryIpv6Prefix("lsi") + .withSecondaryIpv4Prefix("ccla") + .withSecondaryIpv6Prefix("oyn") + .withMtu(758730321) + .withVlanId(2128614563) + .withPeerASN(806597433050751577L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(2124250014).withMultiplier(221407560)) + .withIngressAclId("djanormo") + .withEgressAclId("xxurntujmoilunwe") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(293761369) + .withThreshold(1849173855) + .withIdleTimeExpiry(1849430503), + new PrefixLimitPatchProperties().withMaximumRoutes(1186020907) + .withThreshold(1086051676) + .withIdleTimeExpiry(288459010), + new PrefixLimitPatchProperties().withMaximumRoutes(443414150) + .withThreshold(2129572158) + .withIdleTimeExpiry(1773401262), + new PrefixLimitPatchProperties().withMaximumRoutes(423378143) + .withThreshold(644167930) + .withIdleTimeExpiry(1581599883)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(1051552730) + .withThreshold(185419039) + .withIdleTimeExpiry(1847941605))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(664409207).withMultiplier(329671268)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("qwm").withNextHop(Arrays.asList("smoxsazuxejgwe")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("nfyszzacz") + .withNextHop(Arrays.asList("nqbdnddbboz", "yvrmkjm", "it", "chwudlxee"))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchProperties.class); - Assertions.assertEquals("foct", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("a", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("icxdwyjfo", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("veksbuhoduchvl", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("ybff", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("wudohzilfm", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("simsfeypofqpmb", + Assertions.assertEquals("khtmhobcyanrfv", model.annotation()); + Assertions.assertEquals("vkhgv", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("xkf", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("oaqymhcctopuowyr", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("byhquhczygxvha", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xecxqnwh", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("mvgxsmpknpwir", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("g", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("eqi", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("roqksmfxm", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("b", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("dtxopgehpadkmdzg", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("sqywwwmhkru", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("edrympmlqo", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("hzdue", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("hapfjiik", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1061646976, model.optionAProperties().mtu()); - Assertions.assertEquals(1091258235, model.optionAProperties().vlanId()); - Assertions.assertEquals(683674077389317859L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2134838093, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1525053910, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("htwzmqilr", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("ysfn", model.optionAProperties().egressAclId()); - Assertions.assertEquals("diqfliejhpclbi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("fsbw", model.importRoutePolicyId()); - Assertions.assertEquals("ivbvzi", model.exportRoutePolicyId()); - Assertions.assertEquals("xgoooxzprad", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("kxknpdg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jsugswhgs", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("dkwwn", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("xvctkbbxuh", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("lsi", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ccla", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("oyn", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(758730321, model.optionAProperties().mtu()); + Assertions.assertEquals(2128614563, model.optionAProperties().vlanId()); + Assertions.assertEquals(806597433050751577L, model.optionAProperties().peerASN()); + Assertions.assertEquals(2124250014, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(221407560, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("djanormo", model.optionAProperties().ingressAclId()); + Assertions.assertEquals("xxurntujmoilunwe", model.optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(293761369, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1849173855, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1849430503, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1051552730, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(185419039, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1847941605, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(664409207, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(329671268, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("qwm", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("smoxsazuxejgwe", + model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("nfyszzacz", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("nqbdnddbboz", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } 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 index db51f66229fe..d596ea1deb5e 100644 --- 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 @@ -1,18 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchProperties; 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.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,100 +30,181 @@ public final class ExternalNetworkPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkPatch model = BinaryData.fromString( - "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"jcirvpefycdvei\",\"itjn\",\"xzajlnsjhwjuyxxb\",\"qvmvuaytuadxkxe\"],\"exportRouteTargets\":[\"pntghyks\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"rnxsluvlzlad\",\"t\",\"kpbqhvfdqqjw\"],\"importIpv6RouteTargets\":[\"wzdanojisgglmvo\",\"atuztjct\",\"bpvbkaehxsmzygd\",\"wakwseivmakxhys\"],\"exportIpv4RouteTargets\":[\"juxlkbectvtfjm\",\"kdch\"],\"exportIpv6RouteTargets\":[\"ubavlzwp\",\"gmfalkzazmgoked\",\"jqafkmkro\"]}},\"optionAProperties\":{\"mtu\":1166672114,\"vlanId\":1260158058,\"fabricASN\":8722355149312613182,\"peerASN\":3410554307267669025,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":543608913,\"multiplier\":1463017039},\"ingressAclId\":\"ixiezeag\",\"egressAclId\":\"eituugedhfpjs\",\"primaryIpv4Prefix\":\"zmblsyjdeol\",\"primaryIpv6Prefix\":\"aebfsyrled\",\"secondaryIpv4Prefix\":\"ustbvtqigdx\",\"secondaryIpv6Prefix\":\"sgeafgfosehx\"},\"networkToNetworkInterconnectId\":\"sxezppkkwaa\",\"importRoutePolicyId\":\"k\",\"exportRoutePolicyId\":\"jlpzeqtoyrp\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"lajmllp\",\"importIpv6RoutePolicyId\":\"evhamfowg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mkekxpkzwaqxo\",\"exportIpv6RoutePolicyId\":\"ovchiqbplvfid\"},\"annotation\":\"ztekxbyjgmsfep\"}}") + "{\"properties\":{\"annotation\":\"saekewnazeajbka\",\"networkToNetworkInterconnectId\":\"cyizy\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vxodkrvfs\",\"importIpv6RoutePolicyId\":\"bydesqlvgec\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"olj\",\"exportIpv6RoutePolicyId\":\"xnmxsdobygoogxqa\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"yjfucsaod\",\"nosdkvi\"],\"exportRouteTargets\":[\"sgm\",\"trnzpducdaaktu\",\"ktz\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"yfpqd\"],\"importIpv6RouteTargets\":[\"ppnwyytfvpctfji\"],\"exportIpv4RouteTargets\":[\"ffgkuhznw\"],\"exportIpv6RouteTargets\":[\"ldbkkejjkjig\",\"wg\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"xjqifhujjsbc\",\"primaryIpv6Prefix\":\"zaahzbhuroolkoli\",\"secondaryIpv4Prefix\":\"hmojusuzg\",\"secondaryIpv6Prefix\":\"zcvaaxoialahfxwc\",\"mtu\":1563332709,\"vlanId\":1098472447,\"fabricASN\":1079475061078816481,\"peerASN\":5987364356927055821,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":116473489,\"multiplier\":393987270},\"ingressAclId\":\"eqshavljqkxyrqol\",\"egressAclId\":\"hbbnkgzuk\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1493461224,\"threshold\":79179303,\"idleTimeExpiry\":350622513},{\"maximumRoutes\":1695763109,\"threshold\":2132241995,\"idleTimeExpiry\":1908249796}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":384446023,\"threshold\":1296821847,\"idleTimeExpiry\":1484462734},{\"maximumRoutes\":861762470,\"threshold\":827241386,\"idleTimeExpiry\":605590005}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":469700202,\"multiplier\":447004080},\"ipv4Routes\":[{\"prefix\":\"uselqkrs\",\"nextHop\":[\"rhxuddqmdt\",\"fisjmrkk\",\"mw\"]},{\"prefix\":\"mdlgy\",\"nextHop\":[\"xokwtjawhvagnqfq\",\"dlcvmyo\",\"caymjchtvsnvlaq\"]}],\"ipv6Routes\":[{\"prefix\":\"yzawatu\",\"nextHop\":[\"kokb\",\"zothym\",\"obllmsnwgwimaan\"]}]}}}") .toObject(ExternalNetworkPatch.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("jcirvpefycdvei", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("pntghyks", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("rnxsluvlzlad", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("wzdanojisgglmvo", - model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("juxlkbectvtfjm", - model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ubavlzwp", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("zmblsyjdeol", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("aebfsyrled", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ustbvtqigdx", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("sgeafgfosehx", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1166672114, model.optionAProperties().mtu()); - Assertions.assertEquals(1260158058, model.optionAProperties().vlanId()); - Assertions.assertEquals(3410554307267669025L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(543608913, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1463017039, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("ixiezeag", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("eituugedhfpjs", model.optionAProperties().egressAclId()); - Assertions.assertEquals("sxezppkkwaa", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("k", model.importRoutePolicyId()); - Assertions.assertEquals("jlpzeqtoyrp", model.exportRoutePolicyId()); - Assertions.assertEquals("lajmllp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("evhamfowg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("mkekxpkzwaqxo", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ovchiqbplvfid", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ztekxbyjgmsfep", model.annotation()); + Assertions.assertEquals("saekewnazeajbka", model.properties().annotation()); + Assertions.assertEquals("cyizy", model.properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("vxodkrvfs", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("bydesqlvgec", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("olj", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xnmxsdobygoogxqa", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.properties().peeringOption()); + Assertions.assertEquals("yjfucsaod", model.properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("sgm", model.properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("yfpqd", + model.properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ppnwyytfvpctfji", + model.properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("ffgkuhznw", + model.properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ldbkkejjkjig", + model.properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("xjqifhujjsbc", model.properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("zaahzbhuroolkoli", model.properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("hmojusuzg", model.properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("zcvaaxoialahfxwc", model.properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1563332709, model.properties().optionAProperties().mtu()); + Assertions.assertEquals(1098472447, model.properties().optionAProperties().vlanId()); + Assertions.assertEquals(5987364356927055821L, model.properties().optionAProperties().peerASN()); + Assertions.assertEquals(116473489, + model.properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(393987270, model.properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("eqshavljqkxyrqol", model.properties().optionAProperties().ingressAclId()); + Assertions.assertEquals("hbbnkgzuk", model.properties().optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + model.properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1493461224, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(79179303, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(350622513, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(384446023, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1296821847, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1484462734, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(469700202, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(447004080, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("uselqkrs", model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rhxuddqmdt", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("yzawatu", model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("kokb", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkPatch model = new ExternalNetworkPatch().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("jcirvpefycdvei", "itjn", "xzajlnsjhwjuyxxb", "qvmvuaytuadxkxe")) - .withExportRouteTargets(Arrays.asList("pntghyks")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("rnxsluvlzlad", "t", "kpbqhvfdqqjw")) - .withImportIpv6RouteTargets( - Arrays.asList("wzdanojisgglmvo", "atuztjct", "bpvbkaehxsmzygd", "wakwseivmakxhys")) - .withExportIpv4RouteTargets(Arrays.asList("juxlkbectvtfjm", "kdch")) - .withExportIpv6RouteTargets(Arrays.asList("ubavlzwp", "gmfalkzazmgoked", "jqafkmkro")))) - .withOptionAProperties( - new ExternalNetworkPatchPropertiesOptionAProperties().withPrimaryIpv4Prefix("zmblsyjdeol") - .withPrimaryIpv6Prefix("aebfsyrled") - .withSecondaryIpv4Prefix("ustbvtqigdx") - .withSecondaryIpv6Prefix("sgeafgfosehx") - .withMtu(1166672114) - .withVlanId(1260158058) - .withPeerAsn(3410554307267669025L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(543608913).withMultiplier(1463017039)) - .withIngressAclId("ixiezeag") - .withEgressAclId("eituugedhfpjs")) - .withNetworkToNetworkInterconnectId("sxezppkkwaa") - .withImportRoutePolicyId("k") - .withExportRoutePolicyId("jlpzeqtoyrp") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("lajmllp").withImportIpv6RoutePolicyId("evhamfowg")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("mkekxpkzwaqxo") - .withExportIpv6RoutePolicyId("ovchiqbplvfid")) - .withAnnotation("ztekxbyjgmsfep"); + ExternalNetworkPatch model = new ExternalNetworkPatch().withProperties(new ExternalNetworkPatchProperties() + .withAnnotation("saekewnazeajbka") + .withNetworkToNetworkInterconnectId("cyizy") + .withImportRoutePolicy(new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId("vxodkrvfs") + .withImportIpv6RoutePolicyId("bydesqlvgec")) + .withExportRoutePolicy(new ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("olj") + .withExportIpv6RoutePolicyId("xnmxsdobygoogxqa")) + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new L3OptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("yjfucsaod", "nosdkvi")) + .withExportRouteTargets(Arrays.asList("sgm", "trnzpducdaaktu", "ktz")) + .withRouteTargets(new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("yfpqd")) + .withImportIpv6RouteTargets(Arrays.asList("ppnwyytfvpctfji")) + .withExportIpv4RouteTargets(Arrays.asList("ffgkuhznw")) + .withExportIpv6RouteTargets(Arrays.asList("ldbkkejjkjig", "wg")))) + .withOptionAProperties(new ExternalNetworkPatchPropertiesOptionAProperties() + .withPrimaryIpv4Prefix("xjqifhujjsbc") + .withPrimaryIpv6Prefix("zaahzbhuroolkoli") + .withSecondaryIpv4Prefix("hmojusuzg") + .withSecondaryIpv6Prefix("zcvaaxoialahfxwc") + .withMtu(1563332709) + .withVlanId(1098472447) + .withPeerASN(5987364356927055821L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(116473489).withMultiplier(393987270)) + .withIngressAclId("eqshavljqkxyrqol") + .withEgressAclId("hbbnkgzuk") + .withBmpConfiguration( + new ExternalNetworkBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1493461224) + .withThreshold(79179303) + .withIdleTimeExpiry(350622513), + new PrefixLimitPatchProperties().withMaximumRoutes(1695763109) + .withThreshold(2132241995) + .withIdleTimeExpiry(1908249796)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(384446023) + .withThreshold(1296821847) + .withIdleTimeExpiry(1484462734), + new PrefixLimitPatchProperties().withMaximumRoutes(861762470) + .withThreshold(827241386) + .withIdleTimeExpiry(605590005))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(469700202).withMultiplier(447004080)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("uselqkrs") + .withNextHop(Arrays.asList("rhxuddqmdt", "fisjmrkk", "mw")), + new StaticRoutePatchProperties().withPrefix("mdlgy") + .withNextHop(Arrays.asList("xokwtjawhvagnqfq", "dlcvmyo", "caymjchtvsnvlaq")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("yzawatu") + .withNextHop(Arrays.asList("kokb", "zothym", "obllmsnwgwimaan")))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPatch.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("jcirvpefycdvei", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("pntghyks", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("rnxsluvlzlad", - model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("wzdanojisgglmvo", - model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("juxlkbectvtfjm", - model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ubavlzwp", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("zmblsyjdeol", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("aebfsyrled", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ustbvtqigdx", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("sgeafgfosehx", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1166672114, model.optionAProperties().mtu()); - Assertions.assertEquals(1260158058, model.optionAProperties().vlanId()); - Assertions.assertEquals(3410554307267669025L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(543608913, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1463017039, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("ixiezeag", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("eituugedhfpjs", model.optionAProperties().egressAclId()); - Assertions.assertEquals("sxezppkkwaa", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("k", model.importRoutePolicyId()); - Assertions.assertEquals("jlpzeqtoyrp", model.exportRoutePolicyId()); - Assertions.assertEquals("lajmllp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("evhamfowg", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("mkekxpkzwaqxo", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ovchiqbplvfid", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ztekxbyjgmsfep", model.annotation()); + Assertions.assertEquals("saekewnazeajbka", model.properties().annotation()); + Assertions.assertEquals("cyizy", model.properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("vxodkrvfs", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("bydesqlvgec", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("olj", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xnmxsdobygoogxqa", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.properties().peeringOption()); + Assertions.assertEquals("yjfucsaod", model.properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("sgm", model.properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("yfpqd", + model.properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ppnwyytfvpctfji", + model.properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("ffgkuhznw", + model.properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("ldbkkejjkjig", + model.properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("xjqifhujjsbc", model.properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("zaahzbhuroolkoli", model.properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("hmojusuzg", model.properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("zcvaaxoialahfxwc", model.properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1563332709, model.properties().optionAProperties().mtu()); + Assertions.assertEquals(1098472447, model.properties().optionAProperties().vlanId()); + Assertions.assertEquals(5987364356927055821L, model.properties().optionAProperties().peerASN()); + Assertions.assertEquals(116473489, + model.properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(393987270, model.properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("eqshavljqkxyrqol", model.properties().optionAProperties().ingressAclId()); + Assertions.assertEquals("hbbnkgzuk", model.properties().optionAProperties().egressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + model.properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1493461224, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(79179303, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(350622513, + model.properties().optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(384446023, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1296821847, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1484462734, + model.properties().optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(469700202, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(447004080, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("uselqkrs", model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("rhxuddqmdt", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("yzawatu", model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("kokb", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } 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 a79f2218ecdf..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkPatchableProperties model = BinaryData.fromString( - "{\"networkToNetworkInterconnectId\":\"vnyttzgi\",\"importRoutePolicyId\":\"yri\",\"exportRoutePolicyId\":\"gm\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hlqtxnrflkn\",\"importIpv6RoutePolicyId\":\"ndpgfjodhda\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"wfhipxwgsab\",\"exportIpv6RoutePolicyId\":\"ipowza\"}}") - .toObject(ExternalNetworkPatchableProperties.class); - Assertions.assertEquals("vnyttzgi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("yri", model.importRoutePolicyId()); - Assertions.assertEquals("gm", model.exportRoutePolicyId()); - Assertions.assertEquals("hlqtxnrflkn", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ndpgfjodhda", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wfhipxwgsab", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ipowza", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkPatchableProperties model - = new ExternalNetworkPatchableProperties().withNetworkToNetworkInterconnectId("vnyttzgi") - .withImportRoutePolicyId("yri") - .withExportRoutePolicyId("gm") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("hlqtxnrflkn") - .withImportIpv6RoutePolicyId("ndpgfjodhda")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("wfhipxwgsab") - .withExportIpv6RoutePolicyId("ipowza")); - model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchableProperties.class); - Assertions.assertEquals("vnyttzgi", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("yri", model.importRoutePolicyId()); - Assertions.assertEquals("gm", model.exportRoutePolicyId()); - Assertions.assertEquals("hlqtxnrflkn", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ndpgfjodhda", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wfhipxwgsab", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ipowza", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - } -} 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 index 1202bef4fa2a..c41a59df0e53 100644 --- 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 @@ -1,58 +1,105 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import java.util.Arrays; 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\":1690809197,\"vlanId\":1533047162,\"fabricASN\":4871207412853091463,\"peerASN\":1534475859485377043,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1116641423,\"multiplier\":1558701655},\"ingressAclId\":\"mzqmzjqrb\",\"egressAclId\":\"vnmdyfoeboj\",\"primaryIpv4Prefix\":\"pp\",\"primaryIpv6Prefix\":\"aohoqkpjtnq\",\"secondaryIpv4Prefix\":\"l\",\"secondaryIpv6Prefix\":\"wkdcwmqs\"}") + "{\"primaryIpv4Prefix\":\"zznnuif\",\"primaryIpv6Prefix\":\"sejegprkjgu\",\"secondaryIpv4Prefix\":\"jmwvvbtuqkxxi\",\"secondaryIpv6Prefix\":\"gxql\",\"mtu\":65611061,\"vlanId\":1379382104,\"fabricASN\":2456300363656013175,\"peerASN\":8010544299749104146,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1474020309,\"multiplier\":94606470},\"ingressAclId\":\"wvjaq\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"nvskpaj\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1537163420,\"threshold\":400993871,\"idleTimeExpiry\":1361345524},{\"maximumRoutes\":401303949,\"threshold\":997716401,\"idleTimeExpiry\":1703770909},{\"maximumRoutes\":803944766,\"threshold\":145601665,\"idleTimeExpiry\":573494384},{\"maximumRoutes\":1538992357,\"threshold\":2048189657,\"idleTimeExpiry\":589616279}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":933684374,\"threshold\":775523901,\"idleTimeExpiry\":2123818408}]}}") .toObject(ExternalNetworkPropertiesOptionAProperties.class); - Assertions.assertEquals("pp", model.primaryIpv4Prefix()); - Assertions.assertEquals("aohoqkpjtnq", model.primaryIpv6Prefix()); - Assertions.assertEquals("l", model.secondaryIpv4Prefix()); - Assertions.assertEquals("wkdcwmqs", model.secondaryIpv6Prefix()); - Assertions.assertEquals(1690809197, model.mtu()); - Assertions.assertEquals(1533047162, model.vlanId()); - Assertions.assertEquals(1534475859485377043L, model.peerAsn()); - Assertions.assertEquals(1116641423, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1558701655, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("mzqmzjqrb", model.ingressAclId()); - Assertions.assertEquals("vnmdyfoeboj", model.egressAclId()); + Assertions.assertEquals("zznnuif", model.primaryIpv4Prefix()); + Assertions.assertEquals("sejegprkjgu", model.primaryIpv6Prefix()); + Assertions.assertEquals("jmwvvbtuqkxxi", model.secondaryIpv4Prefix()); + Assertions.assertEquals("gxql", model.secondaryIpv6Prefix()); + Assertions.assertEquals(65611061, model.mtu()); + Assertions.assertEquals(1379382104, model.vlanId()); + Assertions.assertEquals(8010544299749104146L, model.peerASN()); + Assertions.assertEquals(1474020309, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(94606470, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("wvjaq", model.ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals("nvskpaj", model.egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(1537163420, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(400993871, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1361345524, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(933684374, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(775523901, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2123818408, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExternalNetworkPropertiesOptionAProperties model - = new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("pp") - .withPrimaryIpv6Prefix("aohoqkpjtnq") - .withSecondaryIpv4Prefix("l") - .withSecondaryIpv6Prefix("wkdcwmqs") - .withMtu(1690809197) - .withVlanId(1533047162) - .withPeerAsn(1534475859485377043L) + = new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("zznnuif") + .withPrimaryIpv6Prefix("sejegprkjgu") + .withSecondaryIpv4Prefix("jmwvvbtuqkxxi") + .withSecondaryIpv6Prefix("gxql") + .withMtu(65611061) + .withVlanId(1379382104) + .withPeerASN(8010544299749104146L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1116641423).withMultiplier(1558701655)) - .withIngressAclId("mzqmzjqrb") - .withEgressAclId("vnmdyfoeboj"); + new BfdConfiguration().withIntervalInMilliSeconds(1474020309).withMultiplier(94606470)) + .withIngressAclId("wvjaq") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId("nvskpaj") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1537163420) + .withThreshold(400993871) + .withIdleTimeExpiry(1361345524), + new PrefixLimitProperties().withMaximumRoutes(401303949) + .withThreshold(997716401) + .withIdleTimeExpiry(1703770909), + new PrefixLimitProperties().withMaximumRoutes(803944766) + .withThreshold(145601665) + .withIdleTimeExpiry(573494384), + new PrefixLimitProperties().withMaximumRoutes(1538992357) + .withThreshold(2048189657) + .withIdleTimeExpiry(589616279)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(933684374) + .withThreshold(775523901) + .withIdleTimeExpiry(2123818408)))); model = BinaryData.fromObject(model).toObject(ExternalNetworkPropertiesOptionAProperties.class); - Assertions.assertEquals("pp", model.primaryIpv4Prefix()); - Assertions.assertEquals("aohoqkpjtnq", model.primaryIpv6Prefix()); - Assertions.assertEquals("l", model.secondaryIpv4Prefix()); - Assertions.assertEquals("wkdcwmqs", model.secondaryIpv6Prefix()); - Assertions.assertEquals(1690809197, model.mtu()); - Assertions.assertEquals(1533047162, model.vlanId()); - Assertions.assertEquals(1534475859485377043L, model.peerAsn()); - Assertions.assertEquals(1116641423, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1558701655, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("mzqmzjqrb", model.ingressAclId()); - Assertions.assertEquals("vnmdyfoeboj", model.egressAclId()); + Assertions.assertEquals("zznnuif", model.primaryIpv4Prefix()); + Assertions.assertEquals("sejegprkjgu", model.primaryIpv6Prefix()); + Assertions.assertEquals("jmwvvbtuqkxxi", model.secondaryIpv4Prefix()); + Assertions.assertEquals("gxql", model.secondaryIpv6Prefix()); + Assertions.assertEquals(65611061, model.mtu()); + Assertions.assertEquals(1379382104, model.vlanId()); + Assertions.assertEquals(8010544299749104146L, model.peerASN()); + Assertions.assertEquals(1474020309, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(94606470, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("wvjaq", model.ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals("nvskpaj", model.egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, model.v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.v6OverV4BgpSession()); + Assertions.assertEquals(1537163420, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(400993871, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1361345524, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(933684374, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(775523901, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2123818408, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 index 11512f7c6322..2d533339d641 100644 --- 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 @@ -1,18 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,98 +29,157 @@ public final class ExternalNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalNetworkProperties model = BinaryData.fromString( - "{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"yzbfvxovqkx\",\"uxqggvqrnhyhl\",\"cjsqggjhffbxr\",\"rkijpeuqlsdxeqz\"],\"exportRouteTargets\":[\"wmwwmjswen\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"me\",\"leqioulndh\"],\"importIpv6RouteTargets\":[\"eojhtollhsvi\",\"mytzln\"],\"exportIpv4RouteTargets\":[\"pnovyoanfbcs\"],\"exportIpv6RouteTargets\":[\"gywvtxig\"]}},\"optionAProperties\":{\"mtu\":1582673883,\"vlanId\":1788188155,\"fabricASN\":3343774067436674244,\"peerASN\":2937989151061187405,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2082895999,\"multiplier\":49091821},\"ingressAclId\":\"qnucs\",\"egressAclId\":\"hsidsjtdlpbnin\",\"primaryIpv4Prefix\":\"azlsvbzfcpuo\",\"primaryIpv6Prefix\":\"dwjcciklhs\",\"secondaryIpv4Prefix\":\"krdre\",\"secondaryIpv6Prefix\":\"olr\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"vdlhydwbdbfgr\",\"importRoutePolicyId\":\"unytjlkesm\",\"exportRoutePolicyId\":\"athu\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"h\",\"importIpv6RoutePolicyId\":\"an\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"llbvgwzsfftedous\",\"exportIpv6RoutePolicyId\":\"tjtgravaqogfkb\"},\"annotation\":\"auzlqbtxxw\"}") + "{\"annotation\":\"ivmuqkevzgjyp\",\"networkToNetworkInterconnectId\":\"hxmpdxxz\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"wzjwotnxlkfhg\",\"importIpv6RoutePolicyId\":\"rfo\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ecrsnh\",\"exportIpv6RoutePolicyId\":\"selqxov\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"ukklvzrlr\"],\"exportRouteTargets\":[\"cme\",\"jsczivfqbqnasdsy\",\"nzsieuscplh\",\"vdgxly\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"tdsh\",\"zsvko\",\"rupjovmozsayebra\",\"wzlpzbtz\"],\"importIpv6RouteTargets\":[\"ykipfsdyepf\",\"ocmbezacf\",\"ztgaz\",\"yqejga\"],\"exportIpv4RouteTargets\":[\"ctgkppgkqzkcyzmf\",\"ngdyfcixrhlcq\"],\"exportIpv6RouteTargets\":[\"ejgoiutgwrmka\",\"p\",\"hazyntacihnco\",\"mip\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"iqm\",\"primaryIpv6Prefix\":\"bhikeaqgr\",\"secondaryIpv4Prefix\":\"pomxpu\",\"secondaryIpv6Prefix\":\"tsdfjyieso\",\"mtu\":1530439656,\"vlanId\":469282492,\"fabricASN\":7450378520051659797,\"peerASN\":3943632549314904140,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":626287922,\"multiplier\":1310159626},\"ingressAclId\":\"f\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"wwzvdaj\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":749238965,\"threshold\":615886837,\"idleTimeExpiry\":2052027738}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1046584232,\"threshold\":1986709347,\"idleTimeExpiry\":191025372}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":157640432,\"multiplier\":1869847736},\"ipv4Routes\":[{\"prefix\":\"dop\",\"nextHop\":[\"ttbas\"]}],\"ipv6Routes\":[{\"prefix\":\"ap\",\"nextHop\":[\"n\",\"bea\",\"bkixvvlwyn\"]},{\"prefix\":\"bb\",\"nextHop\":[\"vzfjm\",\"pu\"]}]},\"lastOperation\":{\"details\":\"e\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"}") .toObject(ExternalNetworkProperties.class); - Assertions.assertEquals("auzlqbtxxw", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("yzbfvxovqkx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("wmwwmjswen", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("me", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("eojhtollhsvi", + Assertions.assertEquals("ivmuqkevzgjyp", model.annotation()); + Assertions.assertEquals("hxmpdxxz", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("wzjwotnxlkfhg", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("rfo", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ecrsnh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("selqxov", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("ukklvzrlr", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("cme", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("tdsh", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ykipfsdyepf", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("pnovyoanfbcs", + Assertions.assertEquals("ctgkppgkqzkcyzmf", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("gywvtxig", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("azlsvbzfcpuo", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwjcciklhs", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("krdre", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("olr", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1582673883, model.optionAProperties().mtu()); - Assertions.assertEquals(1788188155, model.optionAProperties().vlanId()); - Assertions.assertEquals(2937989151061187405L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2082895999, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(49091821, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("qnucs", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("hsidsjtdlpbnin", model.optionAProperties().egressAclId()); - Assertions.assertEquals("vdlhydwbdbfgr", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("unytjlkesm", model.importRoutePolicyId()); - Assertions.assertEquals("athu", model.exportRoutePolicyId()); - Assertions.assertEquals("h", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("an", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("llbvgwzsfftedous", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("tjtgravaqogfkb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ejgoiutgwrmka", + model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("iqm", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("bhikeaqgr", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("pomxpu", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("tsdfjyieso", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1530439656, model.optionAProperties().mtu()); + Assertions.assertEquals(469282492, model.optionAProperties().vlanId()); + Assertions.assertEquals(3943632549314904140L, model.optionAProperties().peerASN()); + Assertions.assertEquals(626287922, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1310159626, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("f", model.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("wwzvdaj", model.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(749238965, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(615886837, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2052027738, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1046584232, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1986709347, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(191025372, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(157640432, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1869847736, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dop", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ttbas", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ap", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("n", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExternalNetworkProperties model = new ExternalNetworkProperties().withAnnotation("auzlqbtxxw") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets( - Arrays.asList("yzbfvxovqkx", "uxqggvqrnhyhl", "cjsqggjhffbxr", "rkijpeuqlsdxeqz")) - .withExportRouteTargets(Arrays.asList("wmwwmjswen")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("me", "leqioulndh")) - .withImportIpv6RouteTargets(Arrays.asList("eojhtollhsvi", "mytzln")) - .withExportIpv4RouteTargets(Arrays.asList("pnovyoanfbcs")) - .withExportIpv6RouteTargets(Arrays.asList("gywvtxig")))) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("azlsvbzfcpuo") - .withPrimaryIpv6Prefix("dwjcciklhs") - .withSecondaryIpv4Prefix("krdre") - .withSecondaryIpv6Prefix("olr") - .withMtu(1582673883) - .withVlanId(1788188155) - .withPeerAsn(2937989151061187405L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2082895999).withMultiplier(49091821)) - .withIngressAclId("qnucs") - .withEgressAclId("hsidsjtdlpbnin")) - .withNetworkToNetworkInterconnectId("vdlhydwbdbfgr") - .withImportRoutePolicyId("unytjlkesm") - .withExportRoutePolicyId("athu") + ExternalNetworkProperties model = new ExternalNetworkProperties().withAnnotation("ivmuqkevzgjyp") + .withNetworkToNetworkInterconnectId("hxmpdxxz") .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("h").withImportIpv6RoutePolicyId("an")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("llbvgwzsfftedous") - .withExportIpv6RoutePolicyId("tjtgravaqogfkb")); + new ImportRoutePolicy().withImportIpv4RoutePolicyId("wzjwotnxlkfhg").withImportIpv6RoutePolicyId("rfo")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("ecrsnh").withExportIpv6RoutePolicyId("selqxov")) + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("ukklvzrlr")) + .withExportRouteTargets(Arrays.asList("cme", "jsczivfqbqnasdsy", "nzsieuscplh", "vdgxly")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("tdsh", "zsvko", "rupjovmozsayebra", "wzlpzbtz")) + .withImportIpv6RouteTargets(Arrays.asList("ykipfsdyepf", "ocmbezacf", "ztgaz", "yqejga")) + .withExportIpv4RouteTargets(Arrays.asList("ctgkppgkqzkcyzmf", "ngdyfcixrhlcq")) + .withExportIpv6RouteTargets(Arrays.asList("ejgoiutgwrmka", "p", "hazyntacihnco", "mip")))) + .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("iqm") + .withPrimaryIpv6Prefix("bhikeaqgr") + .withSecondaryIpv4Prefix("pomxpu") + .withSecondaryIpv6Prefix("tsdfjyieso") + .withMtu(1530439656) + .withVlanId(469282492) + .withPeerASN(3943632549314904140L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(626287922).withMultiplier(1310159626)) + .withIngressAclId("f") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId("wwzvdaj") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(749238965) + .withThreshold(615886837) + .withIdleTimeExpiry(2052027738)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(1046584232) + .withThreshold(1986709347) + .withIdleTimeExpiry(191025372))))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(157640432).withMultiplier(1869847736)) + .withIpv4Routes( + Arrays.asList(new StaticRouteProperties().withPrefix("dop").withNextHop(Arrays.asList("ttbas")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("ap").withNextHop(Arrays.asList("n", "bea", "bkixvvlwyn")), + new StaticRouteProperties().withPrefix("bb").withNextHop(Arrays.asList("vzfjm", "pu"))))); model = BinaryData.fromObject(model).toObject(ExternalNetworkProperties.class); - Assertions.assertEquals("auzlqbtxxw", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("yzbfvxovqkx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("wmwwmjswen", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("me", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("eojhtollhsvi", + Assertions.assertEquals("ivmuqkevzgjyp", model.annotation()); + Assertions.assertEquals("hxmpdxxz", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("wzjwotnxlkfhg", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("rfo", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ecrsnh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("selqxov", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("ukklvzrlr", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("cme", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("tdsh", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ykipfsdyepf", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("pnovyoanfbcs", + Assertions.assertEquals("ctgkppgkqzkcyzmf", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("gywvtxig", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("azlsvbzfcpuo", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwjcciklhs", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("krdre", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("olr", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1582673883, model.optionAProperties().mtu()); - Assertions.assertEquals(1788188155, model.optionAProperties().vlanId()); - Assertions.assertEquals(2937989151061187405L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2082895999, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(49091821, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("qnucs", model.optionAProperties().ingressAclId()); - Assertions.assertEquals("hsidsjtdlpbnin", model.optionAProperties().egressAclId()); - Assertions.assertEquals("vdlhydwbdbfgr", model.networkToNetworkInterconnectId()); - Assertions.assertEquals("unytjlkesm", model.importRoutePolicyId()); - Assertions.assertEquals("athu", model.exportRoutePolicyId()); - Assertions.assertEquals("h", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("an", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("llbvgwzsfftedous", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("tjtgravaqogfkb", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ejgoiutgwrmka", + model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("iqm", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("bhikeaqgr", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("pomxpu", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("tsdfjyieso", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1530439656, model.optionAProperties().mtu()); + Assertions.assertEquals(469282492, model.optionAProperties().vlanId()); + Assertions.assertEquals(3943632549314904140L, model.optionAProperties().peerASN()); + Assertions.assertEquals(626287922, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1310159626, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("f", model.optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("wwzvdaj", model.optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(749238965, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(615886837, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2052027738, + model.optionAProperties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1046584232, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1986709347, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(191025372, + model.optionAProperties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(157640432, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1869847736, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dop", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ttbas", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ap", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("n", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java new file mode 100644 index 000000000000..1568b2bc7073 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRouteConfigurationTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ExternalNetworkStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkStaticRouteConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkStaticRouteConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":921273349,\"multiplier\":378093508},\"ipv4Routes\":[{\"prefix\":\"hlf\",\"nextHop\":[\"muifmuadjnfsn\",\"skiioshjgczetybn\"]},{\"prefix\":\"gztlcgc\",\"nextHop\":[\"chfjvmywjzebe\"]},{\"prefix\":\"uvlbefvwc\",\"nextHop\":[\"kxpylrwox\",\"gwpsyxjijeypd\",\"rbkerdkd\",\"gaw\"]},{\"prefix\":\"wjxildfkcefeyg\",\"nextHop\":[\"pjois\"]}],\"ipv6Routes\":[{\"prefix\":\"aybdjnxumentqon\",\"nextHop\":[\"hymxymulwivqtow\"]},{\"prefix\":\"h\",\"nextHop\":[\"ycoybajasqubf\",\"j\",\"ywhjqwmchq\",\"htfxcpupuki\"]},{\"prefix\":\"mjzpwdlvwtiwsm\",\"nextHop\":[\"aonhqnamppul\"]}]}") + .toObject(ExternalNetworkStaticRouteConfiguration.class); + Assertions.assertEquals(921273349, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(378093508, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("hlf", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("muifmuadjnfsn", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("aybdjnxumentqon", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hymxymulwivqtow", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkStaticRouteConfiguration model = new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(921273349).withMultiplier(378093508)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("hlf") + .withNextHop(Arrays.asList("muifmuadjnfsn", "skiioshjgczetybn")), + new StaticRouteProperties().withPrefix("gztlcgc").withNextHop(Arrays.asList("chfjvmywjzebe")), + new StaticRouteProperties().withPrefix("uvlbefvwc") + .withNextHop(Arrays.asList("kxpylrwox", "gwpsyxjijeypd", "rbkerdkd", "gaw")), + new StaticRouteProperties().withPrefix("wjxildfkcefeyg").withNextHop(Arrays.asList("pjois")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("aybdjnxumentqon").withNextHop(Arrays.asList("hymxymulwivqtow")), + new StaticRouteProperties().withPrefix("h") + .withNextHop(Arrays.asList("ycoybajasqubf", "j", "ywhjqwmchq", "htfxcpupuki")), + new StaticRouteProperties().withPrefix("mjzpwdlvwtiwsm").withNextHop(Arrays.asList("aonhqnamppul")))); + model = BinaryData.fromObject(model).toObject(ExternalNetworkStaticRouteConfiguration.class); + Assertions.assertEquals(921273349, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(378093508, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("hlf", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("muifmuadjnfsn", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("aybdjnxumentqon", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hymxymulwivqtow", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..eaac44d81686 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkStaticRoutePatchConfigurationTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ExternalNetworkStaticRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalNetworkStaticRoutePatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":615389844,\"multiplier\":1837525903},\"ipv4Routes\":[{\"prefix\":\"xxheigmlilwzghjh\",\"nextHop\":[\"m\",\"bzzbwayb\",\"mdafbgymqt\",\"apr\"]},{\"prefix\":\"ojxrjnbsconxavi\",\"nextHop\":[\"eychbji\",\"qf\",\"gnwdxz\"]},{\"prefix\":\"dpq\",\"nextHop\":[\"fb\"]},{\"prefix\":\"rxipmlnfyzav\",\"nextHop\":[\"bypicdbkpdj\",\"aq\"]}],\"ipv6Routes\":[{\"prefix\":\"q\",\"nextHop\":[\"pdgonjhxs\",\"thmgpczqulp\",\"kbvcpxtzhigqqbti\",\"pkjblornsih\"]},{\"prefix\":\"hudsmusuaa\",\"nextHop\":[\"akx\"]},{\"prefix\":\"jnfczmnniixy\",\"nextHop\":[\"qban\",\"sjtgirnbgmgmddo\"]}]}") + .toObject(ExternalNetworkStaticRoutePatchConfiguration.class); + Assertions.assertEquals(615389844, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1837525903, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("xxheigmlilwzghjh", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("m", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("q", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pdgonjhxs", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalNetworkStaticRoutePatchConfiguration model = new ExternalNetworkStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(615389844).withMultiplier(1837525903)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("xxheigmlilwzghjh") + .withNextHop(Arrays.asList("m", "bzzbwayb", "mdafbgymqt", "apr")), + new StaticRoutePatchProperties().withPrefix("ojxrjnbsconxavi") + .withNextHop(Arrays.asList("eychbji", "qf", "gnwdxz")), + new StaticRoutePatchProperties().withPrefix("dpq").withNextHop(Arrays.asList("fb")), + new StaticRoutePatchProperties().withPrefix("rxipmlnfyzav") + .withNextHop(Arrays.asList("bypicdbkpdj", "aq")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("q") + .withNextHop(Arrays.asList("pdgonjhxs", "thmgpczqulp", "kbvcpxtzhigqqbti", "pkjblornsih")), + new StaticRoutePatchProperties().withPrefix("hudsmusuaa").withNextHop(Arrays.asList("akx")), + new StaticRoutePatchProperties().withPrefix("jnfczmnniixy") + .withNextHop(Arrays.asList("qban", "sjtgirnbgmgmddo")))); + model = BinaryData.fromObject(model).toObject(ExternalNetworkStaticRoutePatchConfiguration.class); + Assertions.assertEquals(615389844, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1837525903, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("xxheigmlilwzghjh", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("m", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("q", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pdgonjhxs", model.ipv6Routes().get(0).nextHop().get(0)); + } +} 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 index 10e42a8b2696..f0f80a6e7269 100644 --- 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 @@ -1,23 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -29,74 +39,110 @@ public final class ExternalNetworksCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"b\"],\"exportRouteTargets\":[\"kdium\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"xwkscw\",\"shfihvlmsc\",\"ylaulpuex\",\"igxztyecxdslsp\"],\"importIpv6RouteTargets\":[\"d\",\"fyhsb\"],\"exportIpv4RouteTargets\":[\"lvsvsylt\",\"prqtfk\"],\"exportIpv6RouteTargets\":[\"rk\",\"monxdwfcuhbgftf\",\"qukkmvzeneg\",\"dqrjylwqqsemjhh\"]}},\"optionAProperties\":{\"mtu\":1599997113,\"vlanId\":896629323,\"fabricASN\":5038093681676520074,\"peerASN\":9185497905507567277,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":977899252,\"multiplier\":1091646992},\"ingressAclId\":\"pfzwufifnj\",\"egressAclId\":\"hmjkykqf\",\"primaryIpv4Prefix\":\"mcyk\",\"primaryIpv6Prefix\":\"ysmkbndnrihpja\",\"secondaryIpv4Prefix\":\"cbeejnoignydlkr\",\"secondaryIpv6Prefix\":\"sbnmrmhkipjardvd\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"a\",\"importRoutePolicyId\":\"npbie\",\"exportRoutePolicyId\":\"unddvjlpbjszqj\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"jvaycxrwknsb\",\"importIpv6RoutePolicyId\":\"ypbrzwi\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"cyhkecebtpgvut\",\"exportIpv6RoutePolicyId\":\"usfdywqrq\"},\"annotation\":\"wkendgr\"},\"id\":\"ff\",\"name\":\"xqqnugt\",\"type\":\"uyuwgnyj\"}"; + = "{\"properties\":{\"annotation\":\"sypo\",\"networkToNetworkInterconnectId\":\"fxzobovsvhbtdgxg\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"deoubv\",\"importIpv6RoutePolicyId\":\"iswemncjhmvvze\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mvbsjtfqwl\",\"exportIpv6RoutePolicyId\":\"qczzscgrop\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"cgkociyikqlyoorm\"],\"exportRouteTargets\":[\"glq\",\"jyk\",\"kyhxu\",\"nbcpiadjslvxs\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"wbib\",\"viacghygm\",\"bivpz\"],\"importIpv6RouteTargets\":[\"wff\"],\"exportIpv4RouteTargets\":[\"xqyj\",\"sr\",\"pyo\",\"ewvlkzmsyezxifj\"],\"exportIpv6RouteTargets\":[\"uovfotwvkuhtdx\",\"codzdhe\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"cvmx\",\"primaryIpv6Prefix\":\"ndifu\",\"secondaryIpv4Prefix\":\"tkkccrusrz\",\"secondaryIpv6Prefix\":\"oqodya\",\"mtu\":324977433,\"vlanId\":1744928768,\"fabricASN\":2250972904064550706,\"peerASN\":8878300269976780830,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":853139796,\"multiplier\":1948629941},\"ingressAclId\":\"tilbx\",\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"egressAclId\":\"tudfhpelzavohvdb\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1168292556,\"multiplier\":827590149},\"ipv4Routes\":[{\"prefix\":\"kcjcglvob\",\"nextHop\":[\"i\"]},{\"prefix\":\"exrbalvkfdqilprq\",\"nextHop\":[\"f\",\"kqpdyrqlazf\",\"ltckbjvd\",\"hyfvqtdexfdzpx\"]},{\"prefix\":\"lkqlvbkzaiyrnww\",\"nextHop\":[\"viniyoizuwwzc\",\"igbjbelnqalbso\",\"xajsiueai\",\"qjb\"]}],\"ipv6Routes\":[{\"prefix\":\"w\",\"nextHop\":[\"ypcuri\"]},{\"prefix\":\"llxtclv\",\"nextHop\":[\"dqtzs\",\"wlwjxrymiys\"]},{\"prefix\":\"hhcmqdlkkwbdekbv\",\"nextHop\":[\"lmk\",\"adnxbs\"]},{\"prefix\":\"atpialrqhwcxxccf\",\"nextHop\":[\"v\"]}]},\"lastOperation\":{\"details\":\"iyvrexitpz\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"ujywwumbusnaw\",\"name\":\"ncljkh\",\"type\":\"sobuahok\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExternalNetwork response = manager.externalNetworks() - .define("fnatntmcaxbqpm") - .withExistingL3IsolationDomain("y", "yhutwedigivktecc") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new L3OptionBProperties().withImportRouteTargets(Arrays.asList("qcnb")) - .withExportRouteTargets(Arrays.asList("tghnmelzvrchm")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("rmwy", "h", "iyplgqqqgrbrhh")) - .withImportIpv6RouteTargets(Arrays.asList("gtip", "aoylwhfm", "bweasgypjixd")) - .withExportIpv4RouteTargets(Arrays.asList("ad", "d", "qeuwdvclsxdqdch", "zibixrgsrwxxqkwa")) - .withExportIpv6RouteTargets(Arrays.asList("b", "dgosijiqexqw")))) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("cocdxvbeqzjd") - .withPrimaryIpv6Prefix("tutpdwnee") - .withSecondaryIpv4Prefix("ytlxugjr") - .withSecondaryIpv6Prefix("nffaofkvfruxzkfb") - .withMtu(376721612) - .withVlanId(1278621206) - .withPeerAsn(3208270147193306727L) + .define("ueweivaje") + .withExistingL3IsolationDomain("zmehcdfdxthqnz", "ukirdedijdhzkw") + .withProperties(new ExternalNetworkProperties().withAnnotation("wlxdknxctglzbcxd") + .withNetworkToNetworkInterconnectId("gwigyiwb") + .withImportRoutePolicy( + new ImportRoutePolicy().withImportIpv4RoutePolicyId("dxzfvna").withImportIpv6RoutePolicyId("ffch")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("yevj").withExportIpv6RoutePolicyId("tseaox")) + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties( + new L3OptionBProperties().withImportRouteTargets(Arrays.asList("lfmabpyzxcplphf")) + .withExportRouteTargets(Arrays.asList("urtkcepyvaxwzb", "xxsdisxsrrhr", "rbbedrn")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("uimpiybm", "btihc", "xmfbik", "uvqqo")) + .withImportIpv6RouteTargets(Arrays.asList("qtwnqtjcemiasic", "hxqnlmjvpm", "dfibw", "hwou")) + .withExportIpv4RouteTargets(Arrays.asList("rmkkzjsnxzljx", "ayxpdzvgyujkxjg")) + .withExportIpv6RouteTargets(Arrays.asList("dbigi", "ramudyrsirnbp", "ddvbxqxolixfelsr")))) + .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties().withPrimaryIpv4Prefix("vtzy") + .withPrimaryIpv6Prefix("tbayh") + .withSecondaryIpv4Prefix("njalkiyzlkqyezyz") + .withSecondaryIpv6Prefix("rdfdssofuxystltk") + .withMtu(1381783382) + .withVlanId(603231477) + .withPeerASN(6003302965311521393L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(850094035).withMultiplier(1851940928)) - .withIngressAclId("kvthwtamvmb") - .withEgressAclId("vxhfmuhkezuuc")) - .withNetworkToNetworkInterconnectId("stvymdqaymqmyrnz") - .withImportRoutePolicyId("bqkfnoxhvo") - .withExportRoutePolicyId("dgfkrqsjrvpakxr") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("xwejuguvnx") - .withImportIpv6RoutePolicyId("hpzurnzoytkbead")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("nrozo") - .withExportIpv6RoutePolicyId("oxcbpkiwseac")) - .withAnnotation("axdrpanhsxw") + new BfdConfiguration().withIntervalInMilliSeconds(342242083).withMultiplier(1076795202)) + .withIngressAclId("oq") + .withBmpConfiguration( + new ExternalNetworkBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withEgressAclId("iydoqbruxlx") + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties()))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties(), new PrefixLimitProperties(), + new PrefixLimitProperties(), new PrefixLimitProperties())))) + .withStaticRouteConfiguration(new ExternalNetworkStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1494078278).withMultiplier(1030076642)) + .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("ixpkr") + .withNextHop(Arrays.asList("zn", "cmkwcyeljni", "dgzxbwn", "yihct")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("mzozb") + .withNextHop(Arrays.asList("tvughutiqlmv", "fyfyftkvzbdljyk")), + new StaticRouteProperties().withPrefix("umagfyinmajjz").withNextHop(Arrays.asList("gtwfk")))))) .create(); - Assertions.assertEquals(PeeringOption.OPTIONB, response.peeringOption()); - Assertions.assertEquals("b", response.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("kdium", response.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("xwkscw", response.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("d", response.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lvsvsylt", - response.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("rk", response.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("mcyk", response.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("ysmkbndnrihpja", response.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("cbeejnoignydlkr", response.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("sbnmrmhkipjardvd", response.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1599997113, response.optionAProperties().mtu()); - Assertions.assertEquals(896629323, response.optionAProperties().vlanId()); - Assertions.assertEquals(9185497905507567277L, response.optionAProperties().peerAsn()); - Assertions.assertEquals(977899252, response.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1091646992, response.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("pfzwufifnj", response.optionAProperties().ingressAclId()); - Assertions.assertEquals("hmjkykqf", response.optionAProperties().egressAclId()); - Assertions.assertEquals("a", response.networkToNetworkInterconnectId()); - Assertions.assertEquals("npbie", response.importRoutePolicyId()); - Assertions.assertEquals("unddvjlpbjszqj", response.exportRoutePolicyId()); - Assertions.assertEquals("jvaycxrwknsb", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ypbrzwi", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("cyhkecebtpgvut", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("usfdywqrq", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("wkendgr", response.annotation()); + Assertions.assertEquals("sypo", response.properties().annotation()); + Assertions.assertEquals("fxzobovsvhbtdgxg", response.properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("deoubv", response.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("iswemncjhmvvze", response.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("mvbsjtfqwl", response.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qczzscgrop", response.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, response.properties().peeringOption()); + Assertions.assertEquals("cgkociyikqlyoorm", + response.properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("glq", response.properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("wbib", + response.properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("wff", + response.properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("xqyj", + response.properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("uovfotwvkuhtdx", + response.properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("cvmx", response.properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("ndifu", response.properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("tkkccrusrz", response.properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("oqodya", response.properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(324977433, response.properties().optionAProperties().mtu()); + Assertions.assertEquals(1744928768, response.properties().optionAProperties().vlanId()); + Assertions.assertEquals(8878300269976780830L, response.properties().optionAProperties().peerASN()); + Assertions.assertEquals(853139796, + response.properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1948629941, response.properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("tilbx", response.properties().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("tudfhpelzavohvdb", response.properties().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + response.properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + response.properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1168292556, + response.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(827590149, + response.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("kcjcglvob", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("i", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("w", response.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ypcuri", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } 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 index b372f1affa16..455653ac1d7d 100644 --- 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 @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,46 +25,66 @@ public final class ExternalNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"gdungaypx\",\"a\",\"bxsnx\",\"ksznf\"],\"exportRouteTargets\":[\"prvgrandzkt\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"pczlqbo\",\"mzgmrolh\"],\"importIpv6RouteTargets\":[\"dkhx\",\"ev\"],\"exportIpv4RouteTargets\":[\"nbwaxadxgnp\",\"htuhalpq\",\"ld\"],\"exportIpv6RouteTargets\":[\"kexznpnytkqjarl\"]}},\"optionAProperties\":{\"mtu\":1673458542,\"vlanId\":1381920113,\"fabricASN\":1720411984017904155,\"peerASN\":2629702164412375511,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":773691533,\"multiplier\":1218418747},\"ingressAclId\":\"gxuupc\",\"egressAclId\":\"gqnaidvss\",\"primaryIpv4Prefix\":\"yoggkztzttjnkn\",\"primaryIpv6Prefix\":\"qgzkuobc\",\"secondaryIpv4Prefix\":\"bna\",\"secondaryIpv6Prefix\":\"iz\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"pnnh\",\"importRoutePolicyId\":\"mkffeonmnvm\",\"exportRoutePolicyId\":\"yiqywlpxmli\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"egcr\",\"importIpv6RoutePolicyId\":\"bkilxstekbirhyv\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vriemors\",\"exportIpv6RoutePolicyId\":\"fiukltr\"},\"annotation\":\"ioguoxcsdqo\"},\"id\":\"denmjogx\",\"name\":\"rggyci\",\"type\":\"bnqinrsxvvm\"}"; + = "{\"properties\":{\"annotation\":\"zeg\",\"networkToNetworkInterconnectId\":\"tabhacjlfq\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"lvvwvpf\",\"importIpv6RoutePolicyId\":\"pvzhmlnfvyhdh\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"sdmhawbx\",\"exportIpv6RoutePolicyId\":\"kmazhlewyrok\"},\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"fzzipyqtmdhb\",\"tkgmwxzlphzujkqa\",\"bejhxopehel\"],\"exportRouteTargets\":[\"khdapxdiibjjwuek\",\"hqyhxhuhhnr\",\"mfzfkhfnzj\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"htvbskgciedl\",\"vpdtrlsmsr\",\"lfgbu\",\"gchjtpszcawf\"],\"importIpv6RouteTargets\":[\"ypl\",\"ivrjselauz\",\"pespebiegzxru\"],\"exportIpv4RouteTargets\":[\"vflyqauu\",\"hskimntxd\",\"lqmnwhdho\"],\"exportIpv6RouteTargets\":[\"dumaplp\",\"zriettnmiufpbf\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"mbyqyekuw\",\"primaryIpv6Prefix\":\"xz\",\"secondaryIpv4Prefix\":\"gumydogrtfwzec\",\"secondaryIpv6Prefix\":\"xrcsevqjdxiiqwqb\",\"mtu\":972006752,\"vlanId\":1900010062,\"fabricASN\":7687566742346032291,\"peerASN\":2512921568793020571,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":2040951499,\"multiplier\":2109376848},\"ingressAclId\":\"ywrxnksmaeb\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"egressAclId\":\"mrseau\",\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":367413785,\"multiplier\":982168640},\"ipv4Routes\":[{\"prefix\":\"ketkvi\",\"nextHop\":[\"qh\",\"tfg\"]}],\"ipv6Routes\":[{\"prefix\":\"bxgfhgkdmsflhh\",\"nextHop\":[\"pqovu\",\"hvqihmqhqjdcbg\",\"e\"]},{\"prefix\":\"jtiljxagcal\",\"nextHop\":[\"zcraxilzdxc\",\"pdmdsypks\",\"rhiehxjou\"]},{\"prefix\":\"x\",\"nextHop\":[\"sbecxuvkba\",\"qvvyhgpgjd\",\"n\"]}]},\"lastOperation\":{\"details\":\"j\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\"},\"id\":\"zwiztv\",\"name\":\"cya\",\"type\":\"kgkavpmgtpco\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExternalNetwork response = manager.externalNetworks() - .getWithResponse("vrsksdzmhwt", "yppwfbwoet", "izrf", com.azure.core.util.Context.NONE) + .getWithResponse("drfiwerlbcetrvir", "fsdswp", "nloop", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PeeringOption.OPTIONA, response.peeringOption()); - Assertions.assertEquals("gdungaypx", response.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("prvgrandzkt", response.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("pczlqbo", response.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("dkhx", response.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("nbwaxadxgnp", - response.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("kexznpnytkqjarl", - response.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("yoggkztzttjnkn", response.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("qgzkuobc", response.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("bna", response.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("iz", response.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1673458542, response.optionAProperties().mtu()); - Assertions.assertEquals(1381920113, response.optionAProperties().vlanId()); - Assertions.assertEquals(2629702164412375511L, response.optionAProperties().peerAsn()); - Assertions.assertEquals(773691533, response.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1218418747, response.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("gxuupc", response.optionAProperties().ingressAclId()); - Assertions.assertEquals("gqnaidvss", response.optionAProperties().egressAclId()); - Assertions.assertEquals("pnnh", response.networkToNetworkInterconnectId()); - Assertions.assertEquals("mkffeonmnvm", response.importRoutePolicyId()); - Assertions.assertEquals("yiqywlpxmli", response.exportRoutePolicyId()); - Assertions.assertEquals("egcr", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("bkilxstekbirhyv", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("vriemors", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fiukltr", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ioguoxcsdqo", response.annotation()); + Assertions.assertEquals("zeg", response.properties().annotation()); + Assertions.assertEquals("tabhacjlfq", response.properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("lvvwvpf", response.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("pvzhmlnfvyhdh", response.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("sdmhawbx", response.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("kmazhlewyrok", response.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONA, response.properties().peeringOption()); + Assertions.assertEquals("fzzipyqtmdhb", response.properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("khdapxdiibjjwuek", + response.properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("htvbskgciedl", + response.properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("ypl", + response.properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("vflyqauu", + response.properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("dumaplp", + response.properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("mbyqyekuw", response.properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("xz", response.properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("gumydogrtfwzec", response.properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("xrcsevqjdxiiqwqb", response.properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(972006752, response.properties().optionAProperties().mtu()); + Assertions.assertEquals(1900010062, response.properties().optionAProperties().vlanId()); + Assertions.assertEquals(2512921568793020571L, response.properties().optionAProperties().peerASN()); + Assertions.assertEquals(2040951499, + response.properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2109376848, response.properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("ywrxnksmaeb", response.properties().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("mrseau", response.properties().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + response.properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + response.properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(367413785, + response.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(982168640, + response.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ketkvi", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qh", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("bxgfhgkdmsflhh", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pqovu", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java index a61bffe49133..eafd25a5a684 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainMockTests.java @@ -1,18 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,52 +26,82 @@ public final class ExternalNetworksListByL3IsolationDomainMockTests { @Test public void testListByL3IsolationDomain() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"pncjqbgbnoqnowv\"],\"exportRouteTargets\":[\"ytzgwjekyqirv\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"nvgpppdil\",\"dvxlfhlzzga\",\"sp\",\"wwblscrmzqu\"],\"importIpv6RouteTargets\":[\"wkgouxnro\",\"ht\",\"esywywnvgy\"],\"exportIpv4RouteTargets\":[\"ifrzcwuejmxlfzl\"],\"exportIpv6RouteTargets\":[\"rgrlhchra\"]}},\"optionAProperties\":{\"mtu\":919359758,\"vlanId\":1922580391,\"fabricASN\":6531716369463258640,\"peerASN\":7016612731921186008,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1047331940,\"multiplier\":809850020},\"ingressAclId\":\"rgmnkgtlhzkrazk\",\"egressAclId\":\"iy\",\"primaryIpv4Prefix\":\"znvzmsv\",\"primaryIpv6Prefix\":\"gheqzhehgvmmnoyz\",\"secondaryIpv4Prefix\":\"bn\",\"secondaryIpv6Prefix\":\"luzypkfcdf\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"tnoilqcdvhyefqh\",\"importRoutePolicyId\":\"tsqmbwc\",\"exportRoutePolicyId\":\"waaqakv\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"axxra\",\"importIpv6RoutePolicyId\":\"lreq\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mmd\",\"exportIpv6RoutePolicyId\":\"hzumxucznbabowrc\"},\"annotation\":\"nmjwkowxqzk\"},\"id\":\"gvejhmnaph\",\"name\":\"skmpeajzzypa\",\"type\":\"amzmzfnt\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"mu\",\"networkToNetworkInterconnectId\":\"abp\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hagcojg\",\"importIpv6RoutePolicyId\":\"zjd\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ehrq\",\"exportIpv6RoutePolicyId\":\"dipbnjiweyuigy\"},\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"bfykgmwurcxxjyx\",\"unypfkvjg\",\"vbbncj\"],\"exportRouteTargets\":[\"aqgmztlru\",\"nk\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"mqffgjsq\",\"qairo\",\"glwujobd\",\"iuppavqovijpme\"],\"importIpv6RouteTargets\":[\"rvtf\",\"ibtrwgljfa\",\"ezdxqhj\"],\"exportIpv4RouteTargets\":[\"gimyo\"],\"exportIpv6RouteTargets\":[\"flgnieeqjdfxxxn\",\"duxkepga\",\"rijbiterqfu\",\"errcanlpf\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"wwpgcq\",\"primaryIpv6Prefix\":\"upqkvmyguee\",\"secondaryIpv4Prefix\":\"xzwvcvtjdq\",\"secondaryIpv6Prefix\":\"gwxja\",\"mtu\":1034744494,\"vlanId\":427069246,\"fabricASN\":8439587642742623357,\"peerASN\":369566296108470674,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":910617443,\"multiplier\":2110171810},\"ingressAclId\":\"iraupirvdo\",\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"egressAclId\":\"gvgjg\",\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\",\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{}]}},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1718493623,\"multiplier\":608412129},\"ipv4Routes\":[{\"prefix\":\"hgmfrnkts\",\"nextHop\":[\"qdarjteqluj\"]},{\"prefix\":\"m\",\"nextHop\":[\"iauksttxim\",\"ztasflgme\"]},{\"prefix\":\"weo\",\"nextHop\":[\"erptj\",\"vzapybdeeagigbp\"]},{\"prefix\":\"bacpleirjrkakm\",\"nextHop\":[\"dubmazlx\",\"bdukid\",\"qeyqrlgpkypb\",\"kpardo\"]}],\"ipv6Routes\":[{\"prefix\":\"e\",\"nextHop\":[\"zgyhbz\"]},{\"prefix\":\"gzsytmpfslrxvs\",\"nextHop\":[\"bqrqbpiqfstkdlyj\"]},{\"prefix\":\"ijxefydckffkz\",\"nextHop\":[\"hrkiwp\",\"dnhflxnnitru\",\"otfrdlfew\"]},{\"prefix\":\"xbrvbdyriyr\",\"nextHop\":[\"bigksnijclfdpre\",\"qxzxeig\",\"dd\",\"fnmbxerzypcr\"]}]},\"lastOperation\":{\"details\":\"vcnmr\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\"},\"id\":\"hzbcujd\",\"name\":\"l\",\"type\":\"yermjemny\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.externalNetworks() - .listByL3IsolationDomain("nj", "dijoxqswsychdc", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.externalNetworks().listByL3IsolationDomain("fksixvw", "pc", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PeeringOption.OPTIONA, response.iterator().next().peeringOption()); - Assertions.assertEquals("pncjqbgbnoqnowv", - response.iterator().next().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ytzgwjekyqirv", - response.iterator().next().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("nvgpppdil", - response.iterator().next().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("wkgouxnro", - response.iterator().next().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("ifrzcwuejmxlfzl", - response.iterator().next().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("rgrlhchra", - response.iterator().next().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("znvzmsv", response.iterator().next().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("gheqzhehgvmmnoyz", response.iterator().next().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("bn", response.iterator().next().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("luzypkfcdf", response.iterator().next().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(919359758, response.iterator().next().optionAProperties().mtu()); - Assertions.assertEquals(1922580391, response.iterator().next().optionAProperties().vlanId()); - Assertions.assertEquals(7016612731921186008L, response.iterator().next().optionAProperties().peerAsn()); - Assertions.assertEquals(1047331940, - response.iterator().next().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(809850020, - response.iterator().next().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("rgmnkgtlhzkrazk", response.iterator().next().optionAProperties().ingressAclId()); - Assertions.assertEquals("iy", response.iterator().next().optionAProperties().egressAclId()); - Assertions.assertEquals("tnoilqcdvhyefqh", response.iterator().next().networkToNetworkInterconnectId()); - Assertions.assertEquals("tsqmbwc", response.iterator().next().importRoutePolicyId()); - Assertions.assertEquals("waaqakv", response.iterator().next().exportRoutePolicyId()); - Assertions.assertEquals("axxra", response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("lreq", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("mmd", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("hzumxucznbabowrc", - response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("nmjwkowxqzk", response.iterator().next().annotation()); + Assertions.assertEquals("mu", response.iterator().next().properties().annotation()); + Assertions.assertEquals("abp", response.iterator().next().properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("hagcojg", + response.iterator().next().properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("zjd", + response.iterator().next().properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ehrq", + response.iterator().next().properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dipbnjiweyuigy", + response.iterator().next().properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(PeeringOption.OPTIONB, response.iterator().next().properties().peeringOption()); + Assertions.assertEquals("bfykgmwurcxxjyx", + response.iterator().next().properties().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("aqgmztlru", + response.iterator().next().properties().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("mqffgjsq", + response.iterator().next().properties().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("rvtf", + response.iterator().next().properties().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("gimyo", + response.iterator().next().properties().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("flgnieeqjdfxxxn", + response.iterator().next().properties().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("wwpgcq", + response.iterator().next().properties().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("upqkvmyguee", + response.iterator().next().properties().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("xzwvcvtjdq", + response.iterator().next().properties().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("gwxja", + response.iterator().next().properties().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals(1034744494, response.iterator().next().properties().optionAProperties().mtu()); + Assertions.assertEquals(427069246, response.iterator().next().properties().optionAProperties().vlanId()); + Assertions.assertEquals(369566296108470674L, + response.iterator().next().properties().optionAProperties().peerASN()); + Assertions.assertEquals(910617443, + response.iterator().next().properties().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2110171810, + response.iterator().next().properties().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("iraupirvdo", + response.iterator().next().properties().optionAProperties().ingressAclId()); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.iterator().next().properties().optionAProperties().bmpConfiguration().configurationState()); + Assertions.assertEquals("gvgjg", response.iterator().next().properties().optionAProperties().egressAclId()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + response.iterator().next().properties().optionAProperties().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + response.iterator().next().properties().optionAProperties().v6OverV4BgpSession()); + Assertions.assertEquals(1718493623, + response.iterator() + .next() + .properties() + .staticRouteConfiguration() + .bfdConfiguration() + .intervalInMilliSeconds()); + Assertions.assertEquals(608412129, + response.iterator().next().properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("hgmfrnkts", + response.iterator().next().properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qdarjteqluj", + response.iterator().next().properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("e", + response.iterator().next().properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zgyhbz", + response.iterator().next().properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } 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 e75a5b9094f7..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) 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.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworksList; -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; -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\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"xv\",\"zxoebwgjxb\"],\"exportRouteTargets\":[\"nbau\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"vpaklozkxbz\",\"pejplssa\",\"bttt\",\"gs\"],\"importIpv6RouteTargets\":[\"nrswgkpjhboyik\",\"bhuhk\",\"lgw\",\"okhu\"],\"exportIpv4RouteTargets\":[\"jy\",\"cqypz\",\"zufgs\",\"fejyvdwtfxptpqa\"],\"exportIpv6RouteTargets\":[\"k\",\"cf\",\"ybmx\",\"nxocuul\"]}},\"optionAProperties\":{\"mtu\":857149091,\"vlanId\":483540958,\"fabricASN\":2170588510659937607,\"peerASN\":5920984051330844517,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":788065206,\"multiplier\":1376252754},\"ingressAclId\":\"zgdyrcvuqbs\",\"egressAclId\":\"lr\",\"primaryIpv4Prefix\":\"bjnqogdxwbsf\",\"primaryIpv6Prefix\":\"xxtjlflecomi\",\"secondaryIpv4Prefix\":\"ojjlu\",\"secondaryIpv6Prefix\":\"dhilzzdzz\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\",\"networkToNetworkInterconnectId\":\"ovribq\",\"importRoutePolicyId\":\"tokhtvwtaznkcqw\",\"exportRoutePolicyId\":\"wjyofgwhnkbtl\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ssmctsnl\",\"importIpv6RoutePolicyId\":\"pwolgisubxb\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gfgf\",\"exportIpv6RoutePolicyId\":\"jrykwlefksxqce\"},\"annotation\":\"fpxgnmqvz\"},\"id\":\"uyqqaiosssc\",\"name\":\"vaifppuacvfy\",\"type\":\"owpsfxt\"},{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"ymh\"],\"exportRouteTargets\":[\"yqfttehdpboujst\",\"fvvdshxcdedsue\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"xcgjtf\",\"nquktrfnslnlrxs\",\"ylt\"],\"importIpv6RouteTargets\":[\"tfmtbgwjdxwnazku\"],\"exportIpv4RouteTargets\":[\"reyzjwhs\"],\"exportIpv6RouteTargets\":[\"wjwzzqseuzuukykc\"]}},\"optionAProperties\":{\"mtu\":986882951,\"vlanId\":1034433252,\"fabricASN\":2932185200205854574,\"peerASN\":5579449027126276309,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":793667123,\"multiplier\":591375504},\"ingressAclId\":\"pazdazgbsqgp\",\"egressAclId\":\"q\",\"primaryIpv4Prefix\":\"utmdpvozg\",\"primaryIpv6Prefix\":\"jbkn\",\"secondaryIpv4Prefix\":\"clctzey\",\"secondaryIpv6Prefix\":\"mndcov\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"a\",\"importRoutePolicyId\":\"mk\",\"exportRoutePolicyId\":\"ruw\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"rbcp\",\"importIpv6RoutePolicyId\":\"xudqyemebunaucmc\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"nee\",\"exportIpv6RoutePolicyId\":\"jauwcgxefnohaitr\"},\"annotation\":\"izerw\"},\"id\":\"dasmxu\",\"name\":\"vfbngfco\",\"type\":\"ef\"},{\"properties\":{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"lfmpztr\"],\"exportRouteTargets\":[\"svhl\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"lregpq\"],\"importIpv6RouteTargets\":[\"jhvrztnvgyshqrdg\",\"twmewjzlpykcfazz\"],\"exportIpv4RouteTargets\":[\"ayerzrran\",\"ybylpol\"],\"exportIpv6RouteTargets\":[\"ghsrleinkfscjfn\",\"jwvuag\",\"qwtltngvmreupt\",\"klzmijajw\"]}},\"optionAProperties\":{\"mtu\":1419456371,\"vlanId\":1674481781,\"fabricASN\":3584876522043941136,\"peerASN\":9108172256129325995,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":356088444,\"multiplier\":288708143},\"ingressAclId\":\"gtzjcv\",\"egressAclId\":\"qlapsnsso\",\"primaryIpv4Prefix\":\"xpavid\",\"primaryIpv6Prefix\":\"ev\",\"secondaryIpv4Prefix\":\"fcvvy\",\"secondaryIpv6Prefix\":\"slpuxgcbdsva\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"kx\",\"importRoutePolicyId\":\"azwu\",\"exportRoutePolicyId\":\"yqvnjobfe\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"diuhzzgql\",\"importIpv6RoutePolicyId\":\"aewzgiudjp\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"httqh\",\"exportIpv6RoutePolicyId\":\"hkrezsdsuxheqdgc\"},\"annotation\":\"xsp\"},\"id\":\"ymmqgwokmikp\",\"name\":\"zfbmjxuv\",\"type\":\"ipfdvhaxdvwzaehp\"},{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"kl\",\"vetat\",\"akfqoixwgiksb\",\"vtooxrpo\"],\"exportRouteTargets\":[\"hchgjtnhtukf\",\"cihmbfntumeezbxv\",\"xbnuvwcga\",\"gomtm\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"uqgovsxpwwztjfm\",\"khtgfredmlscgrll\",\"cnaovjo\",\"azhpabacoml\"],\"importIpv6RouteTargets\":[\"gkw\"],\"exportIpv4RouteTargets\":[\"srqorcgenmvceb\",\"eetqujxcxxq\"],\"exportIpv6RouteTargets\":[\"qjkedwqurc\",\"ojmrvvxwjongzse\",\"qqrsil\"]}},\"optionAProperties\":{\"mtu\":770026155,\"vlanId\":1324476577,\"fabricASN\":5630506474733333632,\"peerASN\":3809367581844316012,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":734874169,\"multiplier\":1346312229},\"ingressAclId\":\"ojrulfuctejrt\",\"egressAclId\":\"fjzhxl\",\"primaryIpv4Prefix\":\"bqjr\",\"primaryIpv6Prefix\":\"tvrjeqmtz\",\"secondaryIpv4Prefix\":\"eqrztrxalxrdh\",\"secondaryIpv6Prefix\":\"srwrsnrhpqati\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"networkToNetworkInterconnectId\":\"kvvcsemsvuvdjkq\",\"importRoutePolicyId\":\"tqmm\",\"exportRoutePolicyId\":\"vrjjxnw\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hpojxl\",\"importIpv6RoutePolicyId\":\"z\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gfquwz\",\"exportIpv6RoutePolicyId\":\"iibelwcerw\"},\"annotation\":\"bpjxljtxbusqtb\"},\"id\":\"niuisdz\",\"name\":\"gbdgzp\",\"type\":\"gsecnadbuwqrgx\"}],\"nextLink\":\"lmqiynezoel\"}") - .toObject(ExternalNetworksList.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).peeringOption()); - Assertions.assertEquals("xv", model.value().get(0).optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nbau", model.value().get(0).optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("vpaklozkxbz", - model.value().get(0).optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nrswgkpjhboyik", - model.value().get(0).optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("jy", - model.value().get(0).optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("k", - model.value().get(0).optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("bjnqogdxwbsf", model.value().get(0).optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("xxtjlflecomi", model.value().get(0).optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ojjlu", model.value().get(0).optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("dhilzzdzz", model.value().get(0).optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(857149091, model.value().get(0).optionAProperties().mtu()); - Assertions.assertEquals(483540958, model.value().get(0).optionAProperties().vlanId()); - Assertions.assertEquals(5920984051330844517L, model.value().get(0).optionAProperties().peerAsn()); - Assertions.assertEquals(788065206, - model.value().get(0).optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1376252754, model.value().get(0).optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("zgdyrcvuqbs", model.value().get(0).optionAProperties().ingressAclId()); - Assertions.assertEquals("lr", model.value().get(0).optionAProperties().egressAclId()); - Assertions.assertEquals("ovribq", model.value().get(0).networkToNetworkInterconnectId()); - Assertions.assertEquals("tokhtvwtaznkcqw", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("wjyofgwhnkbtl", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("ssmctsnl", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pwolgisubxb", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gfgf", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jrykwlefksxqce", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fpxgnmqvz", model.value().get(0).annotation()); - Assertions.assertEquals("lmqiynezoel", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworksList model - = new ExternalNetworksList() - .withValue( - Arrays - .asList( - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("xv", "zxoebwgjxb")) - .withExportRouteTargets(Arrays.asList("nbau")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets( - Arrays.asList("vpaklozkxbz", "pejplssa", "bttt", "gs")) - .withImportIpv6RouteTargets( - Arrays.asList("nrswgkpjhboyik", "bhuhk", "lgw", "okhu")) - .withExportIpv4RouteTargets( - Arrays.asList("jy", "cqypz", "zufgs", "fejyvdwtfxptpqa")) - .withExportIpv6RouteTargets(Arrays.asList("k", "cf", "ybmx", "nxocuul")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("bjnqogdxwbsf") - .withPrimaryIpv6Prefix("xxtjlflecomi") - .withSecondaryIpv4Prefix("ojjlu") - .withSecondaryIpv6Prefix("dhilzzdzz") - .withMtu(857149091) - .withVlanId(483540958) - .withPeerAsn(5920984051330844517L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(788065206) - .withMultiplier(1376252754)) - .withIngressAclId("zgdyrcvuqbs") - .withEgressAclId("lr")) - .withNetworkToNetworkInterconnectId("ovribq") - .withImportRoutePolicyId("tokhtvwtaznkcqw") - .withExportRoutePolicyId("wjyofgwhnkbtl") - .withImportRoutePolicy(new ImportRoutePolicy() - .withImportIpv4RoutePolicyId("ssmctsnl") - .withImportIpv6RoutePolicyId("pwolgisubxb")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("gfgf") - .withExportIpv6RoutePolicyId("jrykwlefksxqce")) - .withAnnotation("fpxgnmqvz"), - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("ymh")) - .withExportRouteTargets(Arrays.asList("yqfttehdpboujst", "fvvdshxcdedsue")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("xcgjtf", "nquktrfnslnlrxs", "ylt")) - .withImportIpv6RouteTargets(Arrays.asList("tfmtbgwjdxwnazku")) - .withExportIpv4RouteTargets(Arrays.asList("reyzjwhs")) - .withExportIpv6RouteTargets(Arrays.asList("wjwzzqseuzuukykc")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("utmdpvozg") - .withPrimaryIpv6Prefix("jbkn") - .withSecondaryIpv4Prefix("clctzey") - .withSecondaryIpv6Prefix("mndcov") - .withMtu(986882951) - .withVlanId(1034433252) - .withPeerAsn(5579449027126276309L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(793667123) - .withMultiplier(591375504)) - .withIngressAclId("pazdazgbsqgp") - .withEgressAclId("q")) - .withNetworkToNetworkInterconnectId("a") - .withImportRoutePolicyId("mk") - .withExportRoutePolicyId("ruw") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("rbcp") - .withImportIpv6RoutePolicyId("xudqyemebunaucmc")) - .withExportRoutePolicy(new ExportRoutePolicy() - .withExportIpv4RoutePolicyId("nee") - .withExportIpv6RoutePolicyId("jauwcgxefnohaitr")) - .withAnnotation("izerw"), - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new L3OptionBProperties().withImportRouteTargets(Arrays.asList("lfmpztr")) - .withExportRouteTargets(Arrays.asList("svhl")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("lregpq")) - .withImportIpv6RouteTargets( - Arrays.asList("jhvrztnvgyshqrdg", "twmewjzlpykcfazz")) - .withExportIpv4RouteTargets(Arrays.asList("ayerzrran", "ybylpol")) - .withExportIpv6RouteTargets(Arrays.asList("ghsrleinkfscjfn", "jwvuag", - "qwtltngvmreupt", "klzmijajw")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("xpavid") - .withPrimaryIpv6Prefix("ev") - .withSecondaryIpv4Prefix("fcvvy") - .withSecondaryIpv6Prefix("slpuxgcbdsva") - .withMtu(1419456371) - .withVlanId(1674481781) - .withPeerAsn(9108172256129325995L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(356088444) - .withMultiplier(288708143)) - .withIngressAclId("gtzjcv") - .withEgressAclId("qlapsnsso")) - .withNetworkToNetworkInterconnectId("kx") - .withImportRoutePolicyId("azwu") - .withExportRoutePolicyId("yqvnjobfe") - .withImportRoutePolicy(new ImportRoutePolicy() - .withImportIpv4RoutePolicyId("diuhzzgql") - .withImportIpv6RoutePolicyId("aewzgiudjp")) - .withExportRoutePolicy(new ExportRoutePolicy() - .withExportIpv4RoutePolicyId("httqh") - .withExportIpv6RoutePolicyId("hkrezsdsuxheqdgc")) - .withAnnotation("xsp"), - new ExternalNetworkInner().withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new L3OptionBProperties() - .withImportRouteTargets(Arrays.asList("kl", "vetat", "akfqoixwgiksb", "vtooxrpo")) - .withExportRouteTargets( - Arrays.asList("hchgjtnhtukf", "cihmbfntumeezbxv", "xbnuvwcga", "gomtm")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("uqgovsxpwwztjfm", "khtgfredmlscgrll", - "cnaovjo", "azhpabacoml")) - .withImportIpv6RouteTargets(Arrays.asList("gkw")) - .withExportIpv4RouteTargets(Arrays.asList("srqorcgenmvceb", "eetqujxcxxq")) - .withExportIpv6RouteTargets( - Arrays.asList("qjkedwqurc", "ojmrvvxwjongzse", "qqrsil")))) - .withOptionAProperties(new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("bqjr") - .withPrimaryIpv6Prefix("tvrjeqmtz") - .withSecondaryIpv4Prefix("eqrztrxalxrdh") - .withSecondaryIpv6Prefix("srwrsnrhpqati") - .withMtu(770026155) - .withVlanId(1324476577) - .withPeerAsn(3809367581844316012L) - .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(734874169) - .withMultiplier(1346312229)) - .withIngressAclId("ojrulfuctejrt") - .withEgressAclId("fjzhxl")) - .withNetworkToNetworkInterconnectId("kvvcsemsvuvdjkq") - .withImportRoutePolicyId("tqmm") - .withExportRoutePolicyId("vrjjxnw") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("hpojxl") - .withImportIpv6RoutePolicyId("z")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("gfquwz") - .withExportIpv6RoutePolicyId("iibelwcerw")) - .withAnnotation("bpjxljtxbusqtb"))) - .withNextLink("lmqiynezoel"); - model = BinaryData.fromObject(model).toObject(ExternalNetworksList.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).peeringOption()); - Assertions.assertEquals("xv", model.value().get(0).optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nbau", model.value().get(0).optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("vpaklozkxbz", - model.value().get(0).optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nrswgkpjhboyik", - model.value().get(0).optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("jy", - model.value().get(0).optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("k", - model.value().get(0).optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals("bjnqogdxwbsf", model.value().get(0).optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("xxtjlflecomi", model.value().get(0).optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ojjlu", model.value().get(0).optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("dhilzzdzz", model.value().get(0).optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(857149091, model.value().get(0).optionAProperties().mtu()); - Assertions.assertEquals(483540958, model.value().get(0).optionAProperties().vlanId()); - Assertions.assertEquals(5920984051330844517L, model.value().get(0).optionAProperties().peerAsn()); - Assertions.assertEquals(788065206, - model.value().get(0).optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1376252754, model.value().get(0).optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("zgdyrcvuqbs", model.value().get(0).optionAProperties().ingressAclId()); - Assertions.assertEquals("lr", model.value().get(0).optionAProperties().egressAclId()); - Assertions.assertEquals("ovribq", model.value().get(0).networkToNetworkInterconnectId()); - Assertions.assertEquals("tokhtvwtaznkcqw", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("wjyofgwhnkbtl", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("ssmctsnl", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pwolgisubxb", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gfgf", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jrykwlefksxqce", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fpxgnmqvz", model.value().get(0).annotation()); - Assertions.assertEquals("lmqiynezoel", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java new file mode 100644 index 000000000000..19bc47aa04c1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricLockPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.FabricLockProperties; +import com.azure.resourcemanager.managednetworkfabric.models.LockConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; +import org.junit.jupiter.api.Assertions; + +public final class FabricLockPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FabricLockProperties model + = BinaryData.fromString("{\"lockState\":\"Enabled\",\"lockType\":\"Administrative\"}") + .toObject(FabricLockProperties.class); + Assertions.assertEquals(LockConfigurationState.ENABLED, model.lockState()); + Assertions.assertEquals(NetworkFabricLockType.ADMINISTRATIVE, model.lockType()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java new file mode 100644 index 000000000000..cfbd1dfae8eb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FeatureFlagPropertiesTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.FeatureFlagProperties; +import org.junit.jupiter.api.Assertions; + +public final class FeatureFlagPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FeatureFlagProperties model + = BinaryData.fromString("{\"featureFlagName\":\"icehfgsmdrjuqb\",\"featureFlagValue\":\"tokljmtznpaxw\"}") + .toObject(FeatureFlagProperties.class); + Assertions.assertEquals("icehfgsmdrjuqb", model.featureFlagName()); + Assertions.assertEquals("tokljmtznpaxw", model.featureFlagValue()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java new file mode 100644 index 000000000000..c51af7f34a43 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalAccessControlListActionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalAccessControlListActionPatchProperties model = BinaryData.fromString("{\"enableCount\":\"True\"}") + .toObject(GlobalAccessControlListActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalAccessControlListActionPatchProperties model + = new GlobalAccessControlListActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE); + model = BinaryData.fromObject(model).toObject(GlobalAccessControlListActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java new file mode 100644 index 000000000000..e39610d2be8e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalAccessControlListActionPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalAccessControlListActionProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalAccessControlListActionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalAccessControlListActionProperties model = BinaryData.fromString("{\"enableCount\":\"True\"}") + .toObject(GlobalAccessControlListActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalAccessControlListActionProperties model + = new GlobalAccessControlListActionProperties().withEnableCount(BooleanEnumProperty.TRUE); + model = BinaryData.fromObject(model).toObject(GlobalAccessControlListActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java new file mode 100644 index 000000000000..5d54adc34fab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPatchPropertiesTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalNetworkTapRuleActionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalNetworkTapRuleActionPatchProperties model + = BinaryData.fromString("{\"enableCount\":\"True\",\"truncate\":\"jgeecwtfmabvbmn\"}") + .toObject(GlobalNetworkTapRuleActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + Assertions.assertEquals("jgeecwtfmabvbmn", model.truncate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalNetworkTapRuleActionPatchProperties model + = new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("jgeecwtfmabvbmn"); + model = BinaryData.fromObject(model).toObject(GlobalNetworkTapRuleActionPatchProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + Assertions.assertEquals("jgeecwtfmabvbmn", model.truncate()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java new file mode 100644 index 000000000000..8c5b210c2e35 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GlobalNetworkTapRuleActionPropertiesTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import org.junit.jupiter.api.Assertions; + +public final class GlobalNetworkTapRuleActionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GlobalNetworkTapRuleActionProperties model + = BinaryData.fromString("{\"enableCount\":\"True\",\"truncate\":\"icttr\"}") + .toObject(GlobalNetworkTapRuleActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + Assertions.assertEquals("icttr", model.truncate()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GlobalNetworkTapRuleActionProperties model + = new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("icttr"); + model = BinaryData.fromObject(model).toObject(GlobalNetworkTapRuleActionProperties.class); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.enableCount()); + Assertions.assertEquals("icttr", model.truncate()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java new file mode 100644 index 000000000000..b89925c227b9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/HeaderAddressPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class HeaderAddressPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HeaderAddressProperties model = BinaryData.fromString( + "{\"headerName\":\"mgqzgwldoyc\",\"addressList\":[\"lcecfeh\",\"waoaguhi\",\"qllizstac\",\"jvhrweft\"]}") + .toObject(HeaderAddressProperties.class); + Assertions.assertEquals("mgqzgwldoyc", model.headerName()); + Assertions.assertEquals("lcecfeh", model.addressList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HeaderAddressProperties model = new HeaderAddressProperties().withHeaderName("mgqzgwldoyc") + .withAddressList(Arrays.asList("lcecfeh", "waoaguhi", "qllizstac", "jvhrweft")); + model = BinaryData.fromObject(model).toObject(HeaderAddressProperties.class); + Assertions.assertEquals("mgqzgwldoyc", model.headerName()); + Assertions.assertEquals("lcecfeh", model.addressList().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..28bfbfd9a40a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPatchPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IcmpConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IcmpConfigurationPatchProperties model + = BinaryData.fromString("{\"icmpTypes\":[\"tlgy\",\"lhqvlnnpxybafi\",\"geaar\",\"gjekglklby\"]}") + .toObject(IcmpConfigurationPatchProperties.class); + Assertions.assertEquals("tlgy", model.icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IcmpConfigurationPatchProperties model = new IcmpConfigurationPatchProperties() + .withIcmpTypes(Arrays.asList("tlgy", "lhqvlnnpxybafi", "geaar", "gjekglklby")); + model = BinaryData.fromObject(model).toObject(IcmpConfigurationPatchProperties.class); + Assertions.assertEquals("tlgy", model.icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java new file mode 100644 index 000000000000..df658369e53c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IcmpConfigurationPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IcmpConfigurationProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IcmpConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IcmpConfigurationProperties model + = BinaryData.fromString("{\"icmpTypes\":[\"wdxsm\",\"ccwr\"]}").toObject(IcmpConfigurationProperties.class); + Assertions.assertEquals("wdxsm", model.icmpTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IcmpConfigurationProperties model + = new IcmpConfigurationProperties().withIcmpTypes(Arrays.asList("wdxsm", "ccwr")); + model = BinaryData.fromObject(model).toObject(IcmpConfigurationProperties.class); + Assertions.assertEquals("wdxsm", model.icmpTypes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java new file mode 100644 index 000000000000..78ffc4eaa103 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import org.junit.jupiter.api.Assertions; + +public final class IdentitySelectorPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentitySelectorPatch model = BinaryData + .fromString("{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"tlzmgs\"}") + .toObject(IdentitySelectorPatch.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("tlzmgs", model.userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentitySelectorPatch model + = new IdentitySelectorPatch().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("tlzmgs"); + model = BinaryData.fromObject(model).toObject(IdentitySelectorPatch.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("tlzmgs", model.userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java new file mode 100644 index 000000000000..c0bd2ab64b8f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IdentitySelectorTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import org.junit.jupiter.api.Assertions; + +public final class IdentitySelectorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdentitySelector model = BinaryData + .fromString("{\"identityType\":\"SystemAssignedIdentity\",\"userAssignedIdentityResourceId\":\"xflzqjim\"}") + .toObject(IdentitySelector.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("xflzqjim", model.userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdentitySelector model + = new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("xflzqjim"); + model = BinaryData.fromObject(model).toObject(IdentitySelector.class); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.SYSTEM_ASSIGNED_IDENTITY, model.identityType()); + Assertions.assertEquals("xflzqjim", model.userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java new file mode 100644 index 000000000000..33c153b3efba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import org.junit.jupiter.api.Assertions; + +public final class ImportRoutePolicyInformationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImportRoutePolicyInformationPatch model = BinaryData + .fromString("{\"importIpv4RoutePolicyId\":\"ykdigqzlrznda\",\"importIpv6RoutePolicyId\":\"nidmjqmvytg\"}") + .toObject(ImportRoutePolicyInformationPatch.class); + Assertions.assertEquals("ykdigqzlrznda", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("nidmjqmvytg", model.importIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImportRoutePolicyInformationPatch model + = new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId("ykdigqzlrznda") + .withImportIpv6RoutePolicyId("nidmjqmvytg"); + model = BinaryData.fromObject(model).toObject(ImportRoutePolicyInformationPatch.class); + Assertions.assertEquals("ykdigqzlrznda", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("nidmjqmvytg", model.importIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java index 9a88c371b762..4b9930318f90 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,19 +12,19 @@ public final class ImportRoutePolicyInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImportRoutePolicyInformation model = BinaryData - .fromString("{\"importIpv4RoutePolicyId\":\"lxrdsjrholuqwgus\",\"importIpv6RoutePolicyId\":\"hdodpjwy\"}") + .fromString("{\"importIpv4RoutePolicyId\":\"mhzbhwahfbwih\",\"importIpv6RoutePolicyId\":\"nx\"}") .toObject(ImportRoutePolicyInformation.class); - Assertions.assertEquals("lxrdsjrholuqwgus", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("hdodpjwy", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("mhzbhwahfbwih", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("nx", model.importIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImportRoutePolicyInformation model - = new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("lxrdsjrholuqwgus") - .withImportIpv6RoutePolicyId("hdodpjwy"); + = new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("mhzbhwahfbwih") + .withImportIpv6RoutePolicyId("nx"); model = BinaryData.fromObject(model).toObject(ImportRoutePolicyInformation.class); - Assertions.assertEquals("lxrdsjrholuqwgus", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("hdodpjwy", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("mhzbhwahfbwih", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("nx", model.importIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java new file mode 100644 index 000000000000..90ccd9b2616c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyPatchTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class ImportRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImportRoutePolicyPatch model + = BinaryData.fromString("{\"importIpv4RoutePolicyId\":\"tpmnoe\",\"importIpv6RoutePolicyId\":\"qlfm\"}") + .toObject(ImportRoutePolicyPatch.class); + Assertions.assertEquals("tpmnoe", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("qlfm", model.importIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImportRoutePolicyPatch model + = new ImportRoutePolicyPatch().withImportIpv4RoutePolicyId("tpmnoe").withImportIpv6RoutePolicyId("qlfm"); + model = BinaryData.fromObject(model).toObject(ImportRoutePolicyPatch.class); + Assertions.assertEquals("tpmnoe", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("qlfm", model.importIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java index b63516ebed60..695c38a8b136 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ImportRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,19 +11,19 @@ public final class ImportRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ImportRoutePolicy model = BinaryData - .fromString("{\"importIpv4RoutePolicyId\":\"qi\",\"importIpv6RoutePolicyId\":\"zxlhdjzqdcadwv\"}") - .toObject(ImportRoutePolicy.class); - Assertions.assertEquals("qi", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("zxlhdjzqdcadwv", model.importIpv6RoutePolicyId()); + ImportRoutePolicy model + = BinaryData.fromString("{\"importIpv4RoutePolicyId\":\"uadx\",\"importIpv6RoutePolicyId\":\"eqbw\"}") + .toObject(ImportRoutePolicy.class); + Assertions.assertEquals("uadx", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("eqbw", model.importIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImportRoutePolicy model - = new ImportRoutePolicy().withImportIpv4RoutePolicyId("qi").withImportIpv6RoutePolicyId("zxlhdjzqdcadwv"); + = new ImportRoutePolicy().withImportIpv4RoutePolicyId("uadx").withImportIpv6RoutePolicyId("eqbw"); model = BinaryData.fromObject(model).toObject(ImportRoutePolicy.class); - Assertions.assertEquals("qi", model.importIpv4RoutePolicyId()); - Assertions.assertEquals("zxlhdjzqdcadwv", model.importIpv6RoutePolicyId()); + Assertions.assertEquals("uadx", model.importIpv4RoutePolicyId()); + Assertions.assertEquals("eqbw", model.importIpv6RoutePolicyId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBfdAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBfdAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..a1d0dc657aa6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBfdAdministrativeStateRequestTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkRouteType; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkBfdAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkBfdAdministrativeStateRequest model = BinaryData + .fromString( + "{\"routeType\":\"Bgp\",\"neighborAddress\":\"cjzlquzexokjxebj\",\"administrativeState\":\"RMA\"}") + .toObject(InternalNetworkBfdAdministrativeStateRequest.class); + Assertions.assertEquals(InternalNetworkRouteType.BGP, model.routeType()); + Assertions.assertEquals("cjzlquzexokjxebj", model.neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.RMA, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkBfdAdministrativeStateRequest model + = new InternalNetworkBfdAdministrativeStateRequest().withRouteType(InternalNetworkRouteType.BGP) + .withNeighborAddress("cjzlquzexokjxebj") + .withAdministrativeState(BfdAdministrativeState.RMA); + model = BinaryData.fromObject(model).toObject(InternalNetworkBfdAdministrativeStateRequest.class); + Assertions.assertEquals(InternalNetworkRouteType.BGP, model.routeType()); + Assertions.assertEquals("cjzlquzexokjxebj", model.neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.RMA, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBgpAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBgpAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..aeeb6c30d6a4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBgpAdministrativeStateRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBgpAdministrativeStateRequest; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkBgpAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkBgpAdministrativeStateRequest model + = BinaryData.fromString("{\"neighborAddress\":\"dpr\",\"administrativeState\":\"Disabled\"}") + .toObject(InternalNetworkBgpAdministrativeStateRequest.class); + Assertions.assertEquals("dpr", model.neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.DISABLED, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkBgpAdministrativeStateRequest model + = new InternalNetworkBgpAdministrativeStateRequest().withNeighborAddress("dpr") + .withAdministrativeState(BgpAdministrativeState.DISABLED); + model = BinaryData.fromObject(model).toObject(InternalNetworkBgpAdministrativeStateRequest.class); + Assertions.assertEquals("dpr", model.neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.DISABLED, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java new file mode 100644 index 000000000000..f6a7e813aa07 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPatchPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkBmpPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkBmpPatchProperties model = BinaryData.fromString( + "{\"neighborIpExclusions\":[\"qxetqmmlivrjjx\",\"wxdchpojxlehzlx\",\"gfquwz\"],\"bmpConfigurationState\":\"Disabled\"}") + .toObject(InternalNetworkBmpPatchProperties.class); + Assertions.assertEquals("qxetqmmlivrjjx", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkBmpPatchProperties model = new InternalNetworkBmpPatchProperties() + .withNeighborIpExclusions(Arrays.asList("qxetqmmlivrjjx", "wxdchpojxlehzlx", "gfquwz")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(InternalNetworkBmpPatchProperties.class); + Assertions.assertEquals("qxetqmmlivrjjx", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java new file mode 100644 index 000000000000..45076633864e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkBmpPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkBmpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkBmpProperties model = BinaryData + .fromString("{\"neighborIpExclusions\":[\"skyfjlpzeqto\"],\"bmpConfigurationState\":\"Disabled\"}") + .toObject(InternalNetworkBmpProperties.class); + Assertions.assertEquals("skyfjlpzeqto", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternalNetworkBmpProperties model + = new InternalNetworkBmpProperties().withNeighborIpExclusions(Arrays.asList("skyfjlpzeqto")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(InternalNetworkBmpProperties.class); + Assertions.assertEquals("skyfjlpzeqto", model.neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfigurationState()); + } +} 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 index cd16a6ab5d9c..3a1fb3adf2cb 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,16 +8,24 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; 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.BmpConfigurationState; 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.InternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -25,127 +33,203 @@ public final class InternalNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"vlanId\":525504138,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":85439569,\"multiplier\":1597212903},\"defaultRouteOriginate\":\"True\",\"allowAS\":1088975953,\"allowASOverride\":\"Disable\",\"fabricASN\":2387743890431883353,\"peerASN\":3699317304286967094,\"ipv4ListenRangePrefixes\":[\"unlpirykycndz\",\"qi\",\"jreuykbbmn\",\"aglt\"],\"ipv6ListenRangePrefixes\":[\"eeonqlnfwm\",\"ymvqdbpbhfckdvez\",\"rcssbzhddubbnq\"],\"ipv4NeighborAddress\":[{\"address\":\"kalehp\",\"configurationState\":\"ErrorProvisioning\"},{\"address\":\"ugiqjtiogqg\",\"configurationState\":\"Provisioning\"},{\"address\":\"i\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"aj\",\"configurationState\":\"DeferredControl\"}],\"ipv6NeighborAddress\":[{\"address\":\"pnbonhpcz\",\"configurationState\":\"Succeeded\"},{\"address\":\"tp\",\"configurationState\":\"Provisioning\"},{\"address\":\"csehchkhufm\",\"configurationState\":\"Succeeded\"},{\"address\":\"q\",\"configurationState\":\"PendingCommit\"}],\"annotation\":\"dzulo\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1301701466,\"multiplier\":353038412},\"ipv4Routes\":[{\"prefix\":\"senwphpzf\",\"nextHop\":[\"qjcli\",\"ftujwjjufw\",\"eqrkuorhtss\",\"uqnmdvhazcvj\"]}],\"ipv6Routes\":[{\"prefix\":\"qswbqerzwx\",\"nextHop\":[\"txtd\",\"ukvlb\"]},{\"prefix\":\"ktg\",\"nextHop\":[\"tyouambewreswmow\",\"gmmuteyxey\"]}]},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"mtu\":529739852,\"connectedIPv4Subnets\":[{\"prefix\":\"spxlzde\",\"annotation\":\"grijwaiufanrayb\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"qfrojsydgrhyd\",\"annotation\":\"gywezskiec\"},{\"prefix\":\"f\",\"annotation\":\"zmxieqvdsmaklix\"}],\"importRoutePolicyId\":\"ah\",\"exportRoutePolicyId\":\"xalybxawoijpo\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"lxp\",\"importIpv6RoutePolicyId\":\"wjdjodqhykin\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"emehllizh\",\"exportIpv6RoutePolicyId\":\"umoqodkad\"},\"ingressAclId\":\"yibngqladywrxwh\",\"egressAclId\":\"tlu\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"annotation\":\"zsn\"},\"id\":\"emlowuowhl\",\"name\":\"lnwy\",\"type\":\"mouvbl\"}") + "{\"properties\":{\"annotation\":\"smmd\",\"mtu\":897489101,\"connectedIPv4Subnets\":[{\"annotation\":\"pimcqrhn\",\"prefix\":\"t\"},{\"annotation\":\"nklogxsvtzarhzv\",\"prefix\":\"nsqktc\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"zzoslpkyb\",\"prefix\":\"glwkzpgajsqj\"},{\"annotation\":\"mqbmfuvqarwz\",\"prefix\":\"uqrebluimmbwx\"},{\"annotation\":\"gtdmbvx\",\"prefix\":\"kraokq\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"dbtwaokbavly\",\"importIpv6RoutePolicyId\":\"aaknwfr\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"sm\",\"exportIpv6RoutePolicyId\":\"dujdigatoleksc\"},\"ingressAclId\":\"tnanqimwb\",\"egressAclId\":\"pdcldpka\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NPB\",\"vlanId\":460036043,\"bgpConfiguration\":{\"annotation\":\"o\",\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":936631865,\"multiplier\":1531586160},\"defaultRouteOriginate\":\"True\",\"allowAS\":2118230542,\"allowASOverride\":\"Enable\",\"fabricASN\":5250275290246925481,\"peerASN\":7154938367563838259,\"ipv4ListenRangePrefixes\":[\"wswjrkbqsjh\",\"tqqvy\",\"scyrfwbivqv\"],\"ipv6ListenRangePrefixes\":[\"uyzwvbhlimbyqecr\"],\"ipv4NeighborAddress\":[{\"address\":\"ikcdrdaasax\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"PendingCommit\"},{\"address\":\"iyjvz\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"nvzmlnkoywsx\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Succeeded\"}],\"ipv6NeighborAddress\":[{\"address\":\"yvymcnudndo\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"weuipmpvksmi\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"krdpqgfhyrfr\",\"kkld\",\"rcwfcmfcnrjajq\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1395640980,\"multiplier\":963386262},\"ipv4Routes\":[{\"prefix\":\"bbmtlpqagynoip\",\"nextHop\":[\"zcalincryq\"]},{\"prefix\":\"zxaqzibm\",\"nextHop\":[\"miymqruqguhfupet\",\"svvoqsbpkflanfk\",\"xsyaowuzowpuoh\"]}],\"ipv6Routes\":[{\"prefix\":\"prgukxrztiochl\",\"nextHop\":[\"ixmqrudjizcbf\",\"mcrunfhiucn\",\"fbcpaqktkrumzu\"]},{\"prefix\":\"dkyzbfvxov\",\"nextHop\":[\"xiuxqggvqrnhy\",\"lwcjsqggjhffb\",\"rqrkijpeuqlsdx\"]},{\"prefix\":\"qztvx\",\"nextHop\":[\"wwmjs\",\"en\",\"wwa\"]},{\"prefix\":\"ecleqioulndhzyo\",\"nextHop\":[\"jhtollh\",\"vidmytzl\",\"glxpnovyoanfbcsw\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1409547011,\"threshold\":1139171013,\"idleTimeExpiry\":923333650},{\"maximumRoutes\":1582673883,\"threshold\":1788188155,\"idleTimeExpiry\":778533068}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1638551145,\"threshold\":2005722569,\"idleTimeExpiry\":2082895999}]},\"lastOperation\":{\"details\":\"hqnucs\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\"},\"id\":\"tdlpbn\",\"name\":\"njg\",\"type\":\"zlsvbzfcpuoeed\"}") .toObject(InternalNetworkInner.class); - Assertions.assertEquals(525504138, model.vlanId()); - Assertions.assertEquals("dzulo", model.bgpConfiguration().annotation()); - Assertions.assertEquals(85439569, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1597212903, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1088975953, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(3699317304286967094L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("unlpirykycndz", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("eeonqlnfwm", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("kalehp", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("pnbonhpcz", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1301701466, - model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(353038412, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("senwphpzf", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("qjcli", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("qswbqerzwx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("txtd", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(529739852, model.mtu()); - Assertions.assertEquals("grijwaiufanrayb", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("spxlzde", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("gywezskiec", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("qfrojsydgrhyd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ah", model.importRoutePolicyId()); - Assertions.assertEquals("xalybxawoijpo", model.exportRoutePolicyId()); - Assertions.assertEquals("lxp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("wjdjodqhykin", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("emehllizh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("umoqodkad", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("yibngqladywrxwh", model.ingressAclId()); - Assertions.assertEquals("tlu", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); - Assertions.assertEquals("zsn", model.annotation()); + Assertions.assertEquals("smmd", model.properties().annotation()); + Assertions.assertEquals(897489101, model.properties().mtu()); + Assertions.assertEquals("pimcqrhn", model.properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("t", model.properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("zzoslpkyb", model.properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("glwkzpgajsqj", model.properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("dbtwaokbavly", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("aaknwfr", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("sm", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dujdigatoleksc", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("tnanqimwb", model.properties().ingressAclId()); + Assertions.assertEquals("pdcldpka", model.properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.properties().isMonitoringEnabled()); + Assertions.assertEquals(Extension.NPB, model.properties().extension()); + Assertions.assertEquals(460036043, model.properties().vlanId()); + Assertions.assertEquals("o", model.properties().bgpConfiguration().annotation()); + Assertions.assertEquals(936631865, + model.properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1531586160, model.properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(2118230542, model.properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(7154938367563838259L, model.properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("wswjrkbqsjh", model.properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("uyzwvbhlimbyqecr", + model.properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("ikcdrdaasax", + model.properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("yvymcnudndo", + model.properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("krdpqgfhyrfr", + model.properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + model.properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1395640980, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(963386262, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("bbmtlpqagynoip", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zcalincryq", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("prgukxrztiochl", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ixmqrudjizcbf", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NO_EXTENSION, model.properties().staticRouteConfiguration().extension()); + Assertions.assertEquals(1409547011, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1139171013, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(923333650, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1638551145, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2005722569, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2082895999, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkInner model = new InternalNetworkInner().withVlanId(525504138) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("dzulo") + InternalNetworkInner model = new InternalNetworkInner().withProperties(new InternalNetworkProperties() + .withAnnotation("smmd") + .withMtu(897489101) + .withConnectedIPv4Subnets(Arrays.asList(new ConnectedSubnet().withAnnotation("pimcqrhn").withPrefix("t"), + new ConnectedSubnet().withAnnotation("nklogxsvtzarhzv").withPrefix("nsqktc"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("zzoslpkyb").withPrefix("glwkzpgajsqj"), + new ConnectedSubnet().withAnnotation("mqbmfuvqarwz").withPrefix("uqrebluimmbwx"), + new ConnectedSubnet().withAnnotation("gtdmbvx").withPrefix("kraokq"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("dbtwaokbavly") + .withImportIpv6RoutePolicyId("aaknwfr")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("sm").withExportIpv6RoutePolicyId("dujdigatoleksc")) + .withIngressAclId("tnanqimwb") + .withEgressAclId("pdcldpka") + .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) + .withExtension(Extension.NPB) + .withVlanId(460036043) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("o") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(85439569).withMultiplier(1597212903)) + new BfdConfiguration().withIntervalInMilliSeconds(936631865).withMultiplier(1531586160)) .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1088975953) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(3699317304286967094L) - .withIpv4ListenRangePrefixes(Arrays.asList("unlpirykycndz", "qi", "jreuykbbmn", "aglt")) - .withIpv6ListenRangePrefixes(Arrays.asList("eeonqlnfwm", "ymvqdbpbhfckdvez", "rcssbzhddubbnq")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("kalehp"), - new NeighborAddress().withAddress("ugiqjtiogqg"), new NeighborAddress().withAddress("i"), - new NeighborAddress().withAddress("aj"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("pnbonhpcz"), - new NeighborAddress().withAddress("tp"), new NeighborAddress().withAddress("csehchkhufm"), - new NeighborAddress().withAddress("q")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() + .withAllowAS(2118230542) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerASN(7154938367563838259L) + .withIpv4ListenRangePrefixes(Arrays.asList("wswjrkbqsjh", "tqqvy", "scyrfwbivqv")) + .withIpv6ListenRangePrefixes(Arrays.asList("uyzwvbhlimbyqecr")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("ikcdrdaasax"), + new NeighborAddress().withAddress("iyjvz"), new NeighborAddress().withAddress("nvzmlnkoywsx"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("yvymcnudndo"), + new NeighborAddress().withAddress("weuipmpvksmi"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("krdpqgfhyrfr", "kkld", "rcwfcmfcnrjajq")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1301701466).withMultiplier(353038412)) - .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("senwphpzf") - .withNextHop(Arrays.asList("qjcli", "ftujwjjufw", "eqrkuorhtss", "uqnmdvhazcvj")))) + new BfdConfiguration().withIntervalInMilliSeconds(1395640980).withMultiplier(963386262)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("bbmtlpqagynoip").withNextHop(Arrays.asList("zcalincryq")), + new StaticRouteProperties().withPrefix("zxaqzibm") + .withNextHop(Arrays.asList("miymqruqguhfupet", "svvoqsbpkflanfk", "xsyaowuzowpuoh")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("qswbqerzwx").withNextHop(Arrays.asList("txtd", "ukvlb")), - new StaticRouteProperties().withPrefix("ktg") - .withNextHop(Arrays.asList("tyouambewreswmow", "gmmuteyxey")))) + new StaticRouteProperties().withPrefix("prgukxrztiochl") + .withNextHop(Arrays.asList("ixmqrudjizcbf", "mcrunfhiucn", "fbcpaqktkrumzu")), + new StaticRouteProperties().withPrefix("dkyzbfvxov") + .withNextHop(Arrays.asList("xiuxqggvqrnhy", "lwcjsqggjhffb", "rqrkijpeuqlsdx")), + new StaticRouteProperties().withPrefix("qztvx").withNextHop(Arrays.asList("wwmjs", "en", "wwa")), + new StaticRouteProperties().withPrefix("ecleqioulndhzyo") + .withNextHop(Arrays.asList("jhtollh", "vidmytzl", "glxpnovyoanfbcsw")))) .withExtension(Extension.NO_EXTENSION)) - .withMtu(529739852) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("grijwaiufanrayb").withPrefix("spxlzde"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("gywezskiec").withPrefix("qfrojsydgrhyd"), - new ConnectedSubnet().withAnnotation("zmxieqvdsmaklix").withPrefix("f"))) - .withImportRoutePolicyId("ah") - .withExportRoutePolicyId("xalybxawoijpo") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("lxp").withImportIpv6RoutePolicyId("wjdjodqhykin")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("emehllizh") - .withExportIpv6RoutePolicyId("umoqodkad")) - .withIngressAclId("yibngqladywrxwh") - .withEgressAclId("tlu") - .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withExtension(Extension.NPB) - .withAnnotation("zsn"); + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1409547011) + .withThreshold(1139171013) + .withIdleTimeExpiry(923333650), + new PrefixLimitProperties().withMaximumRoutes(1582673883) + .withThreshold(1788188155) + .withIdleTimeExpiry(778533068)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(1638551145) + .withThreshold(2005722569) + .withIdleTimeExpiry(2082895999))))); model = BinaryData.fromObject(model).toObject(InternalNetworkInner.class); - Assertions.assertEquals(525504138, model.vlanId()); - Assertions.assertEquals("dzulo", model.bgpConfiguration().annotation()); - Assertions.assertEquals(85439569, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1597212903, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1088975953, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(3699317304286967094L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("unlpirykycndz", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("eeonqlnfwm", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("kalehp", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("pnbonhpcz", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1301701466, - model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(353038412, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("senwphpzf", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("qjcli", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("qswbqerzwx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("txtd", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(529739852, model.mtu()); - Assertions.assertEquals("grijwaiufanrayb", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("spxlzde", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("gywezskiec", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("qfrojsydgrhyd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ah", model.importRoutePolicyId()); - Assertions.assertEquals("xalybxawoijpo", model.exportRoutePolicyId()); - Assertions.assertEquals("lxp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("wjdjodqhykin", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("emehllizh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("umoqodkad", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("yibngqladywrxwh", model.ingressAclId()); - Assertions.assertEquals("tlu", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); - Assertions.assertEquals("zsn", model.annotation()); + Assertions.assertEquals("smmd", model.properties().annotation()); + Assertions.assertEquals(897489101, model.properties().mtu()); + Assertions.assertEquals("pimcqrhn", model.properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("t", model.properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("zzoslpkyb", model.properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("glwkzpgajsqj", model.properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("dbtwaokbavly", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("aaknwfr", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("sm", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dujdigatoleksc", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("tnanqimwb", model.properties().ingressAclId()); + Assertions.assertEquals("pdcldpka", model.properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.properties().isMonitoringEnabled()); + Assertions.assertEquals(Extension.NPB, model.properties().extension()); + Assertions.assertEquals(460036043, model.properties().vlanId()); + Assertions.assertEquals("o", model.properties().bgpConfiguration().annotation()); + Assertions.assertEquals(936631865, + model.properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1531586160, model.properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(2118230542, model.properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(7154938367563838259L, model.properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("wswjrkbqsjh", model.properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("uyzwvbhlimbyqecr", + model.properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("ikcdrdaasax", + model.properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("yvymcnudndo", + model.properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("krdpqgfhyrfr", + model.properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + model.properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1395640980, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(963386262, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("bbmtlpqagynoip", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zcalincryq", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("prgukxrztiochl", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ixmqrudjizcbf", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NO_EXTENSION, model.properties().staticRouteConfiguration().extension()); + Assertions.assertEquals(1409547011, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1139171013, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(923333650, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1638551145, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2005722569, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(2082895999, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkListResultTests.java new file mode 100644 index 000000000000..11588102a56c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkListResultTests.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternalNetworkListResult; +import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; +import org.junit.jupiter.api.Assertions; + +public final class InternalNetworkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternalNetworkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"ydfbwlj\",\"mtu\":1349222127,\"connectedIPv4Subnets\":[{\"annotation\":\"k\",\"prefix\":\"ddvr\"},{\"annotation\":\"iegftc\",\"prefix\":\"biiftksdwgdnk\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"wdhcebuvczldb\",\"prefix\":\"lzoutbaaqgzekaj\"},{\"annotation\":\"yzgsnorbjgmnz\",\"prefix\":\"otvmrxk\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"bvvjbhvhdiq\",\"importIpv6RoutePolicyId\":\"fluiyuosnuud\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vhyibdrqrsw\",\"exportIpv6RoutePolicyId\":\"uubpyrow\"},\"ingressAclId\":\"oxztfwfqch\",\"egressAclId\":\"zevjnnctag\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"vlanId\":1802202883,\"bgpConfiguration\":{\"annotation\":\"emhzc\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":931266706,\"multiplier\":1772166324},\"defaultRouteOriginate\":\"True\",\"allowAS\":1773247882,\"allowASOverride\":\"Disable\",\"fabricASN\":6192469128810791309,\"peerASN\":4283733627417975099,\"ipv4ListenRangePrefixes\":[\"ckmzeoxin\",\"greohtwhlpuzjp\",\"eezn\",\"angp\"],\"ipv6ListenRangePrefixes\":[\"axyxzlbciphm\"],\"ipv4NeighborAddress\":[{}],\"ipv6NeighborAddress\":[{},{},{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"dktxfv\",\"nfee\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":311692177,\"multiplier\":813128962},\"ipv4Routes\":[{\"prefix\":\"zk\",\"nextHop\":[]},{\"prefix\":\"fwnwpiwx\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"crmpepk\",\"nextHop\":[]},{\"prefix\":\"dm\",\"nextHop\":[]},{\"prefix\":\"xxij\",\"nextHop\":[]},{\"prefix\":\"skwsdgkj\",\"nextHop\":[]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{}]},\"lastOperation\":{\"details\":\"efcvo\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\"},\"id\":\"wyxqiclad\",\"name\":\"atdavuqmcbyms\",\"type\":\"ob\"},{\"properties\":{\"annotation\":\"quvjez\",\"mtu\":1540352159,\"connectedIPv4Subnets\":[{\"annotation\":\"simi\",\"prefix\":\"yoi\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"iqwnnraclibbfq\",\"prefix\":\"spkladydgnhau\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"kexzgpmnmabeddqi\",\"importIpv6RoutePolicyId\":\"gdfpfqfpcvst\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qrvwerfwxbsm\",\"exportIpv6RoutePolicyId\":\"ljjehhcifkwdvb\"},\"ingressAclId\":\"rek\",\"egressAclId\":\"sqhtfpw\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NPB\",\"vlanId\":165970541,\"bgpConfiguration\":{\"annotation\":\"yqwdqi\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1398293324,\"multiplier\":15907399},\"defaultRouteOriginate\":\"False\",\"allowAS\":1670377019,\"allowASOverride\":\"Disable\",\"fabricASN\":5727563457985200075,\"peerASN\":3386089775389736460,\"ipv4ListenRangePrefixes\":[\"kfmkhcqtwmlmhjn\"],\"ipv6ListenRangePrefixes\":[\"eahjedv\"],\"ipv4NeighborAddress\":[{},{},{},{}],\"ipv6NeighborAddress\":[{},{},{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"xejhh\"],\"bmpConfigurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1434049145,\"multiplier\":1055914701},\"ipv4Routes\":[{\"prefix\":\"spgb\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"fbkkwvdxaexq\",\"nextHop\":[]},{\"prefix\":\"kmyrljialzbnobr\",\"nextHop\":[]},{\"prefix\":\"lpbcjtrpz\",\"nextHop\":[]},{\"prefix\":\"yudivbxnhsqeaeo\",\"nextHop\":[]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{},{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{}]},\"lastOperation\":{\"details\":\"zytzarogatmolj\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"zvfkneerz\",\"name\":\"trknsjulu\",\"type\":\"dybnh\"},{\"properties\":{\"annotation\":\"lelfjhkeizcpih\",\"mtu\":665194978,\"connectedIPv4Subnets\":[{\"annotation\":\"ekpt\",\"prefix\":\"caydbjzcqymlcfnz\"},{\"annotation\":\"hsurlgw\",\"prefix\":\"kpmmz\"},{\"annotation\":\"tauolawiubmom\",\"prefix\":\"gvvjhvvlr\"},{\"annotation\":\"hewjjmajnkdflqio\",\"prefix\":\"swaeqkzfz\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"shohto\",\"prefix\":\"ryegp\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"rmexznlwkb\",\"importIpv6RoutePolicyId\":\"kxkhupzerufgj\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"drmyfcemftzg\",\"exportIpv6RoutePolicyId\":\"kya\"},\"ingressAclId\":\"gekdfqnht\",\"egressAclId\":\"do\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"vlanId\":1130118194,\"bgpConfiguration\":{\"annotation\":\"nuxxrkkm\",\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":980453186,\"multiplier\":200833733},\"defaultRouteOriginate\":\"False\",\"allowAS\":785393837,\"allowASOverride\":\"Enable\",\"fabricASN\":3843731824605046510,\"peerASN\":2446882968191458283,\"ipv4ListenRangePrefixes\":[\"lw\"],\"ipv6ListenRangePrefixes\":[\"lusnawmhhgzotfr\"],\"ipv4NeighborAddress\":[{},{},{},{}],\"ipv6NeighborAddress\":[{},{},{}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"vzw\",\"xyxhighctxbxmo\",\"pcqydeykvsk\",\"cz\"],\"bmpConfigurationState\":\"Enabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2116012756,\"multiplier\":1772784576},\"ipv4Routes\":[{\"prefix\":\"bmsgycqsxrmdv\",\"nextHop\":[]},{\"prefix\":\"wuyqaeo\",\"nextHop\":[]},{\"prefix\":\"pjhgejkb\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"daurgho\",\"nextHop\":[]},{\"prefix\":\"xaex\",\"nextHop\":[]},{\"prefix\":\"k\",\"nextHop\":[]},{\"prefix\":\"xjxjoe\",\"nextHop\":[]}],\"extension\":\"NPB\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{},{},{},{}]},\"lastOperation\":{\"details\":\"bekt\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\"},\"id\":\"amicbigwcdgz\",\"name\":\"eznuxkeu\",\"type\":\"iraabmdlqjbedpf\"}],\"nextLink\":\"lhupmomihzbdnpxp\"}") + .toObject(InternalNetworkListResult.class); + Assertions.assertEquals("ydfbwlj", model.value().get(0).properties().annotation()); + Assertions.assertEquals(1349222127, model.value().get(0).properties().mtu()); + Assertions.assertEquals("k", model.value().get(0).properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("ddvr", model.value().get(0).properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("wdhcebuvczldb", + model.value().get(0).properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("lzoutbaaqgzekaj", + model.value().get(0).properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("bvvjbhvhdiq", + model.value().get(0).properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("fluiyuosnuud", + model.value().get(0).properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("vhyibdrqrsw", + model.value().get(0).properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("uubpyrow", + model.value().get(0).properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("oxztfwfqch", model.value().get(0).properties().ingressAclId()); + Assertions.assertEquals("zevjnnctag", model.value().get(0).properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.value().get(0).properties().isMonitoringEnabled()); + Assertions.assertEquals(Extension.NPB, model.value().get(0).properties().extension()); + Assertions.assertEquals(1802202883, model.value().get(0).properties().vlanId()); + Assertions.assertEquals("emhzc", model.value().get(0).properties().bgpConfiguration().annotation()); + Assertions.assertEquals(931266706, + model.value().get(0).properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1772166324, + model.value().get(0).properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.value().get(0).properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(1773247882, model.value().get(0).properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, + model.value().get(0).properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(4283733627417975099L, model.value().get(0).properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("ckmzeoxin", + model.value().get(0).properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("axyxzlbciphm", + model.value().get(0).properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("dktxfv", + model.value().get(0).properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.value().get(0).properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.value().get(0).properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + model.value().get(0).properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(311692177, + model.value().get(0).properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(813128962, + model.value().get(0).properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("zk", + model.value().get(0).properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("crmpepk", + model.value().get(0).properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals(Extension.NO_EXTENSION, + model.value().get(0).properties().staticRouteConfiguration().extension()); + Assertions.assertEquals("lhupmomihzbdnpxp", model.nextLink()); + } +} 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 index d91b59e9b9fb..8f68e591c39a 100644 --- 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 @@ -1,22 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -24,123 +31,158 @@ public final class InternalNetworkPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkPatchProperties model = BinaryData.fromString( - "{\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1340286391,\"multiplier\":2065842575},\"defaultRouteOriginate\":\"False\",\"allowAS\":1132415165,\"allowASOverride\":\"Enable\",\"fabricASN\":7575593636037986210,\"peerASN\":771473352350641992,\"ipv4ListenRangePrefixes\":[\"dphmtybkcgsuth\",\"llnmwyn\",\"fxexlfciatxtjrr\"],\"ipv6ListenRangePrefixes\":[\"dskjhhxdlaj\",\"oxcxscvslx\",\"hu\",\"vkrmukmyjmkx\"],\"ipv4NeighborAddress\":[{\"address\":\"slojfkqidnqt\",\"configurationState\":\"Rejected\"},{\"address\":\"hqxc\",\"configurationState\":\"ErrorDeprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"tnq\",\"configurationState\":\"Deprovisioned\"}],\"annotation\":\"ld\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1527865804,\"multiplier\":26223808},\"ipv4Routes\":[{\"prefix\":\"qkzn\",\"nextHop\":[\"hllxricctkw\"]},{\"prefix\":\"uqqoaj\",\"nextHop\":[\"iygle\",\"rwvaexhdc\",\"rceqnkbrupob\",\"hdmljz\"]},{\"prefix\":\"cvumepjpbi\",\"nextHop\":[\"zpphepif\",\"xleqircc\",\"cly\"]},{\"prefix\":\"cgxvrpj\",\"nextHop\":[\"czuod\",\"cpunettepdjx\",\"eskoy\"]}],\"ipv6Routes\":[{\"prefix\":\"ylpckaewsedv\",\"nextHop\":[\"kwxe\",\"qphr\"]},{\"prefix\":\"fn\",\"nextHop\":[\"ctmjtsghpbcbc\",\"zarpzeqacdldt\",\"mpypefcpczshnuq\"]}]},\"mtu\":830792514,\"connectedIPv4Subnets\":[{\"prefix\":\"upfkhuytuszxhmtv\",\"annotation\":\"egw\"},{\"prefix\":\"iukvzwydwt\",\"annotation\":\"aokgkskjivbsshaj\"},{\"prefix\":\"fukpeexpgeu\",\"annotation\":\"lh\"},{\"prefix\":\"uitrdexyiono\",\"annotation\":\"inbd\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"xcwqqrsmpc\",\"annotation\":\"prtug\"}],\"importRoutePolicyId\":\"bzbcyksiv\",\"exportRoutePolicyId\":\"ogd\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"fcmkr\",\"importIpv6RoutePolicyId\":\"sjcwjjxsgmbawvif\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"eci\",\"exportIpv6RoutePolicyId\":\"ocjxw\"},\"ingressAclId\":\"ooz\",\"egressAclId\":\"txvcm\",\"isMonitoringEnabled\":\"True\",\"annotation\":\"lcpx\"}") + "{\"annotation\":\"lefksxq\",\"mtu\":1414511629,\"connectedIPv4Subnets\":[{\"annotation\":\"xgnmqvzvluyq\",\"prefix\":\"aiossscyvaifp\"},{\"annotation\":\"acvfyeowps\",\"prefix\":\"x\"},{\"annotation\":\"dhsoymhpv\",\"prefix\":\"yqfttehdpboujst\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"dshx\",\"prefix\":\"dedsuenygnxcgjtf\"},{\"annotation\":\"quktrfnslnl\",\"prefix\":\"xsmyltrw\"},{\"annotation\":\"fmtbgwjdxwn\",\"prefix\":\"zkurrdreyzj\"},{\"annotation\":\"setwwjw\",\"prefix\":\"zqs\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"uukykcyqh\",\"importIpv6RoutePolicyId\":\"qzzdcykeyste\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pazdazgbsqgp\",\"exportIpv6RoutePolicyId\":\"q\"},\"ingressAclId\":\"utmdpvozg\",\"egressAclId\":\"jbkn\",\"isMonitoringEnabled\":\"True\",\"bgpConfiguration\":{\"annotation\":\"tzeyowmndcovd\",\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1722581941,\"multiplier\":177742602},\"defaultRouteOriginate\":\"False\",\"allowAS\":468774644,\"allowASOverride\":\"Enable\",\"fabricASN\":939898726848340069,\"peerASN\":7087082122819487728,\"ipv4ListenRangePrefixes\":[\"cpft\",\"udqyemeb\",\"naucmcirtnee\",\"mjauwcgx\"],\"ipv6ListenRangePrefixes\":[\"ohaitranizerwgud\"],\"ipv4NeighborAddress\":[{\"address\":\"ubvf\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioning\"},{\"address\":\"fhpri\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"aud\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"lregpq\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Failed\"}],\"ipv6NeighborAddress\":[{\"address\":\"vgysh\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Accepted\"},{\"address\":\"ewjzl\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioning\"},{\"address\":\"wjcayerzrr\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"ol\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioned\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"nkfscjfn\",\"jwvuag\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Disabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1720204625,\"multiplier\":1198731202},\"ipv4Routes\":[{\"prefix\":\"lzmijajwolxfsv\",\"nextHop\":[\"h\"]},{\"prefix\":\"pynwlslrcigtzjcv\",\"nextHop\":[\"qlapsnsso\",\"yxpavidnie\"]},{\"prefix\":\"wffcvvye\",\"nextHop\":[\"lpuxgcbdsvalpnpt\",\"trkxgpazwu\",\"x\"]}],\"ipv6Routes\":[{\"prefix\":\"njobfelhldiu\",\"nextHop\":[\"zgqlmfae\"]},{\"prefix\":\"z\",\"nextHop\":[\"udjpxpqht\",\"qhnmhk\"]},{\"prefix\":\"ezsdsuxheq\",\"nextHop\":[\"cruxspinym\",\"qgwokmikp\",\"zfbmjxuv\"]},{\"prefix\":\"ipfdvhaxdvwzaehp\",\"nextHop\":[\"thd\",\"lmv\",\"tatlakfqoi\",\"wgiksbbvtoo\"]}]},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":482470625,\"threshold\":956752947,\"idleTimeExpiry\":1271174821}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1683054179,\"threshold\":92297231,\"idleTimeExpiry\":691522256}]}}") .toObject(InternalNetworkPatchProperties.class); - Assertions.assertEquals("lcpx", model.annotation()); - Assertions.assertEquals("ld", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1340286391, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2065842575, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lefksxq", model.annotation()); + Assertions.assertEquals(1414511629, model.mtu()); + Assertions.assertEquals("xgnmqvzvluyq", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("aiossscyvaifp", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("dshx", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("dedsuenygnxcgjtf", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("uukykcyqh", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qzzdcykeyste", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("pazdazgbsqgp", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("q", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("utmdpvozg", model.ingressAclId()); + Assertions.assertEquals("jbkn", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals("tzeyowmndcovd", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1722581941, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(177742602, model.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1132415165, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(468774644, model.bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(771473352350641992L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("dphmtybkcgsuth", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("dskjhhxdlaj", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("slojfkqidnqt", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("tnq", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1527865804, + Assertions.assertEquals(7087082122819487728L, model.bgpConfiguration().peerASN()); + Assertions.assertEquals("cpft", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("ohaitranizerwgud", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("ubvf", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("vgysh", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("nkfscjfn", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1720204625, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(26223808, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qkzn", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hllxricctkw", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ylpckaewsedv", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kwxe", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(830792514, model.mtu()); - Assertions.assertEquals("egw", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("upfkhuytuszxhmtv", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("prtug", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xcwqqrsmpc", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("bzbcyksiv", model.importRoutePolicyId()); - Assertions.assertEquals("ogd", model.exportRoutePolicyId()); - Assertions.assertEquals("fcmkr", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("sjcwjjxsgmbawvif", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("eci", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ocjxw", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ooz", model.ingressAclId()); - Assertions.assertEquals("txvcm", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(1198731202, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lzmijajwolxfsv", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("h", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("njobfelhldiu", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zgqlmfae", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(482470625, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(956752947, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1271174821, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1683054179, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(92297231, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(691522256, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkPatchProperties model = new InternalNetworkPatchProperties().withAnnotation("lcpx") - .withBgpConfiguration(new BgpConfiguration().withAnnotation("ld") + InternalNetworkPatchProperties model = new InternalNetworkPatchProperties().withAnnotation("lefksxq") + .withMtu(1414511629) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("xgnmqvzvluyq").withPrefix("aiossscyvaifp"), + new ConnectedSubnetPatch().withAnnotation("acvfyeowps").withPrefix("x"), + new ConnectedSubnetPatch().withAnnotation("dhsoymhpv").withPrefix("yqfttehdpboujst"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("dshx").withPrefix("dedsuenygnxcgjtf"), + new ConnectedSubnetPatch().withAnnotation("quktrfnslnl").withPrefix("xsmyltrw"), + new ConnectedSubnetPatch().withAnnotation("fmtbgwjdxwn").withPrefix("zkurrdreyzj"), + new ConnectedSubnetPatch().withAnnotation("setwwjw").withPrefix("zqs"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("uukykcyqh") + .withImportIpv6RoutePolicyId("qzzdcykeyste")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("pazdazgbsqgp").withExportIpv6RoutePolicyId("q")) + .withIngressAclId("utmdpvozg") + .withEgressAclId("jbkn") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("tzeyowmndcovd") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1340286391).withMultiplier(2065842575)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(1722581941).withMultiplier(177742602)) .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1132415165) + .withAllowAS(468774644) .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(771473352350641992L) - .withIpv4ListenRangePrefixes(Arrays.asList("dphmtybkcgsuth", "llnmwyn", "fxexlfciatxtjrr")) - .withIpv6ListenRangePrefixes(Arrays.asList("dskjhhxdlaj", "oxcxscvslx", "hu", "vkrmukmyjmkx")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("slojfkqidnqt"), - new NeighborAddress().withAddress("hqxc"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("tnq")))) - .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withPeerASN(7087082122819487728L) + .withIpv4ListenRangePrefixes(Arrays.asList("cpft", "udqyemeb", "naucmcirtnee", "mjauwcgx")) + .withIpv6ListenRangePrefixes(Arrays.asList("ohaitranizerwgud")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("ubvf"), + new NeighborAddressPatch().withAddress("fhpri"), new NeighborAddressPatch().withAddress("aud"), + new NeighborAddressPatch().withAddress("lregpq"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("vgysh"), + new NeighborAddressPatch().withAddress("ewjzl"), + new NeighborAddressPatch().withAddress("wjcayerzrr"), new NeighborAddressPatch().withAddress("ol"))) + .withBmpConfiguration(new InternalNetworkBmpPatchProperties() + .withNeighborIpExclusions(Arrays.asList("nkfscjfn", "jwvuag")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1527865804).withMultiplier(26223808)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(1720204625).withMultiplier(1198731202)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("qkzn").withNextHop(Arrays.asList("hllxricctkw")), - new StaticRouteProperties().withPrefix("uqqoaj") - .withNextHop(Arrays.asList("iygle", "rwvaexhdc", "rceqnkbrupob", "hdmljz")), - new StaticRouteProperties().withPrefix("cvumepjpbi") - .withNextHop(Arrays.asList("zpphepif", "xleqircc", "cly")), - new StaticRouteProperties().withPrefix("cgxvrpj") - .withNextHop(Arrays.asList("czuod", "cpunettepdjx", "eskoy")))) + new StaticRoutePatchProperties().withPrefix("lzmijajwolxfsv").withNextHop(Arrays.asList("h")), + new StaticRoutePatchProperties().withPrefix("pynwlslrcigtzjcv") + .withNextHop(Arrays.asList("qlapsnsso", "yxpavidnie")), + new StaticRoutePatchProperties().withPrefix("wffcvvye") + .withNextHop(Arrays.asList("lpuxgcbdsvalpnpt", "trkxgpazwu", "x")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("ylpckaewsedv").withNextHop(Arrays.asList("kwxe", "qphr")), - new StaticRouteProperties().withPrefix("fn") - .withNextHop(Arrays.asList("ctmjtsghpbcbc", "zarpzeqacdldt", "mpypefcpczshnuq"))))) - .withMtu(830792514) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("egw").withPrefix("upfkhuytuszxhmtv"), - new ConnectedSubnet().withAnnotation("aokgkskjivbsshaj").withPrefix("iukvzwydwt"), - new ConnectedSubnet().withAnnotation("lh").withPrefix("fukpeexpgeu"), - new ConnectedSubnet().withAnnotation("inbd").withPrefix("uitrdexyiono"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("prtug").withPrefix("xcwqqrsmpc"))) - .withImportRoutePolicyId("bzbcyksiv") - .withExportRoutePolicyId("ogd") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("fcmkr") - .withImportIpv6RoutePolicyId("sjcwjjxsgmbawvif")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("eci").withExportIpv6RoutePolicyId("ocjxw")) - .withIngressAclId("ooz") - .withEgressAclId("txvcm") - .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE); + new StaticRoutePatchProperties().withPrefix("njobfelhldiu").withNextHop(Arrays.asList("zgqlmfae")), + new StaticRoutePatchProperties().withPrefix("z").withNextHop(Arrays.asList("udjpxpqht", "qhnmhk")), + new StaticRoutePatchProperties().withPrefix("ezsdsuxheq") + .withNextHop(Arrays.asList("cruxspinym", "qgwokmikp", "zfbmjxuv")), + new StaticRoutePatchProperties().withPrefix("ipfdvhaxdvwzaehp") + .withNextHop(Arrays.asList("thd", "lmv", "tatlakfqoi", "wgiksbbvtoo"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(482470625) + .withThreshold(956752947) + .withIdleTimeExpiry(1271174821)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(1683054179) + .withThreshold(92297231) + .withIdleTimeExpiry(691522256)))); model = BinaryData.fromObject(model).toObject(InternalNetworkPatchProperties.class); - Assertions.assertEquals("lcpx", model.annotation()); - Assertions.assertEquals("ld", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1340286391, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2065842575, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lefksxq", model.annotation()); + Assertions.assertEquals(1414511629, model.mtu()); + Assertions.assertEquals("xgnmqvzvluyq", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("aiossscyvaifp", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("dshx", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("dedsuenygnxcgjtf", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("uukykcyqh", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("qzzdcykeyste", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("pazdazgbsqgp", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("q", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("utmdpvozg", model.ingressAclId()); + Assertions.assertEquals("jbkn", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals("tzeyowmndcovd", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1722581941, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(177742602, model.bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1132415165, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(468774644, model.bgpConfiguration().allowAS()); Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(771473352350641992L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("dphmtybkcgsuth", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("dskjhhxdlaj", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("slojfkqidnqt", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("tnq", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1527865804, + Assertions.assertEquals(7087082122819487728L, model.bgpConfiguration().peerASN()); + Assertions.assertEquals("cpft", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("ohaitranizerwgud", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("ubvf", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("vgysh", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("nkfscjfn", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1720204625, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(26223808, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qkzn", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hllxricctkw", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ylpckaewsedv", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kwxe", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(830792514, model.mtu()); - Assertions.assertEquals("egw", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("upfkhuytuszxhmtv", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("prtug", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xcwqqrsmpc", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("bzbcyksiv", model.importRoutePolicyId()); - Assertions.assertEquals("ogd", model.exportRoutePolicyId()); - Assertions.assertEquals("fcmkr", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("sjcwjjxsgmbawvif", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("eci", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ocjxw", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ooz", model.ingressAclId()); - Assertions.assertEquals("txvcm", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(1198731202, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lzmijajwolxfsv", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("h", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("njobfelhldiu", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zgqlmfae", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(482470625, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(956752947, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1271174821, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1683054179, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(92297231, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(691522256, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 index f5af914d66cc..052a03460aec 100644 --- 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 @@ -1,22 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BgpPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -24,124 +32,200 @@ public final class InternalNetworkPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkPatch model = BinaryData.fromString( - "{\"properties\":{\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1115141290,\"multiplier\":1604281070},\"defaultRouteOriginate\":\"False\",\"allowAS\":1640336764,\"allowASOverride\":\"Enable\",\"fabricASN\":5940630190503622951,\"peerASN\":8920710926846800663,\"ipv4ListenRangePrefixes\":[\"uyvpirf\",\"jpnqnoowsbeden\"],\"ipv6ListenRangePrefixes\":[\"k\",\"bhxv\"],\"ipv4NeighborAddress\":[{\"address\":\"lgmnhjevdyzn\",\"configurationState\":\"Provisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"skmqozzkivyhj\",\"configurationState\":\"Failed\"},{\"address\":\"zji\",\"configurationState\":\"Accepted\"},{\"address\":\"hefkwabsolronqq\",\"configurationState\":\"Provisioning\"}],\"annotation\":\"lqxsjxtelex\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":267543853,\"multiplier\":95279837},\"ipv4Routes\":[{\"prefix\":\"qocarkuzlbc\",\"nextHop\":[\"dtsnxawqytllhdyz\",\"yckzex\",\"xak\",\"kywymxgaabj\"]},{\"prefix\":\"dtfohfaog\",\"nextHop\":[\"kiwrsiw\",\"y\",\"quryk\",\"rra\"]}],\"ipv6Routes\":[{\"prefix\":\"kcsueho\",\"nextHop\":[\"dac\",\"cbgydlqi\",\"ywmhmptyrilkfbnr\",\"qxvztpbnfnqtxjt\"]},{\"prefix\":\"m\",\"nextHop\":[\"swbnfddepldwqjns\",\"zygleexahvm\"]}]},\"mtu\":1943613509,\"connectedIPv4Subnets\":[{\"prefix\":\"rcarycsjj\",\"annotation\":\"voaqajuvehzptdmk\"},{\"prefix\":\"rbhmpfulubef\",\"annotation\":\"bpmfbfununmpzkrv\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"fkd\",\"annotation\":\"hlzvfictnkjj\"},{\"prefix\":\"gcwn\",\"annotation\":\"bkgfyrtogmhmjpjs\"},{\"prefix\":\"dfpdqwtygevg\",\"annotation\":\"sehar\"}],\"importRoutePolicyId\":\"fv\",\"exportRoutePolicyId\":\"rxtmbpjptnvw\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"sidqpxlbtpakft\",\"importIpv6RoutePolicyId\":\"atw\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yutrymd\",\"exportIpv6RoutePolicyId\":\"fj\"},\"ingressAclId\":\"y\",\"egressAclId\":\"jqdvdwkqpldrlefg\",\"isMonitoringEnabled\":\"False\",\"annotation\":\"uagntetaou\"}}") + "{\"properties\":{\"annotation\":\"xfavsqwudoh\",\"mtu\":1008413605,\"connectedIPv4Subnets\":[{\"annotation\":\"l\",\"prefix\":\"kpsimsfeypofqp\"},{\"annotation\":\"hyqgsdrmmttjx\",\"prefix\":\"phgerhsmvgoh\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"qilrixysfn\",\"prefix\":\"msqywwwmhkruwae\"},{\"annotation\":\"ympmlqoin\",\"prefix\":\"zduewihapfjii\"},{\"annotation\":\"jdiq\",\"prefix\":\"liejhpc\"},{\"annotation\":\"iedfsbwcei\",\"prefix\":\"bv\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"bwxgoooxzpra\",\"importIpv6RoutePolicyId\":\"s\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"npd\",\"exportIpv6RoutePolicyId\":\"igjsugswhgs\"},\"ingressAclId\":\"dkwwn\",\"egressAclId\":\"foct\",\"isMonitoringEnabled\":\"False\",\"bgpConfiguration\":{\"annotation\":\"quvwsxbgn\",\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1071926614,\"multiplier\":911806928},\"defaultRouteOriginate\":\"False\",\"allowAS\":2030836323,\"allowASOverride\":\"Disable\",\"fabricASN\":2314956286680195284,\"peerASN\":6803066730170588066,\"ipv4ListenRangePrefixes\":[\"bdsrgfajglzrsu\",\"klrxhjnltce\"],\"ipv6ListenRangePrefixes\":[\"vqy\",\"ie\"],\"ipv4NeighborAddress\":[{\"address\":\"aruwdxvqzxoebw\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"PendingCommit\"}],\"ipv6NeighborAddress\":[{\"address\":\"upwtz\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"xbzrpejplssanb\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioning\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"rswgkpjhboyikeb\",\"uhkslg\",\"lokhueoijyzcqyp\",\"qzufgsyfejyvdwt\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Disabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":480070787,\"multiplier\":851762558},\"ipv4Routes\":[{\"prefix\":\"mxsnxocuul\",\"nextHop\":[\"j\",\"poy\"]},{\"prefix\":\"g\",\"nextHop\":[\"djuxdbdljzgd\",\"rcvuqbsgzlrqhb\",\"nq\",\"gdxwbsfpyxx\"]}],\"ipv6Routes\":[{\"prefix\":\"flecominxojjl\",\"nextHop\":[\"xdhilz\",\"dzzqjmu\",\"za\",\"ovribq\"]},{\"prefix\":\"otokhtvwtaznk\",\"nextHop\":[\"wwxwjyofgw\"]}]},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1605579026,\"threshold\":1207000800,\"idleTimeExpiry\":1915912666},{\"maximumRoutes\":678839316,\"threshold\":1126812445,\"idleTimeExpiry\":1226069973},{\"maximumRoutes\":560914223,\"threshold\":708158668,\"idleTimeExpiry\":1547059533}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1781275613,\"threshold\":1718710790,\"idleTimeExpiry\":638292491},{\"maximumRoutes\":806037760,\"threshold\":1448014684,\"idleTimeExpiry\":2067090364},{\"maximumRoutes\":362770996,\"threshold\":2098126283,\"idleTimeExpiry\":322348568}]}}}") .toObject(InternalNetworkPatch.class); - Assertions.assertEquals("lqxsjxtelex", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1115141290, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1604281070, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1640336764, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(8920710926846800663L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("uyvpirf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("k", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("lgmnhjevdyzn", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("skmqozzkivyhj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(267543853, - model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(95279837, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qocarkuzlbc", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("dtsnxawqytllhdyz", - model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kcsueho", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("dac", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(1943613509, model.mtu()); - Assertions.assertEquals("voaqajuvehzptdmk", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("rcarycsjj", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("hlzvfictnkjj", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("fkd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("fv", model.importRoutePolicyId()); - Assertions.assertEquals("rxtmbpjptnvw", model.exportRoutePolicyId()); - Assertions.assertEquals("sidqpxlbtpakft", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("atw", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("yutrymd", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("y", model.ingressAclId()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - Assertions.assertEquals("uagntetaou", model.annotation()); + Assertions.assertEquals("xfavsqwudoh", model.properties().annotation()); + Assertions.assertEquals(1008413605, model.properties().mtu()); + Assertions.assertEquals("l", model.properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("kpsimsfeypofqp", model.properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("qilrixysfn", model.properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("msqywwwmhkruwae", model.properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("bwxgoooxzpra", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("s", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("npd", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("igjsugswhgs", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("dkwwn", model.properties().ingressAclId()); + Assertions.assertEquals("foct", model.properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.properties().isMonitoringEnabled()); + Assertions.assertEquals("quvwsxbgn", model.properties().bgpConfiguration().annotation()); + Assertions.assertEquals(1071926614, + model.properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(911806928, model.properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(2030836323, model.properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(6803066730170588066L, model.properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("bdsrgfajglzrsu", + model.properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("vqy", model.properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("aruwdxvqzxoebw", + model.properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("upwtz", model.properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("rswgkpjhboyikeb", + model.properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + model.properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(480070787, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(851762558, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("mxsnxocuul", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("j", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("flecominxojjl", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xdhilz", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1605579026, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1207000800, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1915912666, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1781275613, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1718710790, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(638292491, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkPatch model = new InternalNetworkPatch() - .withBgpConfiguration(new BgpConfiguration().withAnnotation("lqxsjxtelex") + InternalNetworkPatch model = new InternalNetworkPatch().withProperties(new InternalNetworkPatchProperties() + .withAnnotation("xfavsqwudoh") + .withMtu(1008413605) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("l").withPrefix("kpsimsfeypofqp"), + new ConnectedSubnetPatch().withAnnotation("hyqgsdrmmttjx").withPrefix("phgerhsmvgoh"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnetPatch().withAnnotation("qilrixysfn").withPrefix("msqywwwmhkruwae"), + new ConnectedSubnetPatch().withAnnotation("ympmlqoin").withPrefix("zduewihapfjii"), + new ConnectedSubnetPatch().withAnnotation("jdiq").withPrefix("liejhpc"), + new ConnectedSubnetPatch().withAnnotation("iedfsbwcei").withPrefix("bv"))) + .withImportRoutePolicy( + new ImportRoutePolicy().withImportIpv4RoutePolicyId("bwxgoooxzpra").withImportIpv6RoutePolicyId("s")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("npd").withExportIpv6RoutePolicyId("igjsugswhgs")) + .withIngressAclId("dkwwn") + .withEgressAclId("foct") + .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) + .withBgpConfiguration(new BgpPatchConfiguration().withAnnotation("quvwsxbgn") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1115141290).withMultiplier(1604281070)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(1071926614).withMultiplier(911806928)) .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1640336764) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(8920710926846800663L) - .withIpv4ListenRangePrefixes(Arrays.asList("uyvpirf", "jpnqnoowsbeden")) - .withIpv6ListenRangePrefixes(Arrays.asList("k", "bhxv")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("lgmnhjevdyzn"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("skmqozzkivyhj"), - new NeighborAddress().withAddress("zji"), new NeighborAddress().withAddress("hefkwabsolronqq")))) - .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withAllowAS(2030836323) + .withAllowASOverride(AllowASOverride.DISABLE) + .withPeerASN(6803066730170588066L) + .withIpv4ListenRangePrefixes(Arrays.asList("bdsrgfajglzrsu", "klrxhjnltce")) + .withIpv6ListenRangePrefixes(Arrays.asList("vqy", "ie")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("aruwdxvqzxoebw"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddressPatch().withAddress("upwtz"), + new NeighborAddressPatch().withAddress("xbzrpejplssanb"))) + .withBmpConfiguration(new InternalNetworkBmpPatchProperties() + .withNeighborIpExclusions( + Arrays.asList("rswgkpjhboyikeb", "uhkslg", "lokhueoijyzcqyp", "qzufgsyfejyvdwt")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.DISABLED)) + .withStaticRouteConfiguration(new StaticRoutePatchConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(267543853).withMultiplier(95279837)) + new BfdPatchConfiguration().withIntervalInMilliSeconds(480070787).withMultiplier(851762558)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("qocarkuzlbc") - .withNextHop(Arrays.asList("dtsnxawqytllhdyz", "yckzex", "xak", "kywymxgaabj")), - new StaticRouteProperties().withPrefix("dtfohfaog") - .withNextHop(Arrays.asList("kiwrsiw", "y", "quryk", "rra")))) + new StaticRoutePatchProperties().withPrefix("mxsnxocuul").withNextHop(Arrays.asList("j", "poy")), + new StaticRoutePatchProperties().withPrefix("g") + .withNextHop(Arrays.asList("djuxdbdljzgd", "rcvuqbsgzlrqhb", "nq", "gdxwbsfpyxx")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("kcsueho") - .withNextHop(Arrays.asList("dac", "cbgydlqi", "ywmhmptyrilkfbnr", "qxvztpbnfnqtxjt")), - new StaticRouteProperties().withPrefix("m") - .withNextHop(Arrays.asList("swbnfddepldwqjns", "zygleexahvm"))))) - .withMtu(1943613509) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("voaqajuvehzptdmk").withPrefix("rcarycsjj"), - new ConnectedSubnet().withAnnotation("bpmfbfununmpzkrv").withPrefix("rbhmpfulubef"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("hlzvfictnkjj").withPrefix("fkd"), - new ConnectedSubnet().withAnnotation("bkgfyrtogmhmjpjs").withPrefix("gcwn"), - new ConnectedSubnet().withAnnotation("sehar").withPrefix("dfpdqwtygevg"))) - .withImportRoutePolicyId("fv") - .withExportRoutePolicyId("rxtmbpjptnvw") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("sidqpxlbtpakft") - .withImportIpv6RoutePolicyId("atw")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("yutrymd").withExportIpv6RoutePolicyId("fj")) - .withIngressAclId("y") - .withEgressAclId("jqdvdwkqpldrlefg") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) - .withAnnotation("uagntetaou"); + new StaticRoutePatchProperties().withPrefix("flecominxojjl") + .withNextHop(Arrays.asList("xdhilz", "dzzqjmu", "za", "ovribq")), + new StaticRoutePatchProperties().withPrefix("otokhtvwtaznk") + .withNextHop(Arrays.asList("wwxwjyofgw"))))) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1605579026) + .withThreshold(1207000800) + .withIdleTimeExpiry(1915912666), + new PrefixLimitPatchProperties().withMaximumRoutes(678839316) + .withThreshold(1126812445) + .withIdleTimeExpiry(1226069973), + new PrefixLimitPatchProperties().withMaximumRoutes(560914223) + .withThreshold(708158668) + .withIdleTimeExpiry(1547059533)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(1781275613) + .withThreshold(1718710790) + .withIdleTimeExpiry(638292491), + new PrefixLimitPatchProperties().withMaximumRoutes(806037760) + .withThreshold(1448014684) + .withIdleTimeExpiry(2067090364), + new PrefixLimitPatchProperties().withMaximumRoutes(362770996) + .withThreshold(2098126283) + .withIdleTimeExpiry(322348568))))); model = BinaryData.fromObject(model).toObject(InternalNetworkPatch.class); - Assertions.assertEquals("lqxsjxtelex", model.bgpConfiguration().annotation()); - Assertions.assertEquals(1115141290, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1604281070, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1640336764, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(8920710926846800663L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("uyvpirf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("k", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("lgmnhjevdyzn", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("skmqozzkivyhj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(267543853, - model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(95279837, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("qocarkuzlbc", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("dtsnxawqytllhdyz", - model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kcsueho", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("dac", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(1943613509, model.mtu()); - Assertions.assertEquals("voaqajuvehzptdmk", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("rcarycsjj", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("hlzvfictnkjj", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("fkd", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("fv", model.importRoutePolicyId()); - Assertions.assertEquals("rxtmbpjptnvw", model.exportRoutePolicyId()); - Assertions.assertEquals("sidqpxlbtpakft", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("atw", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("yutrymd", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("y", model.ingressAclId()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - Assertions.assertEquals("uagntetaou", model.annotation()); + Assertions.assertEquals("xfavsqwudoh", model.properties().annotation()); + Assertions.assertEquals(1008413605, model.properties().mtu()); + Assertions.assertEquals("l", model.properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("kpsimsfeypofqp", model.properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("qilrixysfn", model.properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("msqywwwmhkruwae", model.properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("bwxgoooxzpra", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("s", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("npd", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("igjsugswhgs", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("dkwwn", model.properties().ingressAclId()); + Assertions.assertEquals("foct", model.properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.properties().isMonitoringEnabled()); + Assertions.assertEquals("quvwsxbgn", model.properties().bgpConfiguration().annotation()); + Assertions.assertEquals(1071926614, + model.properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(911806928, model.properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(2030836323, model.properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.DISABLE, model.properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(6803066730170588066L, model.properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("bdsrgfajglzrsu", + model.properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("vqy", model.properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("aruwdxvqzxoebw", + model.properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("upwtz", model.properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("rswgkpjhboyikeb", + model.properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + model.properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.DISABLED, + model.properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(480070787, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(851762558, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("mxsnxocuul", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("j", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("flecominxojjl", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xdhilz", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1605579026, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1207000800, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1915912666, + model.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1781275613, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1718710790, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(638292491, + model.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 ecdc7e4afb9a..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.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.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -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\":1321268747,\"connectedIPv4Subnets\":[{\"prefix\":\"ailfemjjzak\",\"annotation\":\"jiqul\"},{\"prefix\":\"qx\",\"annotation\":\"mvrscmqerndbrny\"},{\"prefix\":\"ofltfnnxrkadjfy\",\"annotation\":\"fmu\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"ri\",\"annotation\":\"ohykfkxbbcbrw\"},{\"prefix\":\"iutgnjizbeewoiy\",\"annotation\":\"vzbjuyrsrzi\"},{\"prefix\":\"c\",\"annotation\":\"xgbdsuifrevka\"}],\"importRoutePolicyId\":\"ezkiswqjmdghsypa\",\"exportRoutePolicyId\":\"bjufptbjczjnciu\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vldaswv\",\"importIpv6RoutePolicyId\":\"i\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zlgcndhzxrrf\",\"exportIpv6RoutePolicyId\":\"srhkhgsnxuwwkpph\"},\"ingressAclId\":\"sbzxl\",\"egressAclId\":\"xomeikjclwzacn\",\"isMonitoringEnabled\":\"False\"}") - .toObject(InternalNetworkPatchableProperties.class); - Assertions.assertEquals(1321268747, model.mtu()); - Assertions.assertEquals("jiqul", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ailfemjjzak", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ohykfkxbbcbrw", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("ri", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ezkiswqjmdghsypa", model.importRoutePolicyId()); - Assertions.assertEquals("bjufptbjczjnciu", model.exportRoutePolicyId()); - Assertions.assertEquals("vldaswv", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("i", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("zlgcndhzxrrf", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("srhkhgsnxuwwkpph", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("sbzxl", model.ingressAclId()); - Assertions.assertEquals("xomeikjclwzacn", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPatchableProperties model = new InternalNetworkPatchableProperties().withMtu(1321268747) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("jiqul").withPrefix("ailfemjjzak"), - new ConnectedSubnet().withAnnotation("mvrscmqerndbrny").withPrefix("qx"), - new ConnectedSubnet().withAnnotation("fmu").withPrefix("ofltfnnxrkadjfy"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("ohykfkxbbcbrw").withPrefix("ri"), - new ConnectedSubnet().withAnnotation("vzbjuyrsrzi").withPrefix("iutgnjizbeewoiy"), - new ConnectedSubnet().withAnnotation("xgbdsuifrevka").withPrefix("c"))) - .withImportRoutePolicyId("ezkiswqjmdghsypa") - .withExportRoutePolicyId("bjufptbjczjnciu") - .withImportRoutePolicy( - new ImportRoutePolicy().withImportIpv4RoutePolicyId("vldaswv").withImportIpv6RoutePolicyId("i")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("zlgcndhzxrrf") - .withExportIpv6RoutePolicyId("srhkhgsnxuwwkpph")) - .withIngressAclId("sbzxl") - .withEgressAclId("xomeikjclwzacn") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE); - model = BinaryData.fromObject(model).toObject(InternalNetworkPatchableProperties.class); - Assertions.assertEquals(1321268747, model.mtu()); - Assertions.assertEquals("jiqul", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ailfemjjzak", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ohykfkxbbcbrw", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("ri", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ezkiswqjmdghsypa", model.importRoutePolicyId()); - Assertions.assertEquals("bjufptbjczjnciu", model.exportRoutePolicyId()); - Assertions.assertEquals("vldaswv", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("i", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("zlgcndhzxrrf", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("srhkhgsnxuwwkpph", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("sbzxl", model.ingressAclId()); - Assertions.assertEquals("xomeikjclwzacn", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.isMonitoringEnabled()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesBgpConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesBgpConfigurationTests.java deleted file mode 100644 index 0bb1d894bc68..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesBgpConfigurationTests.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.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPropertiesBgpConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPropertiesBgpConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":479544259,\"multiplier\":2023428837},\"defaultRouteOriginate\":\"True\",\"allowAS\":313574832,\"allowASOverride\":\"Disable\",\"fabricASN\":9116002011177336524,\"peerASN\":6420721020164105387,\"ipv4ListenRangePrefixes\":[\"ncq\",\"azqicqchygtv\",\"byjanep\",\"bdpkxyqvgx\"],\"ipv6ListenRangePrefixes\":[\"detv\"],\"ipv4NeighborAddress\":[{\"address\":\"dxuwsaifm\",\"configurationState\":\"Succeeded\"},{\"address\":\"s\",\"configurationState\":\"PendingCommit\"},{\"address\":\"hg\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"cknjolgj\",\"configurationState\":\"Succeeded\"}],\"ipv6NeighborAddress\":[{\"address\":\"lszerqzevx\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"ntxwaljglzob\",\"configurationState\":\"Succeeded\"}],\"annotation\":\"afrqulhm\"}") - .toObject(InternalNetworkPropertiesBgpConfiguration.class); - Assertions.assertEquals("afrqulhm", model.annotation()); - Assertions.assertEquals(479544259, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2023428837, model.bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.defaultRouteOriginate()); - Assertions.assertEquals(313574832, model.allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); - Assertions.assertEquals(6420721020164105387L, model.peerAsn()); - Assertions.assertEquals("ncq", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("detv", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("dxuwsaifm", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("lszerqzevx", model.ipv6NeighborAddress().get(0).address()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPropertiesBgpConfiguration model - = new InternalNetworkPropertiesBgpConfiguration().withAnnotation("afrqulhm") - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(479544259).withMultiplier(2023428837)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(313574832) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(6420721020164105387L) - .withIpv4ListenRangePrefixes(Arrays.asList("ncq", "azqicqchygtv", "byjanep", "bdpkxyqvgx")) - .withIpv6ListenRangePrefixes(Arrays.asList("detv")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("dxuwsaifm"), - new NeighborAddress().withAddress("s"), new NeighborAddress().withAddress("hg"), - new NeighborAddress().withAddress("cknjolgj"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("lszerqzevx"), - new NeighborAddress().withAddress("ntxwaljglzob"))); - model = BinaryData.fromObject(model).toObject(InternalNetworkPropertiesBgpConfiguration.class); - Assertions.assertEquals("afrqulhm", model.annotation()); - Assertions.assertEquals(479544259, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2023428837, model.bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.defaultRouteOriginate()); - Assertions.assertEquals(313574832, model.allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); - Assertions.assertEquals(6420721020164105387L, model.peerAsn()); - Assertions.assertEquals("ncq", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("detv", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("dxuwsaifm", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("lszerqzevx", model.ipv6NeighborAddress().get(0).address()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.java deleted file mode 100644 index c613325ed00e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesStaticRouteConfigurationTests.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.Extension; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPropertiesStaticRouteConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPropertiesStaticRouteConfiguration model = BinaryData.fromString( - "{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":211674107,\"multiplier\":1331398488},\"ipv4Routes\":[{\"prefix\":\"qao\",\"nextHop\":[\"jrkc\",\"amgglvlmfejdoq\",\"ykglt\"]}],\"ipv6Routes\":[{\"prefix\":\"hqfgqkayejsx\",\"nextHop\":[\"gflwfgziiucijj\",\"eatlijjjrtvamcas\"]}]}") - .toObject(InternalNetworkPropertiesStaticRouteConfiguration.class); - Assertions.assertEquals(211674107, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1331398488, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qao", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("jrkc", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hqfgqkayejsx", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("gflwfgziiucijj", model.ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.extension()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPropertiesStaticRouteConfiguration model - = new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(211674107).withMultiplier(1331398488)) - .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("qao") - .withNextHop(Arrays.asList("jrkc", "amgglvlmfejdoq", "ykglt")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("hqfgqkayejsx") - .withNextHop(Arrays.asList("gflwfgziiucijj", "eatlijjjrtvamcas")))) - .withExtension(Extension.NO_EXTENSION); - model = BinaryData.fromObject(model).toObject(InternalNetworkPropertiesStaticRouteConfiguration.class); - Assertions.assertEquals(211674107, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1331398488, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("qao", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("jrkc", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hqfgqkayejsx", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("gflwfgziiucijj", model.ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, model.extension()); - } -} 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 index f3b8c0c6cb96..febf85d58bef 100644 --- 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 @@ -1,23 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BmpConfigurationState; 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.InternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -25,131 +32,174 @@ public final class InternalNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternalNetworkProperties model = BinaryData.fromString( - "{\"vlanId\":397269197,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":244721827,\"multiplier\":2037693383},\"defaultRouteOriginate\":\"False\",\"allowAS\":1284555207,\"allowASOverride\":\"Disable\",\"fabricASN\":8681531274121612481,\"peerASN\":2057762139557191940,\"ipv4ListenRangePrefixes\":[\"jdrqcrjidhftu\",\"vhdxlwyo\",\"bfqz\",\"kfnjyixhafrat\"],\"ipv6ListenRangePrefixes\":[\"bjroumzzn\",\"al\"],\"ipv4NeighborAddress\":[{\"address\":\"uzgfxonjtpusl\",\"configurationState\":\"Rejected\"},{\"address\":\"vtio\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"d\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"gryfqiuasig\",\"configurationState\":\"ErrorDeprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"nequy\",\"configurationState\":\"Accepted\"},{\"address\":\"oqgrmtqjkqevadr\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"uawvcmjzk\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"isczskoswo\",\"configurationState\":\"Rejected\"}],\"annotation\":\"zugamxzkrrcoiis\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":77234697,\"multiplier\":6478909},\"ipv4Routes\":[{\"prefix\":\"dsbezaxyfu\",\"nextHop\":[\"xuizhyhnepkpet\",\"arxqiubx\",\"ukecpx\",\"azvdhctmmkosz\"]},{\"prefix\":\"dblnsntrp\",\"nextHop\":[\"qkio\",\"kb\"]}],\"ipv6Routes\":[{\"prefix\":\"hklbnldpvcbh\",\"nextHop\":[\"zyqu\",\"usqxutrpbrr\"]},{\"prefix\":\"yuuatvlmbjwcolbm\",\"nextHop\":[\"b\",\"w\",\"pcpahprzrvxhmtf\"]}]},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"mtu\":1998287589,\"connectedIPv4Subnets\":[{\"prefix\":\"gxnoqrxtdis\",\"annotation\":\"evhdlmydid\"},{\"prefix\":\"hepfwwtjfdoes\",\"annotation\":\"hmwcdbck\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"kxkxhnegk\",\"annotation\":\"z\"},{\"prefix\":\"bhtmeplvuk\",\"annotation\":\"brlbpgs\"},{\"prefix\":\"bagn\",\"annotation\":\"jhgem\"}],\"importRoutePolicyId\":\"wakywalhjymxcgq\",\"exportRoutePolicyId\":\"gdrclssolj\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vtfycnlbvgjcodk\",\"importIpv6RoutePolicyId\":\"ji\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"s\",\"exportIpv6RoutePolicyId\":\"k\"},\"ingressAclId\":\"bcufqbvntn\",\"egressAclId\":\"mqso\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"annotation\":\"gnlykm\"}") + "{\"annotation\":\"cciklhs\",\"mtu\":1148982233,\"connectedIPv4Subnets\":[{\"annotation\":\"enxolr\",\"prefix\":\"yehqbeivdlhydwb\"},{\"annotation\":\"fgrlpun\",\"prefix\":\"tjlkesmmpathub\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"e\",\"prefix\":\"niiwllbvgwz\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"tedousnktjtgrava\",\"importIpv6RoutePolicyId\":\"gfkbebauzlqbtxx\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"h\",\"exportIpv6RoutePolicyId\":\"zudrtpzk\"},\"ingressAclId\":\"eboywhczzqrhm\",\"egressAclId\":\"qbedygisrzwn\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NoExtension\",\"vlanId\":605280163,\"bgpConfiguration\":{\"annotation\":\"lrmpwctofldse\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1176460687,\"multiplier\":324448147},\"defaultRouteOriginate\":\"True\",\"allowAS\":185461650,\"allowASOverride\":\"Enable\",\"fabricASN\":3500040767486559867,\"peerASN\":2118258542241192916,\"ipv4ListenRangePrefixes\":[\"fj\",\"rwq\",\"xet\"],\"ipv6ListenRangePrefixes\":[\"wvrrmdqn\"],\"ipv4NeighborAddress\":[{\"address\":\"awthvmaxgnu\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"dfjeceho\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioned\"}],\"ipv6NeighborAddress\":[{\"address\":\"sqrggvrbnyruko\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"jleip\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"ruzythqkkwhbg\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"nxdmnitmujdtv\",\"bfdAdministrativeState\":\"RMA\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"jpddn\",\"xfzuvrzmzqmzj\",\"rb\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1517522685,\"multiplier\":544160123},\"ipv4Routes\":[{\"prefix\":\"g\",\"nextHop\":[\"ohoqkpjtnqjilayw\",\"dcwmqsyrilmhxdqa\",\"lfylnkkbjpjvlyw\"]},{\"prefix\":\"tmfwobbjwhl\",\"nextHop\":[\"j\"]}],\"ipv6Routes\":[{\"prefix\":\"zocrdzgczeu\",\"nextHop\":[\"g\",\"dnc\",\"q\"]},{\"prefix\":\"tiekoifuvnyttz\",\"nextHop\":[\"xgyrihlgmgbehlqt\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1554991907,\"threshold\":669054786,\"idleTimeExpiry\":1122740327},{\"maximumRoutes\":87452704,\"threshold\":1190992939,\"idleTimeExpiry\":1375509338},{\"maximumRoutes\":2000997683,\"threshold\":1169131296,\"idleTimeExpiry\":731974427}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1320531554,\"threshold\":1527077625,\"idleTimeExpiry\":667893837},{\"maximumRoutes\":1145677834,\"threshold\":1409232817,\"idleTimeExpiry\":2032921622},{\"maximumRoutes\":1000118308,\"threshold\":621315737,\"idleTimeExpiry\":650310289},{\"maximumRoutes\":592883996,\"threshold\":1869461048,\"idleTimeExpiry\":1383360987}]},\"lastOperation\":{\"details\":\"vpefyc\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(InternalNetworkProperties.class); - Assertions.assertEquals("gnlykm", model.annotation()); - Assertions.assertEquals(397269197, model.vlanId()); - Assertions.assertEquals("zugamxzkrrcoiis", model.bgpConfiguration().annotation()); - Assertions.assertEquals(244721827, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2037693383, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1284555207, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(2057762139557191940L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("jdrqcrjidhftu", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("bjroumzzn", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("uzgfxonjtpusl", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("nequy", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(77234697, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(6478909, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("dsbezaxyfu", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xuizhyhnepkpet", + Assertions.assertEquals("cciklhs", model.annotation()); + Assertions.assertEquals(1148982233, model.mtu()); + Assertions.assertEquals("enxolr", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yehqbeivdlhydwb", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("e", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("niiwllbvgwz", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("tedousnktjtgrava", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("gfkbebauzlqbtxx", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("h", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("zudrtpzk", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("eboywhczzqrhm", model.ingressAclId()); + Assertions.assertEquals("qbedygisrzwn", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(Extension.NO_EXTENSION, model.extension()); + Assertions.assertEquals(605280163, model.vlanId()); + Assertions.assertEquals("lrmpwctofldse", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1176460687, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(324448147, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(185461650, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(2118258542241192916L, model.bgpConfiguration().peerASN()); + Assertions.assertEquals("fj", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("wvrrmdqn", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("awthvmaxgnu", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("sqrggvrbnyruko", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("jpddn", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1517522685, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(544160123, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("g", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ohoqkpjtnqjilayw", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hklbnldpvcbh", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("zyqu", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zocrdzgczeu", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("g", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(1998287589, model.mtu()); - Assertions.assertEquals("evhdlmydid", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gxnoqrxtdis", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("z", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("kxkxhnegk", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("wakywalhjymxcgq", model.importRoutePolicyId()); - Assertions.assertEquals("gdrclssolj", model.exportRoutePolicyId()); - Assertions.assertEquals("vtfycnlbvgjcodk", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ji", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("s", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("k", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("bcufqbvntn", model.ingressAclId()); - Assertions.assertEquals("mqso", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(1554991907, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(669054786, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1122740327, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1320531554, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1527077625, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(667893837, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternalNetworkProperties model = new InternalNetworkProperties().withAnnotation("gnlykm") - .withVlanId(397269197) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("zugamxzkrrcoiis") + InternalNetworkProperties model = new InternalNetworkProperties().withAnnotation("cciklhs") + .withMtu(1148982233) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("enxolr").withPrefix("yehqbeivdlhydwb"), + new ConnectedSubnet().withAnnotation("fgrlpun").withPrefix("tjlkesmmpathub"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("e").withPrefix("niiwllbvgwz"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("tedousnktjtgrava") + .withImportIpv6RoutePolicyId("gfkbebauzlqbtxx")) + .withExportRoutePolicy( + new ExportRoutePolicy().withExportIpv4RoutePolicyId("h").withExportIpv6RoutePolicyId("zudrtpzk")) + .withIngressAclId("eboywhczzqrhm") + .withEgressAclId("qbedygisrzwn") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withExtension(Extension.NO_EXTENSION) + .withVlanId(605280163) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("lrmpwctofldse") .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(244721827).withMultiplier(2037693383)) - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1284555207) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(2057762139557191940L) - .withIpv4ListenRangePrefixes(Arrays.asList("jdrqcrjidhftu", "vhdxlwyo", "bfqz", "kfnjyixhafrat")) - .withIpv6ListenRangePrefixes(Arrays.asList("bjroumzzn", "al")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("uzgfxonjtpusl"), - new NeighborAddress().withAddress("vtio"), new NeighborAddress().withAddress("d"), - new NeighborAddress().withAddress("gryfqiuasig"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("nequy"), - new NeighborAddress().withAddress("oqgrmtqjkqevadr"), - new NeighborAddress().withAddress("uawvcmjzk"), new NeighborAddress().withAddress("isczskoswo")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() + new BfdConfiguration().withIntervalInMilliSeconds(1176460687).withMultiplier(324448147)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(185461650) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerASN(2118258542241192916L) + .withIpv4ListenRangePrefixes(Arrays.asList("fj", "rwq", "xet")) + .withIpv6ListenRangePrefixes(Arrays.asList("wvrrmdqn")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("awthvmaxgnu"), + new NeighborAddress().withAddress("dfjeceho"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("sqrggvrbnyruko"), + new NeighborAddress().withAddress("jleip"), new NeighborAddress().withAddress("ruzythqkkwhbg"), + new NeighborAddress().withAddress("nxdmnitmujdtv"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions(Arrays.asList("jpddn", "xfzuvrzmzqmzj", "rb")) + .withBmpConfigurationState(BmpConfigurationState.DISABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.DISABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(77234697).withMultiplier(6478909)) + new BfdConfiguration().withIntervalInMilliSeconds(1517522685).withMultiplier(544160123)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("dsbezaxyfu") - .withNextHop(Arrays.asList("xuizhyhnepkpet", "arxqiubx", "ukecpx", "azvdhctmmkosz")), - new StaticRouteProperties().withPrefix("dblnsntrp").withNextHop(Arrays.asList("qkio", "kb")))) + new StaticRouteProperties().withPrefix("g") + .withNextHop(Arrays.asList("ohoqkpjtnqjilayw", "dcwmqsyrilmhxdqa", "lfylnkkbjpjvlyw")), + new StaticRouteProperties().withPrefix("tmfwobbjwhl").withNextHop(Arrays.asList("j")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("hklbnldpvcbh") - .withNextHop(Arrays.asList("zyqu", "usqxutrpbrr")), - new StaticRouteProperties().withPrefix("yuuatvlmbjwcolbm") - .withNextHop(Arrays.asList("b", "w", "pcpahprzrvxhmtf")))) + new StaticRouteProperties().withPrefix("zocrdzgczeu").withNextHop(Arrays.asList("g", "dnc", "q")), + new StaticRouteProperties().withPrefix("tiekoifuvnyttz") + .withNextHop(Arrays.asList("xgyrihlgmgbehlqt")))) .withExtension(Extension.NO_EXTENSION)) - .withMtu(1998287589) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("evhdlmydid").withPrefix("gxnoqrxtdis"), - new ConnectedSubnet().withAnnotation("hmwcdbck").withPrefix("hepfwwtjfdoes"))) - .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withAnnotation("z").withPrefix("kxkxhnegk"), - new ConnectedSubnet().withAnnotation("brlbpgs").withPrefix("bhtmeplvuk"), - new ConnectedSubnet().withAnnotation("jhgem").withPrefix("bagn"))) - .withImportRoutePolicyId("wakywalhjymxcgq") - .withExportRoutePolicyId("gdrclssolj") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("vtfycnlbvgjcodk") - .withImportIpv6RoutePolicyId("ji")) - .withExportRoutePolicy( - new ExportRoutePolicy().withExportIpv4RoutePolicyId("s").withExportIpv6RoutePolicyId("k")) - .withIngressAclId("bcufqbvntn") - .withEgressAclId("mqso") - .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) - .withExtension(Extension.NPB); + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1554991907) + .withThreshold(669054786) + .withIdleTimeExpiry(1122740327), + new PrefixLimitProperties().withMaximumRoutes(87452704) + .withThreshold(1190992939) + .withIdleTimeExpiry(1375509338), + new PrefixLimitProperties().withMaximumRoutes(2000997683) + .withThreshold(1169131296) + .withIdleTimeExpiry(731974427)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1320531554) + .withThreshold(1527077625) + .withIdleTimeExpiry(667893837), + new PrefixLimitProperties().withMaximumRoutes(1145677834) + .withThreshold(1409232817) + .withIdleTimeExpiry(2032921622), + new PrefixLimitProperties().withMaximumRoutes(1000118308) + .withThreshold(621315737) + .withIdleTimeExpiry(650310289), + new PrefixLimitProperties().withMaximumRoutes(592883996) + .withThreshold(1869461048) + .withIdleTimeExpiry(1383360987)))); model = BinaryData.fromObject(model).toObject(InternalNetworkProperties.class); - Assertions.assertEquals("gnlykm", model.annotation()); - Assertions.assertEquals(397269197, model.vlanId()); - Assertions.assertEquals("zugamxzkrrcoiis", model.bgpConfiguration().annotation()); - Assertions.assertEquals(244721827, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2037693383, model.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1284555207, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(2057762139557191940L, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("jdrqcrjidhftu", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("bjroumzzn", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("uzgfxonjtpusl", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("nequy", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(77234697, model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(6478909, model.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("dsbezaxyfu", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xuizhyhnepkpet", + Assertions.assertEquals("cciklhs", model.annotation()); + Assertions.assertEquals(1148982233, model.mtu()); + Assertions.assertEquals("enxolr", model.connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yehqbeivdlhydwb", model.connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("e", model.connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("niiwllbvgwz", model.connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("tedousnktjtgrava", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("gfkbebauzlqbtxx", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("h", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("zudrtpzk", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("eboywhczzqrhm", model.ingressAclId()); + Assertions.assertEquals("qbedygisrzwn", model.egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); + Assertions.assertEquals(Extension.NO_EXTENSION, model.extension()); + Assertions.assertEquals(605280163, model.vlanId()); + Assertions.assertEquals("lrmpwctofldse", model.bgpConfiguration().annotation()); + Assertions.assertEquals(1176460687, model.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(324448147, model.bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(185461650, model.bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); + Assertions.assertEquals(2118258542241192916L, model.bgpConfiguration().peerASN()); + Assertions.assertEquals("fj", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("wvrrmdqn", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("awthvmaxgnu", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("sqrggvrbnyruko", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("jpddn", model.bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, model.bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, model.bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1517522685, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(544160123, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("g", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ohoqkpjtnqjilayw", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hklbnldpvcbh", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("zyqu", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zocrdzgczeu", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("g", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, model.staticRouteConfiguration().extension()); - Assertions.assertEquals(1998287589, model.mtu()); - Assertions.assertEquals("evhdlmydid", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gxnoqrxtdis", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("z", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("kxkxhnegk", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("wakywalhjymxcgq", model.importRoutePolicyId()); - Assertions.assertEquals("gdrclssolj", model.exportRoutePolicyId()); - Assertions.assertEquals("vtfycnlbvgjcodk", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ji", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("s", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("k", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("bcufqbvntn", model.ingressAclId()); - Assertions.assertEquals("mqso", model.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, model.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.extension()); + Assertions.assertEquals(1554991907, model.nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(669054786, model.nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1122740327, model.nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1320531554, model.nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1527077625, model.nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(667893837, model.nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 index d1e45cb28d46..9074c6fc9b9b 100644 --- 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 @@ -1,28 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; 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.BmpConfigurationState; 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.InternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkProperties; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -34,108 +42,153 @@ public final class InternalNetworksCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"vlanId\":2065783866,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":153419128,\"multiplier\":1244711113},\"defaultRouteOriginate\":\"True\",\"allowAS\":429345111,\"allowASOverride\":\"Enable\",\"fabricASN\":2331153992242910204,\"peerASN\":7849127751955317721,\"ipv4ListenRangePrefixes\":[\"hob\",\"vyuepacoeroh\",\"xtigukfkbsyc\"],\"ipv6ListenRangePrefixes\":[\"mbnpeenlq\",\"qyv\",\"fb\",\"avqdvfjdsqephtos\"],\"ipv4NeighborAddress\":[{\"address\":\"arjwgu\",\"configurationState\":\"PendingCommit\"},{\"address\":\"xaeypyqoizf\",\"configurationState\":\"Deprovisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"qbwscjw\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"miflrvfe\",\"configurationState\":\"Succeeded\"},{\"address\":\"shwfrhhas\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"uznwwum\",\"configurationState\":\"Accepted\"}],\"annotation\":\"cilbwtpwbjlpfwuq\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":730470737,\"multiplier\":832295437},\"ipv4Routes\":[{\"prefix\":\"lizm\",\"nextHop\":[\"xghamrplanchqot\",\"mxlmxejwyvjzb\"]},{\"prefix\":\"wvtuek\",\"nextHop\":[\"ypqsmpsbeqie\",\"u\"]},{\"prefix\":\"hjuwndalnjjhrgkj\",\"nextHop\":[\"cpihlzyxvtajfj\",\"toidnekurdgcpzan\",\"qvengn\"]},{\"prefix\":\"uelrnanbrpkocu\",\"nextHop\":[\"bagegjtjltckiwx\",\"gfagijxmdbo\"]}],\"ipv6Routes\":[{\"prefix\":\"hxhahuq\",\"nextHop\":[\"nvzsodmokrqd\",\"sgkq\"]}]},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"mtu\":1930831324,\"connectedIPv4Subnets\":[{\"prefix\":\"yzzl\",\"annotation\":\"jhzppdb\"},{\"prefix\":\"bmc\",\"annotation\":\"o\"},{\"prefix\":\"prsmivapesbfz\",\"annotation\":\"ejrwwsfvt\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"xtmblm\",\"annotation\":\"leuo\"},{\"prefix\":\"elvsprbxjt\",\"annotation\":\"ujtoudodexwmvssr\"}],\"importRoutePolicyId\":\"iexuwemtg\",\"exportRoutePolicyId\":\"ebymmcgskscbsx\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"xicjojxolknsh\",\"importIpv6RoutePolicyId\":\"akptbhmbg\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"lbnatlnc\",\"exportIpv6RoutePolicyId\":\"zcdkxo\"},\"ingressAclId\":\"d\",\"egressAclId\":\"vhbujkaho\",\"isMonitoringEnabled\":\"True\",\"extension\":\"NPB\",\"annotation\":\"dzccqtwsrbfbsd\"},\"id\":\"cdzfbvexrv\",\"name\":\"h\",\"type\":\"mfsnqpvjtshl\"}"; + = "{\"properties\":{\"annotation\":\"jnn\",\"mtu\":104657338,\"connectedIPv4Subnets\":[{\"annotation\":\"hjenb\",\"prefix\":\"upfpllo\"},{\"annotation\":\"djffllrsfghyyeok\",\"prefix\":\"dzuddcccls\"},{\"annotation\":\"lcxxpmnypktgslk\",\"prefix\":\"kqaqgzcojgdqjh\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"jgpjnydkkgbvsqks\",\"prefix\":\"gkvga\"},{\"annotation\":\"rhrqqiwfysujc\",\"prefix\":\"hclgpexrxyrpwzsm\"},{\"annotation\":\"ebpsk\",\"prefix\":\"pcifdvt\"},{\"annotation\":\"ncnf\",\"prefix\":\"yjwjmyubhtmlgjai\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"mjdwirgl\",\"importIpv6RoutePolicyId\":\"bjgvmkawuuxbzfhu\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"k\",\"exportIpv6RoutePolicyId\":\"witzm\"},\"ingressAclId\":\"iglehylbnayyps\",\"egressAclId\":\"hoem\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"vlanId\":1489374017,\"bgpConfiguration\":{\"annotation\":\"pvfgukrx\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":777407861,\"multiplier\":903391420},\"defaultRouteOriginate\":\"True\",\"allowAS\":1338000656,\"allowASOverride\":\"Enable\",\"fabricASN\":5065824331626095860,\"peerASN\":4364964946149893970,\"ipv4ListenRangePrefixes\":[\"krum\",\"aeqbo\",\"gwjxatwxiyarfhi\"],\"ipv6ListenRangePrefixes\":[\"tidzvvndpr\",\"ruexhgdh\",\"kplaseyltqx\",\"pfopekyzdzvhyoid\"],\"ipv4NeighborAddress\":[{\"address\":\"yj\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"},{\"address\":\"sifixolvny\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Accepted\"},{\"address\":\"puayxtvpi\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"j\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"}],\"ipv6NeighborAddress\":[{\"address\":\"eegiczrvnez\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"},{\"address\":\"phf\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"},{\"address\":\"jmgswtwms\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Rejected\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"rkxe\",\"kqv\",\"agnzbkq\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":634549734,\"multiplier\":1660850140},\"ipv4Routes\":[{\"prefix\":\"uw\",\"nextHop\":[\"uepanqdmm\",\"odp\",\"tblmxblcbwvsqp\"]},{\"prefix\":\"avlcbb\",\"nextHop\":[\"epcgirsfilxusyzc\"]},{\"prefix\":\"xjvipehxlbbur\",\"nextHop\":[\"ovgjipbnnghs\",\"xwjnwgoxenhpyix\",\"brsaeuzsojblyygf\",\"icuydrswq\"]},{\"prefix\":\"teuyqtzo\",\"nextHop\":[\"otrbnvoe\",\"httoqoafdvxrl\",\"srfrxylmdjp\"]}],\"ipv6Routes\":[{\"prefix\":\"pkpcvhqadjc\",\"nextHop\":[\"ncgquixu\",\"vatstkvo\",\"vcktj\",\"cjkexybxyrc\"]},{\"prefix\":\"gptx\",\"nextHop\":[\"hyunwm\",\"fjjsel\",\"lwmfudpntps\"]},{\"prefix\":\"fm\",\"nextHop\":[\"tytrivfle\",\"vefnzv\"]}],\"extension\":\"NPB\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":64916924,\"threshold\":2136602258,\"idleTimeExpiry\":264006500},{\"maximumRoutes\":1616604324,\"threshold\":777618824,\"idleTimeExpiry\":130802880},{\"maximumRoutes\":93911031,\"threshold\":397760785,\"idleTimeExpiry\":1117878854}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1146479822,\"threshold\":2017513156,\"idleTimeExpiry\":1966189663},{\"maximumRoutes\":955161866,\"threshold\":1761039987,\"idleTimeExpiry\":566256487},{\"maximumRoutes\":1308646323,\"threshold\":167167076,\"idleTimeExpiry\":344739031},{\"maximumRoutes\":588956796,\"threshold\":2065055288,\"idleTimeExpiry\":1169863114}]},\"lastOperation\":{\"details\":\"crtv\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"xlui\",\"name\":\"a\",\"type\":\"qwbrfiovpdlt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - InternalNetwork response = manager.internalNetworks() - .define("nhdikatzmtuvfn") - .withExistingL3IsolationDomain("eqcrjv", "jskqsfnmiwapd") - .withVlanId(1678496031) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("wfogbv") - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2133761517).withMultiplier(1219338426)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(830031798) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(1457459029942100829L) - .withIpv4ListenRangePrefixes(Arrays.asList("odincfbaoboiahk", "psvax", "ksaxyeedvpmodkt")) - .withIpv6ListenRangePrefixes(Arrays.asList("ydvvgkmorbpcjesf", "vuztnsvmsh", "kg", "gf")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("ehhlclpkryrcbmjj"), - new NeighborAddress().withAddress("ivrfnztx"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("tjviilohlgrjc"), - new NeighborAddress().withAddress("hz")))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(965402508).withMultiplier(1411400151)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("uomsxhdkhmemxk") - .withNextHop(Arrays.asList("apesnbyoullyfz", "nxrmxxjv", "batjgzkm")), - new StaticRouteProperties().withPrefix("fwzlmpx").withNextHop(Arrays.asList("djsiommdz")))) - .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("ulxrcbdnpfcg") - .withNextHop(Arrays.asList("ttowqx", "cpbzxpz", "oovhatiywtcvzu")), - new StaticRouteProperties().withPrefix("pkfeomotquqlqe").withNextHop(Arrays.asList("sgqp")), - new StaticRouteProperties().withPrefix("k") - .withNextHop(Arrays.asList("pfv", "sqmmetwtlafnkjte", "bdpnuvhgcgrllyy", "smocbxhrchm")), - new StaticRouteProperties().withPrefix("tvzhu") - .withNextHop(Arrays.asList("dykg", "skwvb", "cawwayqtsrn", "otgnmzebcreluedc")))) - .withExtension(Extension.NPB)) - .withMtu(721985116) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("jklfsdntkqiym").withPrefix("hllxwknoo"), - new ConnectedSubnet().withAnnotation("dlhmks").withPrefix("ddslwnl"), - new ConnectedSubnet().withAnnotation("pm").withPrefix("ybnnnlpqdnnska"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("rndzzywxqr").withPrefix("wknrdvvmb"), - new ConnectedSubnet().withAnnotation("tnnefputlkszuxjm").withPrefix("qxtkd"), - new ConnectedSubnet().withAnnotation("a").withPrefix("zs"), - new ConnectedSubnet().withAnnotation("fguamrvamu").withPrefix("fwqjzybmfqdnpp"))) - .withImportRoutePolicyId("gdwpjbb") - .withExportRoutePolicyId("kgc") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("spjvsyydjlhd") - .withImportIpv6RoutePolicyId("csqvyee")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("ulojwumfjdymeq") - .withExportIpv6RoutePolicyId("xpfyxdjspnonx")) - .withIngressAclId("hq") - .withEgressAclId("hnatwvgcmcvdjl") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) - .withExtension(Extension.NO_EXTENSION) - .withAnnotation("twllqypmjc") - .create(); + InternalNetwork response + = manager.internalNetworks() + .define("iihrfcowlase") + .withExistingL3IsolationDomain("bxlepsmckgpxdx", "cqmguvdk") + .withProperties( + new InternalNetworkProperties().withAnnotation("fywxjjylaqhxevf") + .withMtu(1511567540) + .withConnectedIPv4Subnets(Arrays.asList( + new ConnectedSubnet().withAnnotation("wgkynxlwrjgot").withPrefix("tmcktkalhpiy"), + new ConnectedSubnet().withAnnotation("nkylzrignql").withPrefix("og"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("uaiuvemqcb").withPrefix("kivexiathmar"), + new ConnectedSubnet().withAnnotation("wyfcenkbfxqcap").withPrefix("geciradmxokbutbb"))) + .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("zay") + .withImportIpv6RoutePolicyId("sejdhrodyiitr")) + .withExportRoutePolicy(new ExportRoutePolicy() + .withExportIpv4RoutePolicyId("jtgoppybsec") + .withExportIpv6RoutePolicyId("a")) + .withIngressAclId("hasz") + .withEgressAclId("etfstdwqdvz") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withExtension(Extension.NO_EXTENSION) + .withVlanId(2050100407) + .withBgpConfiguration(new BgpConfiguration().withAnnotation("tkreisojhuswm") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(1482722257) + .withMultiplier(1919720321)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(1421924886) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerASN(5677872760193987402L) + .withIpv4ListenRangePrefixes(Arrays.asList("tebwedjri", "zppgij")) + .withIpv6ListenRangePrefixes(Arrays.asList("ba")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("pgaxpydemccqdss"), + new NeighborAddress().withAddress("dhnhs"))) + .withIpv6NeighborAddress( + Arrays.asList(new NeighborAddress().withAddress("uhxyksfyzevckngl"), + new NeighborAddress().withAddress("sffrpjfxsyx"))) + .withBmpConfiguration(new InternalNetworkBmpProperties() + .withNeighborIpExclusions( + Arrays.asList("frspreyilqc", "kxkteoykqrqtxqog", "ddimnacklyrb", "mbdgexpnphtq")) + .withBmpConfigurationState(BmpConfigurationState.ENABLED)) + .withV4OverV6BgpSession(V4OverV6BgpSessionState.ENABLED) + .withV6OverV4BgpSession(V6OverV4BgpSessionState.ENABLED)) + .withStaticRouteConfiguration(new StaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(703316376).withMultiplier(1940849538)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("jlfugnrzowcgrz") + .withNextHop(Arrays.asList("q", "ozawqxn", "lva")), + new StaticRouteProperties().withPrefix("ugwxdwtfmfjk") + .withNextHop(Arrays.asList("plhaljomgzo", "prraptvbjenylgeb", "snvofuyz")), + new StaticRouteProperties().withPrefix("bploazccghgermma") + .withNextHop(Arrays.asList("bxui", "soawxugpu")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("kwxzmuzg") + .withNextHop(Arrays.asList("uygpbhauhe")), + new StaticRouteProperties().withPrefix("msw").withNextHop(Arrays.asList("ygx")), + new StaticRouteProperties().withPrefix("z") + .withNextHop(Arrays.asList("rnqwdjvlwqzxyyl", "sfxqcmejezjcb")))) + .withExtension(Extension.NO_EXTENSION)) + .withNativeIpv4PrefixLimit(new NativeIpv4PrefixLimitProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitProperties().withMaximumRoutes(2117314492) + .withThreshold(36675023) + .withIdleTimeExpiry(1002429553)))) + .withNativeIpv6PrefixLimit(new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(1376032007) + .withThreshold(1358708631) + .withIdleTimeExpiry(600356946), + new PrefixLimitProperties().withMaximumRoutes(631184856) + .withThreshold(1072864140) + .withIdleTimeExpiry(1125048143), + new PrefixLimitProperties().withMaximumRoutes(1783066324) + .withThreshold(559087611) + .withIdleTimeExpiry(875719141))))) + .create(); - Assertions.assertEquals(2065783866, response.vlanId()); - Assertions.assertEquals("cilbwtpwbjlpfwuq", response.bgpConfiguration().annotation()); - Assertions.assertEquals(153419128, response.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1244711113, response.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(429345111, response.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, response.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(7849127751955317721L, response.bgpConfiguration().peerAsn()); - Assertions.assertEquals("hob", response.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("mbnpeenlq", response.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("arjwgu", response.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("qbwscjw", response.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(730470737, - response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(832295437, response.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("lizm", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xghamrplanchqot", - response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hxhahuq", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("nvzsodmokrqd", - response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, response.staticRouteConfiguration().extension()); - Assertions.assertEquals(1930831324, response.mtu()); - Assertions.assertEquals("jhzppdb", response.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("yzzl", response.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("leuo", response.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xtmblm", response.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("iexuwemtg", response.importRoutePolicyId()); - Assertions.assertEquals("ebymmcgskscbsx", response.exportRoutePolicyId()); - Assertions.assertEquals("xicjojxolknsh", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("akptbhmbg", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("lbnatlnc", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("zcdkxo", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("d", response.ingressAclId()); - Assertions.assertEquals("vhbujkaho", response.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.TRUE, response.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, response.extension()); - Assertions.assertEquals("dzccqtwsrbfbsd", response.annotation()); + Assertions.assertEquals("jnn", response.properties().annotation()); + Assertions.assertEquals(104657338, response.properties().mtu()); + Assertions.assertEquals("hjenb", response.properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("upfpllo", response.properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("jgpjnydkkgbvsqks", response.properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("gkvga", response.properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("mjdwirgl", response.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("bjgvmkawuuxbzfhu", + response.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("k", response.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("witzm", response.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("iglehylbnayyps", response.properties().ingressAclId()); + Assertions.assertEquals("hoem", response.properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.properties().isMonitoringEnabled()); + Assertions.assertEquals(Extension.NO_EXTENSION, response.properties().extension()); + Assertions.assertEquals(1489374017, response.properties().vlanId()); + Assertions.assertEquals("pvfgukrx", response.properties().bgpConfiguration().annotation()); + Assertions.assertEquals(777407861, + response.properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(903391420, response.properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(1338000656, response.properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, response.properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(4364964946149893970L, response.properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("krum", response.properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("tidzvvndpr", + response.properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("yj", response.properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("eegiczrvnez", + response.properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("rkxe", + response.properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + response.properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + response.properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(634549734, + response.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1660850140, + response.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("uw", response.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("uepanqdmm", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("pkpcvhqadjc", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ncgquixu", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, response.properties().staticRouteConfiguration().extension()); + Assertions.assertEquals(64916924, + response.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2136602258, + response.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(264006500, + response.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1146479822, + response.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(2017513156, + response.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1966189663, + response.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 index 8f741af9b890..20f23a6c829a 100644 --- 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 @@ -1,20 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,54 +28,83 @@ public final class InternalNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"vlanId\":23127857,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1179284056,\"multiplier\":1230517100},\"defaultRouteOriginate\":\"False\",\"allowAS\":176785876,\"allowASOverride\":\"Disable\",\"fabricASN\":3202778725632733690,\"peerASN\":8191108194055206264,\"ipv4ListenRangePrefixes\":[\"shoxfzzjd\",\"upbusxyugoz\",\"plxzg\"],\"ipv6ListenRangePrefixes\":[\"notiixkkbyg\",\"giq\"],\"ipv4NeighborAddress\":[{\"address\":\"hybbnhttyizonzs\",\"configurationState\":\"DeferredControl\"},{\"address\":\"o\",\"configurationState\":\"Provisioned\"}],\"ipv6NeighborAddress\":[{\"address\":\"z\",\"configurationState\":\"Succeeded\"},{\"address\":\"ciuoxyipdthjfvn\",\"configurationState\":\"Succeeded\"},{\"address\":\"nsputfe\",\"configurationState\":\"Deprovisioned\"},{\"address\":\"nufssjgbfbbachxx\",\"configurationState\":\"Deprovisioned\"}],\"annotation\":\"nfnbphceeivkb\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1354197629,\"multiplier\":2080962665},\"ipv4Routes\":[{\"prefix\":\"pvtwttfsclg\",\"nextHop\":[\"gygn\",\"bfytnhdnihuzzjuz\",\"wgbzdtorbi\",\"nyfzdpxct\"]},{\"prefix\":\"ucrxdtejob\",\"nextHop\":[\"rlwtidcnzal\",\"m\",\"upjhltyl\",\"uudvbgvzlzjsb\"]}],\"ipv6Routes\":[{\"prefix\":\"utzaziydpoknsea\",\"nextHop\":[\"bdqraokd\",\"rluob\"]},{\"prefix\":\"valqwzkny\",\"nextHop\":[\"xysvclfjyclvild\"]}]},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"mtu\":1930619530,\"connectedIPv4Subnets\":[{\"prefix\":\"fqpfildcgb\",\"annotation\":\"uzfbp\"},{\"prefix\":\"cryvidbzdylbvj\",\"annotation\":\"gngwn\"},{\"prefix\":\"jftecgprzsqmp\",\"annotation\":\"cakz\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"haa\",\"annotation\":\"xoyxuuco\"},{\"prefix\":\"usyrux\",\"annotation\":\"hhlhrvmgs\"}],\"importRoutePolicyId\":\"gmnc\",\"exportRoutePolicyId\":\"tpiforomppz\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"qmeu\",\"importIpv6RoutePolicyId\":\"lfcmpuaiugoceqtl\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jymwiccu\",\"exportIpv6RoutePolicyId\":\"cfunlakgixhqjqh\"},\"ingressAclId\":\"wb\",\"egressAclId\":\"iwtwfgoc\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"annotation\":\"nnzu\"},\"id\":\"bkyy\",\"name\":\"syweohlmtsnvon\",\"type\":\"bftswcd\"}"; + = "{\"properties\":{\"annotation\":\"yqmlmwjwsmnwbm\",\"mtu\":48093140,\"connectedIPv4Subnets\":[{\"annotation\":\"riy\",\"prefix\":\"yvquesxplcs\"},{\"annotation\":\"bul\",\"prefix\":\"lxxhcynnmv\"},{\"annotation\":\"zvkwqqpw\",\"prefix\":\"idsjqc\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"rtfdlgp\",\"prefix\":\"yyjlikalbcyuwah\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"gvaidzcephnh\",\"importIpv6RoutePolicyId\":\"hgyfzkhismrwpeki\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"bpertjpairpwjm\",\"exportIpv6RoutePolicyId\":\"iwsywp\"},\"ingressAclId\":\"tvqopugrse\",\"egressAclId\":\"iuztqefzy\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"vlanId\":1433779054,\"bgpConfiguration\":{\"annotation\":\"cendidhue\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1215809484,\"multiplier\":1468425896},\"defaultRouteOriginate\":\"False\",\"allowAS\":1196676353,\"allowASOverride\":\"Enable\",\"fabricASN\":2296811606512416749,\"peerASN\":7965907281600247966,\"ipv4ListenRangePrefixes\":[\"kiwmqnwmytcc\",\"irgyutexnzh\",\"mcgvjb\"],\"ipv6ListenRangePrefixes\":[\"far\"],\"ipv4NeighborAddress\":[{\"address\":\"qcud\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Failed\"},{\"address\":\"jjhq\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"PendingCommit\"},{\"address\":\"oy\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"uqxyx\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Provisioning\"}],\"ipv6NeighborAddress\":[{\"address\":\"vravntvklkwqi\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"etotktd\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"z\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioned\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"xxregykjmpadbz\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Enabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":703886783,\"multiplier\":1568661831},\"ipv4Routes\":[{\"prefix\":\"rpquafxg\",\"nextHop\":[\"qbactffxd\"]},{\"prefix\":\"isi\",\"nextHop\":[\"mwafapctglj\",\"pizqqihvbkufq\"]}],\"ipv6Routes\":[{\"prefix\":\"djynpgomzmkjp\",\"nextHop\":[\"lfpsvrljl\"]}],\"extension\":\"NPB\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1914352107,\"threshold\":886296375,\"idleTimeExpiry\":1130099900}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":524970466,\"threshold\":1675301560,\"idleTimeExpiry\":1127302338},{\"maximumRoutes\":1159716522,\"threshold\":1499926026,\"idleTimeExpiry\":2040872406}]},\"lastOperation\":{\"details\":\"vkparskplqft\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"},\"id\":\"dcy\",\"name\":\"gul\",\"type\":\"llfwrmsuxyq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternalNetwork response = manager.internalNetworks() - .getWithResponse("syzfeoctrzjw", "zwckzebmbvwdxgyy", "mxqzl", com.azure.core.util.Context.NONE) + .getWithResponse("ctpqnofkw", "gyzwfyfdbvoo", "lmikdsqqykgjjsmv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(23127857, response.vlanId()); - Assertions.assertEquals("nfnbphceeivkb", response.bgpConfiguration().annotation()); - Assertions.assertEquals(1179284056, response.bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1230517100, response.bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, response.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(176785876, response.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, response.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(8191108194055206264L, response.bgpConfiguration().peerAsn()); - Assertions.assertEquals("shoxfzzjd", response.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("notiixkkbyg", response.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("hybbnhttyizonzs", response.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("z", response.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1354197629, - response.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2080962665, response.staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("pvtwttfsclg", response.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gygn", response.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("utzaziydpoknsea", response.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("bdqraokd", response.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals(Extension.NO_EXTENSION, response.staticRouteConfiguration().extension()); - Assertions.assertEquals(1930619530, response.mtu()); - Assertions.assertEquals("uzfbp", response.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("fqpfildcgb", response.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("xoyxuuco", response.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("haa", response.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("gmnc", response.importRoutePolicyId()); - Assertions.assertEquals("tpiforomppz", response.exportRoutePolicyId()); - Assertions.assertEquals("qmeu", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("lfcmpuaiugoceqtl", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jymwiccu", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("cfunlakgixhqjqh", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("wb", response.ingressAclId()); - Assertions.assertEquals("iwtwfgoc", response.egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.isMonitoringEnabled()); - Assertions.assertEquals(Extension.NO_EXTENSION, response.extension()); - Assertions.assertEquals("nnzu", response.annotation()); + Assertions.assertEquals("yqmlmwjwsmnwbm", response.properties().annotation()); + Assertions.assertEquals(48093140, response.properties().mtu()); + Assertions.assertEquals("riy", response.properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("yvquesxplcs", response.properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("rtfdlgp", response.properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("yyjlikalbcyuwah", response.properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("gvaidzcephnh", response.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("hgyfzkhismrwpeki", + response.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("bpertjpairpwjm", response.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("iwsywp", response.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("tvqopugrse", response.properties().ingressAclId()); + Assertions.assertEquals("iuztqefzy", response.properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.properties().isMonitoringEnabled()); + Assertions.assertEquals(Extension.NO_EXTENSION, response.properties().extension()); + Assertions.assertEquals(1433779054, response.properties().vlanId()); + Assertions.assertEquals("cendidhue", response.properties().bgpConfiguration().annotation()); + Assertions.assertEquals(1215809484, + response.properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1468425896, response.properties().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(1196676353, response.properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, response.properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(7965907281600247966L, response.properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("kiwmqnwmytcc", + response.properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("far", response.properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("qcud", + response.properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("vravntvklkwqi", + response.properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("xxregykjmpadbz", + response.properties().bgpConfiguration().bmpConfiguration().neighborIpExclusions().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.ENABLED, + response.properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + response.properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(703886783, + response.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1568661831, + response.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("rpquafxg", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qbactffxd", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("djynpgomzmkjp", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lfpsvrljl", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, response.properties().staticRouteConfiguration().extension()); + Assertions.assertEquals(1914352107, + response.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(886296375, + response.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1130099900, + response.properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(524970466, + response.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1675301560, + response.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1127302338, + response.properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java index 4165b24d8a84..0ea82ca90671 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainMockTests.java @@ -1,21 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.Extension; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.V4OverV6BgpSessionState; +import com.azure.resourcemanager.managednetworkfabric.models.V6OverV4BgpSessionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -26,67 +29,105 @@ public final class InternalNetworksListByL3IsolationDomainMockTests { @Test public void testListByL3IsolationDomain() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"vlanId\":341895282,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":590116963,\"multiplier\":294196937},\"defaultRouteOriginate\":\"True\",\"allowAS\":922115529,\"allowASOverride\":\"Disable\",\"fabricASN\":410752828832351795,\"peerASN\":2311581557755890267,\"ipv4ListenRangePrefixes\":[\"zjnnuwwv\",\"zrfxajtbcqj\",\"bkj\"],\"ipv6ListenRangePrefixes\":[\"xrj\",\"yzrieitq\",\"lzuwtbdzqajxkmp\",\"bfhlgeehbd\"],\"ipv4NeighborAddress\":[{\"address\":\"nlx\",\"configurationState\":\"PendingCommit\"}],\"ipv6NeighborAddress\":[{\"address\":\"nb\",\"configurationState\":\"Deprovisioning\"},{\"address\":\"oubukqmie\",\"configurationState\":\"Accepted\"}],\"annotation\":\"obvveq\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1576770702,\"multiplier\":1851687022},\"ipv4Routes\":[{\"prefix\":\"ecdsysxnkuhvhn\",\"nextHop\":[\"evzcrrwnk\",\"gdwq\",\"mxsfqeaxdqe\",\"uvmsaq\"]},{\"prefix\":\"viawg\",\"nextHop\":[\"wu\",\"vvzfzn\",\"gpbcbkcpympd\",\"ieasklkqcl\"]},{\"prefix\":\"fusrgnoskkhbmj\",\"nextHop\":[\"lyyuahvyeikbvqzr\",\"rgbqau\"]}],\"ipv6Routes\":[{\"prefix\":\"kxjnohafwmf\",\"nextHop\":[\"jly\",\"tugpeametsdwxfa\",\"txc\"]},{\"prefix\":\"fegs\",\"nextHop\":[\"b\",\"hou\",\"vkandhooimazkm\"]},{\"prefix\":\"f\",\"nextHop\":[\"gdmfvybfmpot\",\"lopfigrx\"]},{\"prefix\":\"trcodbqeogldmxxb\",\"nextHop\":[\"s\",\"vamsxrwq\",\"wdflgq\",\"plze\"]}]},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"mtu\":1102010974,\"connectedIPv4Subnets\":[{\"prefix\":\"ta\",\"annotation\":\"xt\"},{\"prefix\":\"fcyatbxdwr\",\"annotation\":\"vtkmx\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"shnugfbpeigkf\",\"annotation\":\"ovriqtuzwbkqcgz\"},{\"prefix\":\"gtdjhtbarptxurs\",\"annotation\":\"yyumhzpst\"},{\"prefix\":\"cqacvttyh\",\"annotation\":\"ilnsz\"}],\"importRoutePolicyId\":\"buwuu\",\"exportRoutePolicyId\":\"ydscizvkayioxpq\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"blclef\",\"importIpv6RoutePolicyId\":\"mbodvdgfua\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jymcfvvzc\",\"exportIpv6RoutePolicyId\":\"yuq\"},\"ingressAclId\":\"cktnbpkfnxrl\",\"egressAclId\":\"mlzvvrmesfhq\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"annotation\":\"revfwcbawapn\"},\"id\":\"tq\",\"name\":\"mkmzvag\",\"type\":\"xfblsxyfq\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"xzyrppoy\",\"mtu\":1884274645,\"connectedIPv4Subnets\":[{\"annotation\":\"esk\",\"prefix\":\"opbksrib\"}],\"connectedIPv6Subnets\":[{\"annotation\":\"orikczerqtiqx\",\"prefix\":\"wsfr\"},{\"annotation\":\"vzlljydgmdoq\",\"prefix\":\"rucwzc\"},{\"annotation\":\"udhgwjqeglymnrr\",\"prefix\":\"wsqpiyxkmqmge\"}],\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ilfiulgnnyxw\",\"importIpv6RoutePolicyId\":\"mcewqvvzx\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mqrbbsnptmmvdpa\",\"exportIpv6RoutePolicyId\":\"jkb\"},\"ingressAclId\":\"uwhizcbqjxmhw\",\"egressAclId\":\"unpcskdlrf\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NoExtension\",\"vlanId\":2090140808,\"bgpConfiguration\":{\"annotation\":\"dauujjl\",\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":907915275,\"multiplier\":496594005},\"defaultRouteOriginate\":\"True\",\"allowAS\":215496927,\"allowASOverride\":\"Enable\",\"fabricASN\":1413033348729181985,\"peerASN\":5221194384935236928,\"ipv4ListenRangePrefixes\":[\"mqyoduks\"],\"ipv6ListenRangePrefixes\":[\"nqqkqxkd\",\"lseuqkrbyya\",\"rjgbnwgokr\",\"lbecannvxouhd\"],\"ipv4NeighborAddress\":[{\"address\":\"tfcjapmfwxmcxhw\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Failed\"}],\"ipv6NeighborAddress\":[{\"address\":\"mgadhmqyufpfo\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"ErrorDeprovisioning\"},{\"address\":\"tngiqcypmonfco\",\"bfdAdministrativeState\":\"MAT\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Succeeded\"},{\"address\":\"gcbmayhdtjfrp\",\"bfdAdministrativeState\":\"Disabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"DeferredControl\"},{\"address\":\"zbrwrfrmhouf\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"Deprovisioned\"}],\"bmpConfiguration\":{\"neighborIpExclusions\":[\"sir\",\"nqunniklyxd\"],\"bmpConfigurationState\":\"Disabled\"},\"v4OverV6BgpSession\":\"Disabled\",\"v6OverV4BgpSession\":\"Enabled\"},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1155480100,\"multiplier\":1990320910},\"ipv4Routes\":[{\"prefix\":\"kyqhrpl\",\"nextHop\":[\"q\",\"wojsrgclxn\",\"vbkhha\",\"sytue\"]},{\"prefix\":\"mgukyw\",\"nextHop\":[\"uo\",\"lcex\"]},{\"prefix\":\"rpitqzqnbseujc\",\"nextHop\":[\"cidcabnnxhcx\",\"tshxoeftfory\"]},{\"prefix\":\"xaknwkjzvqpsym\",\"nextHop\":[\"pyjtrxxzwd\",\"nqhyefnak\",\"m\"]}],\"ipv6Routes\":[{\"prefix\":\"ksdlulytjxhxwtit\",\"nextHop\":[\"nvukvupu\",\"lugul\",\"nvpdvctqdapy\",\"sfp\"]},{\"prefix\":\"pj\",\"nextHop\":[\"ilbn\"]},{\"prefix\":\"ucqehyrnzmj\",\"nextHop\":[\"fbmpszwk\",\"cstzuwbgaesmaxd\"]}],\"extension\":\"NoExtension\"},\"nativeIpv4PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1035636942,\"threshold\":912597444,\"idleTimeExpiry\":1042879091},{\"maximumRoutes\":1556802392,\"threshold\":102821362,\"idleTimeExpiry\":1981145099},{\"maximumRoutes\":1434141381,\"threshold\":1921271242,\"idleTimeExpiry\":70222157}]},\"nativeIpv6PrefixLimit\":{\"prefixLimits\":[{\"maximumRoutes\":1581669880,\"threshold\":400306725,\"idleTimeExpiry\":585694503},{\"maximumRoutes\":193274091,\"threshold\":1987822988,\"idleTimeExpiry\":1193840998},{\"maximumRoutes\":1734674281,\"threshold\":1597994612,\"idleTimeExpiry\":1810404792},{\"maximumRoutes\":1873845617,\"threshold\":1746514047,\"idleTimeExpiry\":1857098404}]},\"lastOperation\":{\"details\":\"b\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"id\":\"qmmczugu\",\"name\":\"lieegjnq\",\"type\":\"hfjoxsehjscg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.internalNetworks() - .listByL3IsolationDomain("pnseptvdticca", "lgzwkopxdkb", com.azure.core.util.Context.NONE); + .listByL3IsolationDomain("mqoubxlpkdsn", "qoymsdlraduhg", com.azure.core.util.Context.NONE); - Assertions.assertEquals(341895282, response.iterator().next().vlanId()); - Assertions.assertEquals("obvveq", response.iterator().next().bgpConfiguration().annotation()); - Assertions.assertEquals(590116963, - response.iterator().next().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(294196937, - response.iterator().next().bgpConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("xzyrppoy", response.iterator().next().properties().annotation()); + Assertions.assertEquals(1884274645, response.iterator().next().properties().mtu()); + Assertions.assertEquals("esk", + response.iterator().next().properties().connectedIPv4Subnets().get(0).annotation()); + Assertions.assertEquals("opbksrib", + response.iterator().next().properties().connectedIPv4Subnets().get(0).prefix()); + Assertions.assertEquals("orikczerqtiqx", + response.iterator().next().properties().connectedIPv6Subnets().get(0).annotation()); + Assertions.assertEquals("wsfr", response.iterator().next().properties().connectedIPv6Subnets().get(0).prefix()); + Assertions.assertEquals("ilfiulgnnyxw", + response.iterator().next().properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("mcewqvvzx", + response.iterator().next().properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("mqrbbsnptmmvdpa", + response.iterator().next().properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("jkb", + response.iterator().next().properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("uwhizcbqjxmhw", response.iterator().next().properties().ingressAclId()); + Assertions.assertEquals("unpcskdlrf", response.iterator().next().properties().egressAclId()); + Assertions.assertEquals(IsMonitoringEnabled.FALSE, + response.iterator().next().properties().isMonitoringEnabled()); + Assertions.assertEquals(Extension.NO_EXTENSION, response.iterator().next().properties().extension()); + Assertions.assertEquals(2090140808, response.iterator().next().properties().vlanId()); + Assertions.assertEquals("dauujjl", response.iterator().next().properties().bgpConfiguration().annotation()); + Assertions.assertEquals(907915275, + response.iterator().next().properties().bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(496594005, + response.iterator().next().properties().bgpConfiguration().bfdConfiguration().multiplier()); Assertions.assertEquals(BooleanEnumProperty.TRUE, - response.iterator().next().bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(922115529, response.iterator().next().bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, - response.iterator().next().bgpConfiguration().allowASOverride()); - Assertions.assertEquals(2311581557755890267L, response.iterator().next().bgpConfiguration().peerAsn()); - Assertions.assertEquals("zjnnuwwv", - response.iterator().next().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("xrj", response.iterator().next().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("nlx", - response.iterator().next().bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("nb", - response.iterator().next().bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals(1576770702, - response.iterator().next().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1851687022, - response.iterator().next().staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("ecdsysxnkuhvhn", - response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("evzcrrwnk", - response.iterator().next().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kxjnohafwmf", - response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jly", - response.iterator().next().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + response.iterator().next().properties().bgpConfiguration().defaultRouteOriginate()); + Assertions.assertEquals(215496927, response.iterator().next().properties().bgpConfiguration().allowAS()); + Assertions.assertEquals(AllowASOverride.ENABLE, + response.iterator().next().properties().bgpConfiguration().allowASOverride()); + Assertions.assertEquals(5221194384935236928L, + response.iterator().next().properties().bgpConfiguration().peerASN()); + Assertions.assertEquals("mqyoduks", + response.iterator().next().properties().bgpConfiguration().ipv4ListenRangePrefixes().get(0)); + Assertions.assertEquals("nqqkqxkd", + response.iterator().next().properties().bgpConfiguration().ipv6ListenRangePrefixes().get(0)); + Assertions.assertEquals("tfcjapmfwxmcxhw", + response.iterator().next().properties().bgpConfiguration().ipv4NeighborAddress().get(0).address()); + Assertions.assertEquals("mgadhmqyufpfo", + response.iterator().next().properties().bgpConfiguration().ipv6NeighborAddress().get(0).address()); + Assertions.assertEquals("sir", + response.iterator() + .next() + .properties() + .bgpConfiguration() + .bmpConfiguration() + .neighborIpExclusions() + .get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + response.iterator().next().properties().bgpConfiguration().bmpConfiguration().bmpConfigurationState()); + Assertions.assertEquals(V4OverV6BgpSessionState.DISABLED, + response.iterator().next().properties().bgpConfiguration().v4OverV6BgpSession()); + Assertions.assertEquals(V6OverV4BgpSessionState.ENABLED, + response.iterator().next().properties().bgpConfiguration().v6OverV4BgpSession()); + Assertions.assertEquals(1155480100, + response.iterator() + .next() + .properties() + .staticRouteConfiguration() + .bfdConfiguration() + .intervalInMilliSeconds()); + Assertions.assertEquals(1990320910, + response.iterator().next().properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("kyqhrpl", + response.iterator().next().properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("q", + response.iterator().next().properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ksdlulytjxhxwtit", + response.iterator().next().properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("nvukvupu", + response.iterator().next().properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); Assertions.assertEquals(Extension.NO_EXTENSION, - response.iterator().next().staticRouteConfiguration().extension()); - Assertions.assertEquals(1102010974, response.iterator().next().mtu()); - Assertions.assertEquals("xt", response.iterator().next().connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ta", response.iterator().next().connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ovriqtuzwbkqcgz", - response.iterator().next().connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("shnugfbpeigkf", response.iterator().next().connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("buwuu", response.iterator().next().importRoutePolicyId()); - Assertions.assertEquals("ydscizvkayioxpq", response.iterator().next().exportRoutePolicyId()); - Assertions.assertEquals("blclef", response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("mbodvdgfua", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jymcfvvzc", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("yuq", response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("cktnbpkfnxrl", response.iterator().next().ingressAclId()); - Assertions.assertEquals("mlzvvrmesfhq", response.iterator().next().egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, response.iterator().next().isMonitoringEnabled()); - Assertions.assertEquals(Extension.NO_EXTENSION, response.iterator().next().extension()); - Assertions.assertEquals("revfwcbawapn", response.iterator().next().annotation()); + response.iterator().next().properties().staticRouteConfiguration().extension()); + Assertions.assertEquals(1035636942, + response.iterator().next().properties().nativeIpv4PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(912597444, + response.iterator().next().properties().nativeIpv4PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(1042879091, + response.iterator().next().properties().nativeIpv4PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); + Assertions.assertEquals(1581669880, + response.iterator().next().properties().nativeIpv6PrefixLimit().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(400306725, + response.iterator().next().properties().nativeIpv6PrefixLimit().prefixLimits().get(0).threshold()); + Assertions.assertEquals(585694503, + response.iterator().next().properties().nativeIpv6PrefixLimit().prefixLimits().get(0).idleTimeExpiry()); } } 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 56c7279ef436..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 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.BfdConfiguration; -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.InternalNetworksList; -import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -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\":{\"vlanId\":100725241,\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":873495468,\"multiplier\":1300228553},\"defaultRouteOriginate\":\"True\",\"allowAS\":1735235828,\"allowASOverride\":\"Enable\",\"fabricASN\":3930750995945071444,\"peerASN\":7347121529091171836,\"ipv4ListenRangePrefixes\":[\"cueljtiahxmfq\",\"yarvsxzqbglcjk\",\"yspthzod\",\"btl\"],\"ipv6ListenRangePrefixes\":[\"gblioskkfmkm\",\"djxyxgbkkqvjcteo\",\"dlrslskk\"],\"ipv4NeighborAddress\":[{}],\"ipv6NeighborAddress\":[{},{},{},{}],\"annotation\":\"zdpv\"},\"staticRouteConfiguration\":{\"extension\":\"NoExtension\",\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1286292074,\"multiplier\":2105029866},\"ipv4Routes\":[{\"prefix\":\"snggytexvzilmhiv\",\"nextHop\":[]},{\"prefix\":\"kwwwnckn\",\"nextHop\":[]},{\"prefix\":\"zdajlskzptjxu\",\"nextHop\":[]},{\"prefix\":\"weucyrth\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ehmcgcje\",\"nextHop\":[]},{\"prefix\":\"n\",\"nextHop\":[]},{\"prefix\":\"ehokamvfej\",\"nextHop\":[]},{\"prefix\":\"qnttmbq\",\"nextHop\":[]}]},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\",\"mtu\":955211490,\"connectedIPv4Subnets\":[{\"prefix\":\"ysthhza\",\"annotation\":\"fwy\"},{\"prefix\":\"rlhgenuze\",\"annotation\":\"vkvebaqsz\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"zlsmmdqgmihzpim\",\"annotation\":\"rh\"}],\"importRoutePolicyId\":\"t\",\"exportRoutePolicyId\":\"nklogxsvtzarhzv\",\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"qktcmbjwzzo\",\"importIpv6RoutePolicyId\":\"pkybtgl\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pgajsqjce\",\"exportIpv6RoutePolicyId\":\"bmfuvqarwzxu\"},\"ingressAclId\":\"ebluimmbwx\",\"egressAclId\":\"gtdmbvx\",\"isMonitoringEnabled\":\"False\",\"extension\":\"NPB\",\"annotation\":\"qkbud\"},\"id\":\"waokbavlytta\",\"name\":\"knwfrkebsmhpdujd\",\"type\":\"gatolekscbctnan\"}],\"nextLink\":\"mwbzxpdc\"}") - .toObject(InternalNetworksList.class); - Assertions.assertEquals(100725241, model.value().get(0).vlanId()); - Assertions.assertEquals("zdpv", model.value().get(0).bgpConfiguration().annotation()); - Assertions.assertEquals(873495468, - model.value().get(0).bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1300228553, model.value().get(0).bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.value().get(0).bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1735235828, model.value().get(0).bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.value().get(0).bgpConfiguration().allowASOverride()); - Assertions.assertEquals(7347121529091171836L, model.value().get(0).bgpConfiguration().peerAsn()); - Assertions.assertEquals("cueljtiahxmfq", - model.value().get(0).bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("gblioskkfmkm", - model.value().get(0).bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals(1286292074, - model.value().get(0).staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2105029866, - model.value().get(0).staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("snggytexvzilmhiv", - model.value().get(0).staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehmcgcje", - model.value().get(0).staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals(Extension.NO_EXTENSION, model.value().get(0).staticRouteConfiguration().extension()); - Assertions.assertEquals(955211490, model.value().get(0).mtu()); - Assertions.assertEquals("fwy", model.value().get(0).connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ysthhza", model.value().get(0).connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("rh", model.value().get(0).connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("zlsmmdqgmihzpim", model.value().get(0).connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("t", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("nklogxsvtzarhzv", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("qktcmbjwzzo", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pkybtgl", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pgajsqjce", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bmfuvqarwzxu", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ebluimmbwx", model.value().get(0).ingressAclId()); - Assertions.assertEquals("gtdmbvx", model.value().get(0).egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.value().get(0).isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.value().get(0).extension()); - Assertions.assertEquals("qkbud", model.value().get(0).annotation()); - Assertions.assertEquals("mwbzxpdc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworksList model - = new InternalNetworksList().withValue(Arrays.asList(new InternalNetworkInner().withVlanId(100725241) - .withBgpConfiguration(new InternalNetworkPropertiesBgpConfiguration().withAnnotation("zdpv") - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(873495468).withMultiplier(1300228553)) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1735235828) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(7347121529091171836L) - .withIpv4ListenRangePrefixes(Arrays.asList("cueljtiahxmfq", "yarvsxzqbglcjk", "yspthzod", "btl")) - .withIpv6ListenRangePrefixes(Arrays.asList("gblioskkfmkm", "djxyxgbkkqvjcteo", "dlrslskk")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress())) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress(), new NeighborAddress(), - new NeighborAddress(), new NeighborAddress()))) - .withStaticRouteConfiguration(new InternalNetworkPropertiesStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1286292074).withMultiplier(2105029866)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("snggytexvzilmhiv").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("kwwwnckn").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("zdajlskzptjxu").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("weucyrth").withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("ehmcgcje").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("n").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("ehokamvfej").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("qnttmbq").withNextHop(Arrays.asList()))) - .withExtension(Extension.NO_EXTENSION)) - .withMtu(955211490) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("fwy").withPrefix("ysthhza"), - new ConnectedSubnet().withAnnotation("vkvebaqsz").withPrefix("rlhgenuze"))) - .withConnectedIPv6Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("rh").withPrefix("zlsmmdqgmihzpim"))) - .withImportRoutePolicyId("t") - .withExportRoutePolicyId("nklogxsvtzarhzv") - .withImportRoutePolicy(new ImportRoutePolicy().withImportIpv4RoutePolicyId("qktcmbjwzzo") - .withImportIpv6RoutePolicyId("pkybtgl")) - .withExportRoutePolicy(new ExportRoutePolicy().withExportIpv4RoutePolicyId("pgajsqjce") - .withExportIpv6RoutePolicyId("bmfuvqarwzxu")) - .withIngressAclId("ebluimmbwx") - .withEgressAclId("gtdmbvx") - .withIsMonitoringEnabled(IsMonitoringEnabled.FALSE) - .withExtension(Extension.NPB) - .withAnnotation("qkbud"))).withNextLink("mwbzxpdc"); - model = BinaryData.fromObject(model).toObject(InternalNetworksList.class); - Assertions.assertEquals(100725241, model.value().get(0).vlanId()); - Assertions.assertEquals("zdpv", model.value().get(0).bgpConfiguration().annotation()); - Assertions.assertEquals(873495468, - model.value().get(0).bgpConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1300228553, model.value().get(0).bgpConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.value().get(0).bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1735235828, model.value().get(0).bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.value().get(0).bgpConfiguration().allowASOverride()); - Assertions.assertEquals(7347121529091171836L, model.value().get(0).bgpConfiguration().peerAsn()); - Assertions.assertEquals("cueljtiahxmfq", - model.value().get(0).bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("gblioskkfmkm", - model.value().get(0).bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals(1286292074, - model.value().get(0).staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2105029866, - model.value().get(0).staticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("snggytexvzilmhiv", - model.value().get(0).staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehmcgcje", - model.value().get(0).staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals(Extension.NO_EXTENSION, model.value().get(0).staticRouteConfiguration().extension()); - Assertions.assertEquals(955211490, model.value().get(0).mtu()); - Assertions.assertEquals("fwy", model.value().get(0).connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("ysthhza", model.value().get(0).connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("rh", model.value().get(0).connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("zlsmmdqgmihzpim", model.value().get(0).connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("t", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("nklogxsvtzarhzv", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("qktcmbjwzzo", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("pkybtgl", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pgajsqjce", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bmfuvqarwzxu", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ebluimmbwx", model.value().get(0).ingressAclId()); - Assertions.assertEquals("gtdmbvx", model.value().get(0).egressAclId()); - Assertions.assertEquals(IsMonitoringEnabled.FALSE, model.value().get(0).isMonitoringEnabled()); - Assertions.assertEquals(Extension.NPB, model.value().get(0).extension()); - Assertions.assertEquals("qkbud", model.value().get(0).annotation()); - Assertions.assertEquals("mwbzxpdc", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java index 55d56bfeccc6..0846e2077d74 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -15,31 +16,34 @@ public final class InternetGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"ipv4Address\":\"qcy\",\"port\":905465654,\"type\":\"Infrastructure\",\"networkFabricControllerId\":\"qofyuicdhzbdy\",\"provisioningState\":\"Accepted\",\"internetGatewayRuleId\":\"bdvibidmhmwffpl\",\"annotation\":\"u\"},\"location\":\"pckc\",\"tags\":{\"oxoyyukp\":\"vwe\"},\"id\":\"aimmoiroqb\",\"name\":\"shbraga\",\"type\":\"yyrmfsvbp\"}") + "{\"properties\":{\"annotation\":\"lohap\",\"internetGatewayRuleId\":\"nfszpyglqdhmrjz\",\"ipv4Address\":\"l\",\"port\":968773203,\"type\":\"Workload\",\"internetGatewayType\":\"Infrastructure\",\"networkFabricControllerId\":\"psjoqcjenk\",\"lastOperation\":{\"details\":\"qzvs\"},\"provisioningState\":\"Canceled\"},\"location\":\"jelgcmpzqjhhhq\",\"tags\":{\"oyvivbsiz\":\"yvca\"},\"id\":\"sjsz\",\"name\":\"bscm\",\"type\":\"lzijiufehgmvflnw\"}") .toObject(InternetGatewayInner.class); - Assertions.assertEquals("pckc", model.location()); - Assertions.assertEquals("vwe", model.tags().get("oxoyyukp")); - Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.typePropertiesType()); - Assertions.assertEquals("qofyuicdhzbdy", model.networkFabricControllerId()); - Assertions.assertEquals("bdvibidmhmwffpl", model.internetGatewayRuleId()); - Assertions.assertEquals("u", model.annotation()); + Assertions.assertEquals("jelgcmpzqjhhhq", model.location()); + Assertions.assertEquals("yvca", model.tags().get("oyvivbsiz")); + Assertions.assertEquals("lohap", model.properties().annotation()); + Assertions.assertEquals("nfszpyglqdhmrjz", model.properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, model.properties().type()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.properties().internetGatewayType()); + Assertions.assertEquals("psjoqcjenk", model.properties().networkFabricControllerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayInner model = new InternetGatewayInner().withLocation("pckc") - .withTags(mapOf("oxoyyukp", "vwe")) - .withTypePropertiesType(GatewayType.INFRASTRUCTURE) - .withNetworkFabricControllerId("qofyuicdhzbdy") - .withInternetGatewayRuleId("bdvibidmhmwffpl") - .withAnnotation("u"); + InternetGatewayInner model = new InternetGatewayInner().withLocation("jelgcmpzqjhhhq") + .withTags(mapOf("oyvivbsiz", "yvca")) + .withProperties(new InternetGatewayProperties().withAnnotation("lohap") + .withInternetGatewayRuleId("nfszpyglqdhmrjz") + .withType(GatewayType.WORKLOAD) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId("psjoqcjenk")); model = BinaryData.fromObject(model).toObject(InternetGatewayInner.class); - Assertions.assertEquals("pckc", model.location()); - Assertions.assertEquals("vwe", model.tags().get("oxoyyukp")); - Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.typePropertiesType()); - Assertions.assertEquals("qofyuicdhzbdy", model.networkFabricControllerId()); - Assertions.assertEquals("bdvibidmhmwffpl", model.internetGatewayRuleId()); - Assertions.assertEquals("u", model.annotation()); + Assertions.assertEquals("jelgcmpzqjhhhq", model.location()); + Assertions.assertEquals("yvca", model.tags().get("oyvivbsiz")); + Assertions.assertEquals("lohap", model.properties().annotation()); + Assertions.assertEquals("nfszpyglqdhmrjz", model.properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, model.properties().type()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.properties().internetGatewayType()); + Assertions.assertEquals("psjoqcjenk", model.properties().networkFabricControllerId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayListResultTests.java new file mode 100644 index 000000000000..2c0542ebab03 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayListResultTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayListResult; +import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import org.junit.jupiter.api.Assertions; + +public final class InternetGatewayListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternetGatewayListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"luclvdjjuk\",\"internetGatewayRuleId\":\"dnqodx\",\"ipv4Address\":\"h\",\"port\":318386162,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"vzoqgyipemchgavs\",\"lastOperation\":{\"details\":\"ejdtxptl\"},\"provisioningState\":\"Canceled\"},\"location\":\"homewjjstliu\",\"tags\":{\"blxydkxr\":\"wmoaiancznvodrrs\"},\"id\":\"vvbxiwkgfbqljnq\",\"name\":\"hychocokuleh\",\"type\":\"rqlrqffawe\"},{\"properties\":{\"annotation\":\"rkphyjdxr\",\"internetGatewayRuleId\":\"juqdbrx\",\"ipv4Address\":\"gchbapxkiy\",\"port\":73723123,\"type\":\"Workload\",\"internetGatewayType\":\"Infrastructure\",\"networkFabricControllerId\":\"buscgduus\",\"lastOperation\":{\"details\":\"cblevpmc\"},\"provisioningState\":\"Updating\"},\"location\":\"xkyxlzgs\",\"tags\":{\"fhbzffovwmbjlzq\":\"zzlt\",\"owftptnuwjtks\":\"czpgvdwnapfdq\",\"cgqyhleseyq\":\"h\"},\"id\":\"hvyeldotj\",\"name\":\"dkwisw\",\"type\":\"kukjtasb\"},{\"properties\":{\"annotation\":\"ispkxkdtx\",\"internetGatewayRuleId\":\"ndlqvtwknvgmmbu\",\"ipv4Address\":\"yw\",\"port\":1368932930,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"ueatgroe\",\"lastOperation\":{\"details\":\"ygzc\"},\"provisioningState\":\"Updating\"},\"location\":\"x\",\"tags\":{\"qm\":\"oytehqpuvjm\",\"n\":\"dwckygroe\"},\"id\":\"dljdjuskb\",\"name\":\"req\",\"type\":\"n\"}],\"nextLink\":\"eysfaqegplw\"}") + .toObject(InternetGatewayListResult.class); + Assertions.assertEquals("homewjjstliu", model.value().get(0).location()); + Assertions.assertEquals("wmoaiancznvodrrs", model.value().get(0).tags().get("blxydkxr")); + Assertions.assertEquals("luclvdjjuk", model.value().get(0).properties().annotation()); + Assertions.assertEquals("dnqodx", model.value().get(0).properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).properties().type()); + Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).properties().internetGatewayType()); + Assertions.assertEquals("vzoqgyipemchgavs", model.value().get(0).properties().networkFabricControllerId()); + Assertions.assertEquals("eysfaqegplw", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java new file mode 100644 index 000000000000..c04b66c103ca --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class InternetGatewayPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternetGatewayPatchProperties model = BinaryData.fromString("{\"internetGatewayRuleId\":\"hgookrtalvnbwgpb\"}") + .toObject(InternetGatewayPatchProperties.class); + Assertions.assertEquals("hgookrtalvnbwgpb", model.internetGatewayRuleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InternetGatewayPatchProperties model + = new InternetGatewayPatchProperties().withInternetGatewayRuleId("hgookrtalvnbwgpb"); + model = BinaryData.fromObject(model).toObject(InternetGatewayPatchProperties.class); + Assertions.assertEquals("hgookrtalvnbwgpb", model.internetGatewayRuleId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java index 7add5ca29f88..1758b31e2896 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatchProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,20 +15,19 @@ public final class InternetGatewayPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayPatch model = BinaryData - .fromString( - "{\"properties\":{\"internetGatewayRuleId\":\"clgsc\"},\"tags\":{\"ofldpuviyfcaa\":\"imkrsrrmouc\"}}") + .fromString("{\"tags\":{\"z\":\"qpxzucafeddwwn\"},\"properties\":{\"internetGatewayRuleId\":\"xud\"}}") .toObject(InternetGatewayPatch.class); - Assertions.assertEquals("imkrsrrmouc", model.tags().get("ofldpuviyfcaa")); - Assertions.assertEquals("clgsc", model.internetGatewayRuleId()); + Assertions.assertEquals("qpxzucafeddwwn", model.tags().get("z")); + Assertions.assertEquals("xud", model.properties().internetGatewayRuleId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayPatch model = new InternetGatewayPatch().withTags(mapOf("ofldpuviyfcaa", "imkrsrrmouc")) - .withInternetGatewayRuleId("clgsc"); + InternetGatewayPatch model = new InternetGatewayPatch().withTags(mapOf("z", "qpxzucafeddwwn")) + .withProperties(new InternetGatewayPatchProperties().withInternetGatewayRuleId("xud")); model = BinaryData.fromObject(model).toObject(InternetGatewayPatch.class); - Assertions.assertEquals("imkrsrrmouc", model.tags().get("ofldpuviyfcaa")); - Assertions.assertEquals("clgsc", model.internetGatewayRuleId()); + Assertions.assertEquals("qpxzucafeddwwn", model.tags().get("z")); + Assertions.assertEquals("xud", model.properties().internetGatewayRuleId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.java deleted file mode 100644 index ed6abb70ed19..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPatchablePropertiesTests.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.InternetGatewayPatchableProperties; -import org.junit.jupiter.api.Assertions; - -public final class InternetGatewayPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternetGatewayPatchableProperties model = BinaryData.fromString("{\"internetGatewayRuleId\":\"qhnlbqnbld\"}") - .toObject(InternetGatewayPatchableProperties.class); - Assertions.assertEquals("qhnlbqnbld", model.internetGatewayRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternetGatewayPatchableProperties model - = new InternetGatewayPatchableProperties().withInternetGatewayRuleId("qhnlbqnbld"); - model = BinaryData.fromObject(model).toObject(InternetGatewayPatchableProperties.class); - Assertions.assertEquals("qhnlbqnbld", model.internetGatewayRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java index 73a6d9f0b4ca..5913b0f09dc3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayPropertiesTests.java @@ -1,36 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayProperties; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; import org.junit.jupiter.api.Assertions; public final class InternetGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayProperties model = BinaryData.fromString( - "{\"ipv4Address\":\"bopfppdbwnup\",\"port\":2068855752,\"type\":\"Workload\",\"networkFabricControllerId\":\"kuma\",\"provisioningState\":\"Canceled\",\"internetGatewayRuleId\":\"acfdmmcpugme\",\"annotation\":\"epvufhbzehew\"}") + "{\"annotation\":\"qkxrerl\",\"internetGatewayRuleId\":\"ylyl\",\"ipv4Address\":\"wxzut\",\"port\":350411524,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Infrastructure\",\"networkFabricControllerId\":\"hmupgxyjtcdxabbu\",\"lastOperation\":{\"details\":\"abe\"},\"provisioningState\":\"Deleting\"}") .toObject(InternetGatewayProperties.class); - Assertions.assertEquals("epvufhbzehew", model.annotation()); - Assertions.assertEquals(GatewayType.WORKLOAD, model.type()); - Assertions.assertEquals("kuma", model.networkFabricControllerId()); - Assertions.assertEquals("acfdmmcpugme", model.internetGatewayRuleId()); + Assertions.assertEquals("qkxrerl", model.annotation()); + Assertions.assertEquals("ylyl", model.internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.type()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.internetGatewayType()); + Assertions.assertEquals("hmupgxyjtcdxabbu", model.networkFabricControllerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayProperties model = new InternetGatewayProperties().withAnnotation("epvufhbzehew") - .withType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("kuma") - .withInternetGatewayRuleId("acfdmmcpugme"); + InternetGatewayProperties model = new InternetGatewayProperties().withAnnotation("qkxrerl") + .withInternetGatewayRuleId("ylyl") + .withType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId("hmupgxyjtcdxabbu"); model = BinaryData.fromObject(model).toObject(InternetGatewayProperties.class); - Assertions.assertEquals("epvufhbzehew", model.annotation()); - Assertions.assertEquals(GatewayType.WORKLOAD, model.type()); - Assertions.assertEquals("kuma", model.networkFabricControllerId()); - Assertions.assertEquals("acfdmmcpugme", model.internetGatewayRuleId()); + Assertions.assertEquals("qkxrerl", model.annotation()); + Assertions.assertEquals("ylyl", model.internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.type()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, model.internetGatewayType()); + Assertions.assertEquals("hmupgxyjtcdxabbu", model.networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java index 32fa0ac2ccfd..1ce2c201bc71 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleInnerTests.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; @@ -17,28 +20,54 @@ public final class InternetGatewayRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRuleInner model = BinaryData.fromString( - "{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"moichdlpnfpubntn\",\"atzviqsowsaael\"]},\"provisioningState\":\"Updating\",\"internetGatewayIds\":[\"ju\",\"plrvkmjcwmjvlg\",\"ggcvk\"],\"annotation\":\"lizrzbjpsfxsfuz\"},\"location\":\"vtmva\",\"tags\":{\"oveofizrvjfnmj\":\"idqlvhu\"},\"id\":\"vlwyzg\",\"name\":\"blkujrllfojuidjp\",\"type\":\"uyjucejikzo\"}") + "{\"properties\":{\"annotation\":\"eakxcptsoqfyi\",\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"chkrttzr\"],\"condition\":\"Or\",\"destinationAddressList\":[\"ykiue\"],\"sourceAddressList\":[\"nbwzohmnrxxbso\",\"klinhmdptysprq\",\"gnzxojpslsvj\",\"pli\"],\"headerAddressList\":[{\"headerName\":\"woyxqvapcohhou\",\"addressList\":[\"q\",\"jxcx\"]},{\"headerName\":\"zdcgdzbenr\",\"addressList\":[\"awetzq\",\"dtjwfljhznamt\",\"atmzw\"]},{\"headerName\":\"jncqtjzmi\",\"addressList\":[\"bgatzu\",\"vbxngr\",\"bwggahtt\"]},{\"headerName\":\"swvajqfu\",\"addressList\":[\"joqza\"]}]},\"lastOperation\":{\"details\":\"wqrjzfrg\"},\"provisioningState\":\"Deleting\",\"internetGatewayIds\":[\"cmbuocnjrohmbpy\",\"yx\",\"meblyd\",\"vkfkmr\"]},\"location\":\"xne\",\"tags\":{\"pyapucygvoav\":\"mtodl\"},\"id\":\"unssxlghieegjl\",\"name\":\"vvpa\",\"type\":\"eksgbuxantuygd\"}") .toObject(InternetGatewayRuleInner.class); - Assertions.assertEquals("vtmva", model.location()); - Assertions.assertEquals("idqlvhu", model.tags().get("oveofizrvjfnmj")); - Assertions.assertEquals(Action.ALLOW, model.ruleProperties().action()); - Assertions.assertEquals("moichdlpnfpubntn", model.ruleProperties().addressList().get(0)); - Assertions.assertEquals("lizrzbjpsfxsfuz", model.annotation()); + Assertions.assertEquals("xne", model.location()); + Assertions.assertEquals("mtodl", model.tags().get("pyapucygvoav")); + Assertions.assertEquals("eakxcptsoqfyi", model.properties().annotation()); + Assertions.assertEquals(Action.ALLOW, model.properties().ruleProperties().action()); + Assertions.assertEquals("chkrttzr", model.properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, model.properties().ruleProperties().condition()); + Assertions.assertEquals("ykiue", model.properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("nbwzohmnrxxbso", model.properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("woyxqvapcohhou", + model.properties().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("q", + model.properties().ruleProperties().headerAddressList().get(0).addressList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayRuleInner model = new InternetGatewayRuleInner().withLocation("vtmva") - .withTags(mapOf("oveofizrvjfnmj", "idqlvhu")) - .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) - .withAddressList(Arrays.asList("moichdlpnfpubntn", "atzviqsowsaael"))) - .withAnnotation("lizrzbjpsfxsfuz"); + InternetGatewayRuleInner model = new InternetGatewayRuleInner().withLocation("xne") + .withTags(mapOf("pyapucygvoav", "mtodl")) + .withProperties(new InternetGatewayRuleProperties().withAnnotation("eakxcptsoqfyi") + .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) + .withAddressList(Arrays.asList("chkrttzr")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("ykiue")) + .withSourceAddressList(Arrays.asList("nbwzohmnrxxbso", "klinhmdptysprq", "gnzxojpslsvj", "pli")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("woyxqvapcohhou") + .withAddressList(Arrays.asList("q", "jxcx")), + new HeaderAddressProperties().withHeaderName("zdcgdzbenr") + .withAddressList(Arrays.asList("awetzq", "dtjwfljhznamt", "atmzw")), + new HeaderAddressProperties().withHeaderName("jncqtjzmi") + .withAddressList(Arrays.asList("bgatzu", "vbxngr", "bwggahtt")), + new HeaderAddressProperties().withHeaderName("swvajqfu") + .withAddressList(Arrays.asList("joqza")))))); model = BinaryData.fromObject(model).toObject(InternetGatewayRuleInner.class); - Assertions.assertEquals("vtmva", model.location()); - Assertions.assertEquals("idqlvhu", model.tags().get("oveofizrvjfnmj")); - Assertions.assertEquals(Action.ALLOW, model.ruleProperties().action()); - Assertions.assertEquals("moichdlpnfpubntn", model.ruleProperties().addressList().get(0)); - Assertions.assertEquals("lizrzbjpsfxsfuz", model.annotation()); + Assertions.assertEquals("xne", model.location()); + Assertions.assertEquals("mtodl", model.tags().get("pyapucygvoav")); + Assertions.assertEquals("eakxcptsoqfyi", model.properties().annotation()); + Assertions.assertEquals(Action.ALLOW, model.properties().ruleProperties().action()); + Assertions.assertEquals("chkrttzr", model.properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, model.properties().ruleProperties().condition()); + Assertions.assertEquals("ykiue", model.properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("nbwzohmnrxxbso", model.properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("woyxqvapcohhou", + model.properties().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("q", + model.properties().ruleProperties().headerAddressList().get(0).addressList().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleListResultTests.java new file mode 100644 index 000000000000..499b7fdbe2eb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRuleListResultTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.InternetGatewayRuleListResult; +import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; +import org.junit.jupiter.api.Assertions; + +public final class InternetGatewayRuleListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InternetGatewayRuleListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"jqgdkfnozoeo\",\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"h\",\"efgwbmqjc\",\"ntasfaymxbu\",\"pzealbmqkyojw\"],\"condition\":\"Or\",\"destinationAddressList\":[\"btsuahxs\",\"xjcmmzrrsc\",\"biwsd\"],\"sourceAddressList\":[\"xqw\",\"diffjxcjrmmuab\"],\"headerAddressList\":[{}]},\"lastOperation\":{\"details\":\"ogjo\"},\"provisioningState\":\"Failed\",\"internetGatewayIds\":[\"foyzbamwineof\"]},\"location\":\"kak\",\"tags\":{\"evboclzhzjknyuxg\":\"dt\",\"mrdixtreki\":\"ttxpnrupza\"},\"id\":\"swyskbruffg\",\"name\":\"lukkutvlxhrpqhvm\",\"type\":\"lcouqehbhbcdszir\"},{\"properties\":{\"annotation\":\"an\",\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"mbltoo\",\"mkfqlwxldy\",\"alsygao\",\"njpnnbmj\"],\"condition\":\"Or\",\"destinationAddressList\":[\"gsjjxxahmrna\",\"zyqegxyiv\",\"inbmh\"],\"sourceAddressList\":[\"ijkgqxnhm\",\"keznjaujvaa\",\"nggiycwkdtaa\",\"xw\"],\"headerAddressList\":[{}]},\"lastOperation\":{\"details\":\"mrrqmbzmqkratb\"},\"provisioningState\":\"Canceled\",\"internetGatewayIds\":[\"sidbirkf\"]},\"location\":\"sokdgoge\",\"tags\":{\"hbguzo\":\"ym\",\"mffjkutycyarn\":\"kyewnfnzhhhqo\"},\"id\":\"oohguabzoghkt\",\"name\":\"pyc\",\"type\":\"hcoeocnhzq\"}],\"nextLink\":\"ttjzcfyjzpt\"}") + .toObject(InternetGatewayRuleListResult.class); + Assertions.assertEquals("kak", model.value().get(0).location()); + Assertions.assertEquals("dt", model.value().get(0).tags().get("evboclzhzjknyuxg")); + Assertions.assertEquals("jqgdkfnozoeo", model.value().get(0).properties().annotation()); + Assertions.assertEquals(Action.DENY, model.value().get(0).properties().ruleProperties().action()); + Assertions.assertEquals("h", model.value().get(0).properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, model.value().get(0).properties().ruleProperties().condition()); + Assertions.assertEquals("btsuahxs", + model.value().get(0).properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("xqw", model.value().get(0).properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("ttjzcfyjzpt", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java index d9907732aa0a..3a04d1a08366 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,17 +14,17 @@ public final class InternetGatewayRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRulePatch model = BinaryData.fromString( - "{\"tags\":{\"p\":\"folpymwamxqzra\",\"ulajvlejchc\":\"dphtv\",\"mzlanru\":\"rlzk\",\"phcnzqtpj\":\"dwv\"}}") + "{\"tags\":{\"cxtczhupeukn\":\"ejpmvssehaepwa\",\"c\":\"jduyyespydjfb\",\"hulrtywikdmhla\":\"v\",\"ufr\":\"uflgbhgauacdixm\"}}") .toObject(InternetGatewayRulePatch.class); - Assertions.assertEquals("folpymwamxqzra", model.tags().get("p")); + Assertions.assertEquals("ejpmvssehaepwa", model.tags().get("cxtczhupeukn")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayRulePatch model = new InternetGatewayRulePatch() - .withTags(mapOf("p", "folpymwamxqzra", "ulajvlejchc", "dphtv", "mzlanru", "rlzk", "phcnzqtpj", "dwv")); + InternetGatewayRulePatch model = new InternetGatewayRulePatch().withTags(mapOf("cxtczhupeukn", "ejpmvssehaepwa", + "c", "jduyyespydjfb", "hulrtywikdmhla", "v", "ufr", "uflgbhgauacdixm")); model = BinaryData.fromObject(model).toObject(InternetGatewayRulePatch.class); - Assertions.assertEquals("folpymwamxqzra", model.tags().get("p")); + Assertions.assertEquals("ejpmvssehaepwa", model.tags().get("cxtczhupeukn")); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java index e10b71b12141..432556e8710d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulePropertiesTests.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,21 +17,41 @@ public final class InternetGatewayRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InternetGatewayRuleProperties model = BinaryData.fromString( - "{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"vtzejetjklnti\",\"yjuzkdb\",\"zolxrzvhqjwtr\"]},\"provisioningState\":\"Deleting\",\"internetGatewayIds\":[\"zpcrrkolawj\",\"jsmwrokc\",\"xfzzzwyjafitlhgu\"],\"annotation\":\"uchlgmltx\"}") + "{\"annotation\":\"aq\",\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"piwrqofu\",\"o\",\"mjnlexwhcb\"],\"condition\":\"And\",\"destinationAddressList\":[\"e\"],\"sourceAddressList\":[\"uuerctatoyi\",\"tqpbrlcy\"],\"headerAddressList\":[{\"headerName\":\"zkgofxyf\",\"addressList\":[\"cvcrrp\"]},{\"headerName\":\"ttbst\",\"addressList\":[\"aqnrmvvfkoxmlg\",\"ktuidvrm\",\"zlpdwwex\",\"mzvlazipbh\"]},{\"headerName\":\"vqs\",\"addressList\":[\"yuuzivens\"]},{\"headerName\":\"meyyvpkpatlb\",\"addressList\":[\"zgs\",\"srfhf\"]}]},\"lastOperation\":{\"details\":\"mknbnxwcdommpv\"},\"provisioningState\":\"Failed\",\"internetGatewayIds\":[\"fgbrtt\",\"iac\",\"kiexhajlfnthiq\",\"yuttdiygbpvnwswm\"]}") .toObject(InternetGatewayRuleProperties.class); - Assertions.assertEquals("uchlgmltx", model.annotation()); + Assertions.assertEquals("aq", model.annotation()); Assertions.assertEquals(Action.DENY, model.ruleProperties().action()); - Assertions.assertEquals("vtzejetjklnti", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals("piwrqofu", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.ruleProperties().condition()); + Assertions.assertEquals("e", model.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("uuerctatoyi", model.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("zkgofxyf", model.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("cvcrrp", model.ruleProperties().headerAddressList().get(0).addressList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InternetGatewayRuleProperties model = new InternetGatewayRuleProperties().withAnnotation("uchlgmltx") + InternetGatewayRuleProperties model = new InternetGatewayRuleProperties().withAnnotation("aq") .withRuleProperties(new RuleProperties().withAction(Action.DENY) - .withAddressList(Arrays.asList("vtzejetjklnti", "yjuzkdb", "zolxrzvhqjwtr"))); + .withAddressList(Arrays.asList("piwrqofu", "o", "mjnlexwhcb")) + .withCondition(RuleCondition.AND) + .withDestinationAddressList(Arrays.asList("e")) + .withSourceAddressList(Arrays.asList("uuerctatoyi", "tqpbrlcy")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("zkgofxyf").withAddressList(Arrays.asList("cvcrrp")), + new HeaderAddressProperties().withHeaderName("ttbst") + .withAddressList(Arrays.asList("aqnrmvvfkoxmlg", "ktuidvrm", "zlpdwwex", "mzvlazipbh")), + new HeaderAddressProperties().withHeaderName("vqs").withAddressList(Arrays.asList("yuuzivens")), + new HeaderAddressProperties().withHeaderName("meyyvpkpatlb") + .withAddressList(Arrays.asList("zgs", "srfhf"))))); model = BinaryData.fromObject(model).toObject(InternetGatewayRuleProperties.class); - Assertions.assertEquals("uchlgmltx", model.annotation()); + Assertions.assertEquals("aq", model.annotation()); Assertions.assertEquals(Action.DENY, model.ruleProperties().action()); - Assertions.assertEquals("vtzejetjklnti", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals("piwrqofu", model.ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.ruleProperties().condition()); + Assertions.assertEquals("e", model.ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("uuerctatoyi", model.ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("zkgofxyf", model.ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("cvcrrp", model.ruleProperties().headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java index c2887d364f80..7b7dcee7283f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateMockTests.java @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRuleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -26,31 +29,47 @@ public final class InternetGatewayRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"kzstzpzecdlc\",\"irtahtu\",\"cimtcaumviud\"]},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"rmlujmtunlo\",\"wuzebfqvm\",\"jbhzyenf\"],\"annotation\":\"etxeudw\"},\"location\":\"dlckdoxocjcdevz\",\"tags\":{\"hfxmrhjnnhbcj\":\"eortwwyjmgvr\",\"fictptplkossjbzv\":\"wkdywkszavuafan\",\"czhfjdcc\":\"pzwdqzuhfgti\"},\"id\":\"nyuvbtcuhjcgjt\",\"name\":\"kntomnlz\",\"type\":\"hcdb\"}"; + = "{\"properties\":{\"annotation\":\"vm\",\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"iqwx\",\"rgmnkgtlhzkrazk\",\"oiyecznvzmsvzng\"],\"condition\":\"Or\",\"destinationAddressList\":[\"ehgvmmnoyz\",\"nbnyplu\",\"ypkfcdfuxi\"],\"sourceAddressList\":[\"xotnoil\",\"cdvhyefqhxyts\",\"mbwcacwa\"],\"headerAddressList\":[{\"headerName\":\"vokyaxxratqlreq\",\"addressList\":[\"mmd\",\"shzumxuczn\"]},{\"headerName\":\"bowr\",\"addressList\":[\"nmjwkowxqzk\",\"agve\",\"hmnaphrskmpeajz\",\"ypavamzmzfn\"]},{\"headerName\":\"eyrftxytjayp\",\"addressList\":[\"jlijkk\",\"bfaehjjirvjqx\",\"vqmdmrac\",\"sffdralihhssc\"]}]},\"lastOperation\":{\"details\":\"z\"},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"v\",\"rjlndxr\"]},\"location\":\"zvti\",\"tags\":{\"rubx\":\"p\",\"teccxfn\":\"xoyjyhutwedigiv\",\"xbqpmfhjikqcnb\":\"tntmc\",\"ucgrmwyv\":\"qitghnmelzvrchm\"},\"id\":\"d\",\"name\":\"yplgq\",\"type\":\"qgrbrhhv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGatewayRule response = manager.internetGatewayRules() - .define("hdbitq") - .withRegion("rrvkx") - .withExistingResourceGroup("xsxoxvimdvet") - .withRuleProperties( - new RuleProperties().withAction(Action.ALLOW).withAddressList(Arrays.asList("ujsgomrihumgrm", "d"))) - .withTags(mapOf("zjighd", "tanetinqxdhnpjn", "wvwetqffuxvfh", "mltpmr", "clmr", "qhngqqxjbsot", - "xbboceksramqch", "tujydeatwxpxbxed")) - .withAnnotation("yt") + .define("vgyoggkztzttj") + .withRegion("yoscifrz") + .withExistingResourceGroup("xuupczegqnaidvs") + .withProperties(new InternetGatewayRuleProperties().withAnnotation("npb") + .withRuleProperties(new RuleProperties().withAction(Action.DENY) + .withAddressList(Arrays.asList("uobclobnaqeizpli", "lyugpnn", "zjmkffeonmnvmu", "yiqywlpxmli")) + .withCondition(RuleCondition.OR) + .withDestinationAddressList(Arrays.asList("crunbkilxs", "ekbirhyvsyuv")) + .withSourceAddressList(Arrays.asList("morszffiuklt", "vgiog", "oxcsdqoxhdenmjog", "grggyc")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("qinr") + .withAddressList(Arrays.asList("vmr", "jrdi")), + new HeaderAddressProperties().withHeaderName("xqswsychdcjggcm") + .withAddressList(Arrays.asList("jqbgbn", "qnowvfxey", "zgwjekyqirvcpoln")), + new HeaderAddressProperties().withHeaderName("pppd") + .withAddressList(Arrays.asList("dvxlfhlzzga", "sp", "wwblscrmzqu", "zywkgouxn")))))) + .withTags(mapOf("lf", "ejm")) .create(); - Assertions.assertEquals("dlckdoxocjcdevz", response.location()); - Assertions.assertEquals("eortwwyjmgvr", response.tags().get("hfxmrhjnnhbcj")); - Assertions.assertEquals(Action.DENY, response.ruleProperties().action()); - Assertions.assertEquals("kzstzpzecdlc", response.ruleProperties().addressList().get(0)); - Assertions.assertEquals("etxeudw", response.annotation()); + Assertions.assertEquals("zvti", response.location()); + Assertions.assertEquals("p", response.tags().get("rubx")); + Assertions.assertEquals("vm", response.properties().annotation()); + Assertions.assertEquals(Action.ALLOW, response.properties().ruleProperties().action()); + Assertions.assertEquals("iqwx", response.properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, response.properties().ruleProperties().condition()); + Assertions.assertEquals("ehgvmmnoyz", response.properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("xotnoil", response.properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("vokyaxxratqlreq", + response.properties().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("mmd", + response.properties().ruleProperties().headerAddressList().get(0).addressList().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java index fb86b44f08d3..81219df6ec06 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,23 +23,30 @@ public final class InternetGatewayRulesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"uujxsujk\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"e\",\"xbnjnczepdpc\"],\"annotation\":\"g\"},\"location\":\"mdquyyaescjxnavp\",\"tags\":{\"tbfkihainzkef\":\"bkx\",\"vcozcgoeozli\":\"zl\",\"honyonelivgtibt\":\"cbnunzuysajvvq\",\"mrvkxeojtdyulglh\":\"qjqjcajgofytkhhk\"},\"id\":\"lwruklfq\",\"name\":\"xspxgogypbztgae\",\"type\":\"jnskvct\"}"; + = "{\"properties\":{\"annotation\":\"zywx\",\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"xtkdeetnnefput\",\"ks\"],\"condition\":\"And\",\"destinationAddressList\":[\"rzs\",\"wasfw\",\"jzyb\"],\"sourceAddressList\":[\"dnppfcfguamrva\",\"u\",\"kgdwpj\",\"blukgctvnspjvsy\"],\"headerAddressList\":[{\"headerName\":\"hdukcsqvyeegxhu\",\"addressList\":[\"wumfjd\"]},{\"headerName\":\"eqvnxpfyxdj\",\"addressList\":[\"onxemhqp\",\"hnatwvgcmcvdjl\",\"wefevt\"]},{\"headerName\":\"lqypmjcoyv\",\"addressList\":[\"kzuhkshxjkckwbq\"]}]},\"lastOperation\":{\"details\":\"fmmkwa\"},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"zhobnvyue\",\"a\",\"oerohextigukfk\",\"sycbdymbnp\"]},\"location\":\"nlqtqyv\",\"tags\":{\"vqdvfjdsqephtosh\":\"s\"},\"id\":\"tuarjw\",\"name\":\"ujrcnxa\",\"type\":\"ypyqoizfyasydd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGatewayRule response = manager.internetGatewayRules() - .getByResourceGroupWithResponse("lzayjwdun", "hmprkla", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("katupmrslwknrdv", "mbjern", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mdquyyaescjxnavp", response.location()); - Assertions.assertEquals("bkx", response.tags().get("tbfkihainzkef")); - Assertions.assertEquals(Action.DENY, response.ruleProperties().action()); - Assertions.assertEquals("uujxsujk", response.ruleProperties().addressList().get(0)); - Assertions.assertEquals("g", response.annotation()); + Assertions.assertEquals("nlqtqyv", response.location()); + Assertions.assertEquals("s", response.tags().get("vqdvfjdsqephtosh")); + Assertions.assertEquals("zywx", response.properties().annotation()); + Assertions.assertEquals(Action.DENY, response.properties().ruleProperties().action()); + Assertions.assertEquals("xtkdeetnnefput", response.properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, response.properties().ruleProperties().condition()); + Assertions.assertEquals("rzs", response.properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("dnppfcfguamrva", response.properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("hdukcsqvyeegxhu", + response.properties().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("wumfjd", + response.properties().ruleProperties().headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java index 7a24a5bf2098..208232c5aeb2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,22 +24,32 @@ public final class InternetGatewayRulesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"xrnwukfajnp\",\"wzjggkwdep\",\"mz\",\"ayfiq\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"orjvudyhgtrtt\",\"uayiqyl\",\"kmmxzifbqgqexo\",\"q\"],\"annotation\":\"tgqrqkkvfygkuobp\"},\"location\":\"inpgobothxiew\",\"tags\":{\"qgzyvextc\":\"yjt\",\"whdlrifioz\":\"slroldow\",\"kudsozodwjc\":\"tcbiich\",\"qycymzrlcfg\":\"qoyxr\"},\"id\":\"wzauzfdhe\",\"name\":\"dnyciwzk\",\"type\":\"lykqadfge\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"iflrvfeowctshw\",\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"asabvauz\",\"wwumkbpgcilbwtp\",\"bjlpfwuq\"],\"condition\":\"Or\",\"destinationAddressList\":[\"iten\",\"ukslizmpnxgh\",\"mrplanc\",\"qotmmxlmxejwy\"],\"sourceAddressList\":[\"b\"],\"headerAddressList\":[{\"headerName\":\"uekbbypqsmp\",\"addressList\":[\"qieiuxhj\",\"wndalnjjh\"]},{\"headerName\":\"kjjpcpih\",\"addressList\":[\"xvtajfjato\",\"dnekurdgcpz\",\"naqve\",\"gnpuelrnanbrpkoc\"]}]},\"lastOperation\":{\"details\":\"bagegjtjltckiwx\"},\"provisioningState\":\"Failed\",\"internetGatewayIds\":[\"ijxmdboe\",\"nhxh\",\"h\"]},\"location\":\"einvzsodm\",\"tags\":{\"pcjxh\":\"qdbsgkqyjkot\"},\"id\":\"zzlocj\",\"name\":\"zppdbrbmcxb\",\"type\":\"fprsmivapesbfz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.internetGatewayRules().listByResourceGroup("uzimbwttmhlvr", com.azure.core.util.Context.NONE); + = manager.internetGatewayRules().listByResourceGroup("bwscjwyye", com.azure.core.util.Context.NONE); - Assertions.assertEquals("inpgobothxiew", response.iterator().next().location()); - Assertions.assertEquals("yjt", response.iterator().next().tags().get("qgzyvextc")); - Assertions.assertEquals(Action.ALLOW, response.iterator().next().ruleProperties().action()); - Assertions.assertEquals("xrnwukfajnp", response.iterator().next().ruleProperties().addressList().get(0)); - Assertions.assertEquals("tgqrqkkvfygkuobp", response.iterator().next().annotation()); + Assertions.assertEquals("einvzsodm", response.iterator().next().location()); + Assertions.assertEquals("qdbsgkqyjkot", response.iterator().next().tags().get("pcjxh")); + Assertions.assertEquals("iflrvfeowctshw", response.iterator().next().properties().annotation()); + Assertions.assertEquals(Action.DENY, response.iterator().next().properties().ruleProperties().action()); + Assertions.assertEquals("asabvauz", + response.iterator().next().properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, response.iterator().next().properties().ruleProperties().condition()); + Assertions.assertEquals("iten", + response.iterator().next().properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("b", + response.iterator().next().properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("uekbbypqsmp", + response.iterator().next().properties().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("qieiuxhj", + response.iterator().next().properties().ruleProperties().headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java index 92c7e125f8a6..2820c0c780a3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.Action; import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,22 +24,32 @@ public final class InternetGatewayRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"oha\",\"bri\",\"madjrsbga\"]},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"vqmxqsxofxqnki\",\"okgltsx\",\"oiobh\"],\"annotation\":\"b\"},\"location\":\"ptlsrvqzgaqs\",\"tags\":{\"oxrqhjninpeswv\":\"njlvgrghnh\"},\"id\":\"hq\",\"name\":\"gebzqzmcsviujo\",\"type\":\"zdvmsnao\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"ejrwwsfvt\",\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"tmblmf\",\"leuo\"],\"condition\":\"Or\",\"destinationAddressList\":[\"prbxjtezujtou\",\"odexwmvssrjciexu\"],\"sourceAddressList\":[\"tgtg\",\"bymmcgsksc\",\"sxehaxi\"],\"headerAddressList\":[{\"headerName\":\"xolknshgwakptb\",\"addressList\":[\"glmnlbnatln\"]},{\"headerName\":\"zzc\",\"addressList\":[\"ortdzzvhbu\",\"kahophqwojdz\"]},{\"headerName\":\"qtwsrbfbs\",\"addressList\":[\"cdzfbvexrv\",\"h\"]}]},\"lastOperation\":{\"details\":\"snqpvjtshl\"},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"sdzmhwtsyppwf\",\"woetxizrfwxhflgd\",\"ngaypxsazbxsn\",\"yksznfstmprvgra\"]},\"location\":\"zktwomlpc\",\"tags\":{\"mrolhsfddkhxvev\":\"boomz\",\"yhtuhalpq\":\"xmnbwaxadxgn\",\"aokex\":\"ld\"},\"id\":\"npnytkqjar\",\"name\":\"azbtgtzp\",\"type\":\"atrmzoujfgt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.internetGatewayRules().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ptlsrvqzgaqs", response.iterator().next().location()); - Assertions.assertEquals("njlvgrghnh", response.iterator().next().tags().get("oxrqhjninpeswv")); - Assertions.assertEquals(Action.DENY, response.iterator().next().ruleProperties().action()); - Assertions.assertEquals("oha", response.iterator().next().ruleProperties().addressList().get(0)); - Assertions.assertEquals("b", response.iterator().next().annotation()); + Assertions.assertEquals("zktwomlpc", response.iterator().next().location()); + Assertions.assertEquals("boomz", response.iterator().next().tags().get("mrolhsfddkhxvev")); + Assertions.assertEquals("ejrwwsfvt", response.iterator().next().properties().annotation()); + Assertions.assertEquals(Action.ALLOW, response.iterator().next().properties().ruleProperties().action()); + Assertions.assertEquals("tmblmf", + response.iterator().next().properties().ruleProperties().addressList().get(0)); + Assertions.assertEquals(RuleCondition.OR, response.iterator().next().properties().ruleProperties().condition()); + Assertions.assertEquals("prbxjtezujtou", + response.iterator().next().properties().ruleProperties().destinationAddressList().get(0)); + Assertions.assertEquals("tgtg", + response.iterator().next().properties().ruleProperties().sourceAddressList().get(0)); + Assertions.assertEquals("xolknshgwakptb", + response.iterator().next().properties().ruleProperties().headerAddressList().get(0).headerName()); + Assertions.assertEquals("glmnlbnatln", + response.iterator().next().properties().ruleProperties().headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.java deleted file mode 100644 index a48ca70102a4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListResultTests.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.InternetGatewayRuleInner; -import com.azure.resourcemanager.managednetworkfabric.models.Action; -import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InternetGatewayRulesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternetGatewayRulesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ruleProperties\":{\"action\":\"Allow\",\"addressList\":[\"v\",\"hlaiwd\",\"xsmlz\",\"hzdtxetlgydlh\"]},\"provisioningState\":\"Succeeded\",\"internetGatewayIds\":[\"pxy\",\"afiqgeaarbgjekg\",\"klbyulidwcw\"],\"annotation\":\"zegjonfhjirwgdn\"},\"location\":\"brfkspz\",\"tags\":{\"jcitdigsxcdglj\":\"tk\",\"tomflrytswfpf\":\"lkeuac\",\"lurlpshhkvp\":\"dgycxnmskwhqjjy\",\"skondcbrwimu\":\"dwqslsrhmpqvw\"},\"id\":\"qejo\",\"name\":\"ovyrrleaesinu\",\"type\":\"tljqobbpih\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"ecybmrqbrj\",\"bmpxdlvykfrexc\",\"s\",\"qwjksghudgz\"]},\"provisioningState\":\"Deleting\",\"internetGatewayIds\":[\"ggsvoujkxibdaf\",\"rkmdyom\"],\"annotation\":\"fbvfbhdy\"},\"location\":\"hpwpgddeimawzovg\",\"tags\":{\"sqowxwc\":\"muikjcjcaztbws\"},\"id\":\"mlikytw\",\"name\":\"czcswka\",\"type\":\"ve\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"dvlvhbwrnfxtgdd\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"hn\",\"naoyank\",\"oe\",\"swankltytmh\"],\"annotation\":\"oznnhdrlktgj\"},\"location\":\"gguxhemlwyw\",\"tags\":{\"bukklels\":\"czg\",\"srlsmd\":\"xblycsxzuj\"},\"id\":\"sqplpvmjcd\",\"name\":\"ewbidyvteowxv\",\"type\":\"piudeugfsxzecpa\"},{\"properties\":{\"ruleProperties\":{\"action\":\"Deny\",\"addressList\":[\"ufykhvuhxepmru\",\"znabaobns\"]},\"provisioningState\":\"Accepted\",\"internetGatewayIds\":[\"ltymkmvguihywart\",\"pphkixkykxds\",\"j\",\"emmucfxh\"],\"annotation\":\"kflrmymy\"},\"location\":\"cqlh\",\"tags\":{\"uugqk\":\"wslmiiiovgqcg\"},\"id\":\"totiowlxteqdptjg\",\"name\":\"dtguk\",\"type\":\"anblwphqlkccu\"}],\"nextLink\":\"ygqwahoiu\"}") - .toObject(InternetGatewayRulesListResult.class); - Assertions.assertEquals("brfkspz", model.value().get(0).location()); - Assertions.assertEquals("tk", model.value().get(0).tags().get("jcitdigsxcdglj")); - Assertions.assertEquals(Action.ALLOW, model.value().get(0).ruleProperties().action()); - Assertions.assertEquals("v", model.value().get(0).ruleProperties().addressList().get(0)); - Assertions.assertEquals("zegjonfhjirwgdn", model.value().get(0).annotation()); - Assertions.assertEquals("ygqwahoiu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternetGatewayRulesListResult model = new InternetGatewayRulesListResult().withValue(Arrays.asList( - new InternetGatewayRuleInner().withLocation("brfkspz") - .withTags(mapOf("jcitdigsxcdglj", "tk", "tomflrytswfpf", "lkeuac", "lurlpshhkvp", "dgycxnmskwhqjjy", - "skondcbrwimu", "dwqslsrhmpqvw")) - .withRuleProperties(new RuleProperties().withAction(Action.ALLOW) - .withAddressList(Arrays.asList("v", "hlaiwd", "xsmlz", "hzdtxetlgydlh"))) - .withAnnotation("zegjonfhjirwgdn"), - new InternetGatewayRuleInner().withLocation("hpwpgddeimawzovg") - .withTags(mapOf("sqowxwc", "muikjcjcaztbws")) - .withRuleProperties(new RuleProperties().withAction(Action.DENY) - .withAddressList(Arrays.asList("ecybmrqbrj", "bmpxdlvykfrexc", "s", "qwjksghudgz"))) - .withAnnotation("fbvfbhdy"), - new InternetGatewayRuleInner().withLocation("gguxhemlwyw") - .withTags(mapOf("bukklels", "czg", "srlsmd", "xblycsxzuj")) - .withRuleProperties( - new RuleProperties().withAction(Action.DENY).withAddressList(Arrays.asList("dvlvhbwrnfxtgdd"))) - .withAnnotation("oznnhdrlktgj"), - new InternetGatewayRuleInner().withLocation("cqlh") - .withTags(mapOf("uugqk", "wslmiiiovgqcg")) - .withRuleProperties(new RuleProperties().withAction(Action.DENY) - .withAddressList(Arrays.asList("ufykhvuhxepmru", "znabaobns"))) - .withAnnotation("kflrmymy"))) - .withNextLink("ygqwahoiu"); - model = BinaryData.fromObject(model).toObject(InternetGatewayRulesListResult.class); - Assertions.assertEquals("brfkspz", model.value().get(0).location()); - Assertions.assertEquals("tk", model.value().get(0).tags().get("jcitdigsxcdglj")); - Assertions.assertEquals(Action.ALLOW, model.value().get(0).ruleProperties().action()); - Assertions.assertEquals("v", model.value().get(0).ruleProperties().addressList().get(0)); - Assertions.assertEquals("zegjonfhjirwgdn", model.value().get(0).annotation()); - Assertions.assertEquals("ygqwahoiu", model.nextLink()); - } - - // Use "Map.of" if available - @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/InternetGatewaysCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java index f4442f870735..af0fc931c789 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -24,32 +25,34 @@ public final class InternetGatewaysCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"ipv4Address\":\"ldaqwjun\",\"port\":300799614,\"type\":\"Workload\",\"networkFabricControllerId\":\"jhwcbrdsyp\",\"provisioningState\":\"Succeeded\",\"internetGatewayRuleId\":\"kbvzpkodngvnq\",\"annotation\":\"gsbtwgnldxu\"},\"location\":\"lhvbqyczn\",\"tags\":{\"qwucqsdgbx\":\"piiuvcqoq\",\"myvwp\":\"wtvmijccpkkjl\"},\"id\":\"jmaih\",\"name\":\"nnlb\",\"type\":\"xjppcbqetfzfppv\"}"; + = "{\"properties\":{\"annotation\":\"l\",\"internetGatewayRuleId\":\"ddvjlpbj\",\"ipv4Address\":\"qjfskjva\",\"port\":1471740717,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"sbghypb\",\"lastOperation\":{\"details\":\"iypzcyh\"},\"provisioningState\":\"Succeeded\"},\"location\":\"btpgvu\",\"tags\":{\"owke\":\"usfdywqrq\",\"gtcuyuwgnyjd\":\"dgrcifflxqqn\"},\"id\":\"ujticwmlf\",\"name\":\"lhibfm\",\"type\":\"oxbk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGateway response = manager.internetGateways() - .define("mi") - .withRegion("xpijvapeak") - .withExistingResourceGroup("o") - .withTypePropertiesType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("znghuqzgpdglkf") - .withTags(mapOf("a", "cedliklxkyoddoq", "qyrgqmndk", "qtrkicw")) - .withInternetGatewayRuleId("gavtfy") - .withAnnotation("edfmzuk") + .define("ltaprq") + .withRegion("subehztbejrdzwyk") + .withExistingResourceGroup("hwlvsvs") + .withProperties(new InternetGatewayProperties().withAnnotation("kmvzrkpmonxdwf") + .withInternetGatewayRuleId("hbgftfvq") + .withType(GatewayType.INFRASTRUCTURE) + .withInternetGatewayType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId("rjylw")) + .withTags(mapOf("ykqflkmcykxmysm", "fzwufifnjwjhmj", "be", "bndnrihpjaxh", "ig", "jn")) .create(); - Assertions.assertEquals("lhvbqyczn", response.location()); - Assertions.assertEquals("piiuvcqoq", response.tags().get("qwucqsdgbx")); - Assertions.assertEquals(GatewayType.WORKLOAD, response.typePropertiesType()); - Assertions.assertEquals("jhwcbrdsyp", response.networkFabricControllerId()); - Assertions.assertEquals("kbvzpkodngvnq", response.internetGatewayRuleId()); - Assertions.assertEquals("gsbtwgnldxu", response.annotation()); + Assertions.assertEquals("btpgvu", response.location()); + Assertions.assertEquals("usfdywqrq", response.tags().get("owke")); + Assertions.assertEquals("l", response.properties().annotation()); + Assertions.assertEquals("ddvjlpbj", response.properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.properties().type()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.properties().internetGatewayType()); + Assertions.assertEquals("sbghypb", response.properties().networkFabricControllerId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java index 2c5370941cec..f26a36b7c725 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupWithResponseMockTests.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; import java.nio.charset.StandardCharsets; @@ -22,24 +22,25 @@ public final class InternetGatewaysGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"ipv4Address\":\"do\",\"port\":530993716,\"type\":\"Infrastructure\",\"networkFabricControllerId\":\"k\",\"provisioningState\":\"Succeeded\",\"internetGatewayRuleId\":\"dprpensbmzjrituk\",\"annotation\":\"mh\"},\"location\":\"exmizzjxwjoqfzw\",\"tags\":{\"tqmri\":\"uhduwdvol\",\"zbkiumjf\":\"dsf\",\"voyiogbntnwzr\":\"oxedrmrazhvch\",\"vcebspcir\":\"zsoowxcsmxtlcapp\"},\"id\":\"omhkdwuwedupb\",\"name\":\"mzkwhjjsqwhae\",\"type\":\"efvvkxdb\"}"; + = "{\"properties\":{\"annotation\":\"xdm\",\"internetGatewayRuleId\":\"ad\",\"ipv4Address\":\"wqeu\",\"port\":860231042,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"dqdchnzibixrgs\",\"lastOperation\":{\"details\":\"xqkwargcbgd\"},\"provisioningState\":\"Updating\"},\"location\":\"jiqex\",\"tags\":{\"hcnnkvthwtam\":\"ykmvugflhdhoxu\"},\"id\":\"m\",\"name\":\"gyvxhfmuhkezuucq\",\"type\":\"cocdxvbeqzjd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InternetGateway response = manager.internetGateways() - .getByResourceGroupWithResponse("jixgofqdqws", "mihuvrqp", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("pgtipaaoylwh", "mkbweasgyp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("exmizzjxwjoqfzw", response.location()); - Assertions.assertEquals("uhduwdvol", response.tags().get("tqmri")); - Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.typePropertiesType()); - Assertions.assertEquals("k", response.networkFabricControllerId()); - Assertions.assertEquals("dprpensbmzjrituk", response.internetGatewayRuleId()); - Assertions.assertEquals("mh", response.annotation()); + Assertions.assertEquals("jiqex", response.location()); + Assertions.assertEquals("ykmvugflhdhoxu", response.tags().get("hcnnkvthwtam")); + Assertions.assertEquals("xdm", response.properties().annotation()); + Assertions.assertEquals("ad", response.properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.properties().type()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.properties().internetGatewayType()); + Assertions.assertEquals("dqdchnzibixrgs", response.properties().networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java index 28f7c321c5cb..9f57d08c5313 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; import java.nio.charset.StandardCharsets; @@ -23,23 +23,26 @@ public final class InternetGatewaysListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ipv4Address\":\"dzdobuesdy\",\"port\":666543839,\"type\":\"Infrastructure\",\"networkFabricControllerId\":\"z\",\"provisioningState\":\"Canceled\",\"internetGatewayRuleId\":\"upktwpdpsegivyt\",\"annotation\":\"vbbkflewgsltut\"},\"location\":\"vedwuu\",\"tags\":{\"kk\":\"enxcqsxwclykcrud\",\"mptedeuenthsh\":\"njre\",\"kkhpjngla\":\"fiygpg\"},\"id\":\"lmihnmtrdlpxiw\",\"name\":\"gecpvfpnr\",\"type\":\"i\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"tlxugjrwvnff\",\"internetGatewayRuleId\":\"fkv\",\"ipv4Address\":\"uxzkfbv\",\"port\":1334404488,\"type\":\"Infrastructure\",\"internetGatewayType\":\"Infrastructure\",\"networkFabricControllerId\":\"stvymdqaymqmyrnz\",\"lastOperation\":{\"details\":\"qkfnoxhvoyjdgfkr\"},\"provisioningState\":\"Updating\"},\"location\":\"vpakxrdee\",\"tags\":{\"pzurnzoy\":\"juguvnxbo\"},\"id\":\"kbeadyfen\",\"name\":\"ozoijoxcbpkiw\",\"type\":\"eacbtaxdrp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.internetGateways().listByResourceGroup("mcvaq", com.azure.core.util.Context.NONE); + = manager.internetGateways().listByResourceGroup("xtutpdwneec", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vedwuu", response.iterator().next().location()); - Assertions.assertEquals("enxcqsxwclykcrud", response.iterator().next().tags().get("kk")); - Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.iterator().next().typePropertiesType()); - Assertions.assertEquals("z", response.iterator().next().networkFabricControllerId()); - Assertions.assertEquals("upktwpdpsegivyt", response.iterator().next().internetGatewayRuleId()); - Assertions.assertEquals("vbbkflewgsltut", response.iterator().next().annotation()); + Assertions.assertEquals("vpakxrdee", response.iterator().next().location()); + Assertions.assertEquals("juguvnxbo", response.iterator().next().tags().get("pzurnzoy")); + Assertions.assertEquals("tlxugjrwvnff", response.iterator().next().properties().annotation()); + Assertions.assertEquals("fkv", response.iterator().next().properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, response.iterator().next().properties().type()); + Assertions.assertEquals(GatewayType.INFRASTRUCTURE, + response.iterator().next().properties().internetGatewayType()); + Assertions.assertEquals("stvymdqaymqmyrnz", + response.iterator().next().properties().networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java index 11817ec18b4f..1207b1e53b0d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; import java.nio.charset.StandardCharsets; @@ -23,22 +23,23 @@ public final class InternetGatewaysListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ipv4Address\":\"oxl\",\"port\":397632568,\"type\":\"Workload\",\"networkFabricControllerId\":\"yf\",\"provisioningState\":\"Succeeded\",\"internetGatewayRuleId\":\"ifbwbl\",\"annotation\":\"hpxukxgoyxon\"},\"location\":\"wdqrxros\",\"tags\":{\"atktwjrppifeyrq\":\"rldxfuaefew\",\"ojklwjpzw\":\"elrmdcizhvks\"},\"id\":\"ncw\",\"name\":\"smpyeyzolbfnfly\",\"type\":\"fxudui\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"hsxw\",\"internetGatewayRuleId\":\"rztdacrqcwk\",\"ipv4Address\":\"qy\",\"port\":1195085552,\"type\":\"Workload\",\"internetGatewayType\":\"Workload\",\"networkFabricControllerId\":\"zupd\",\"lastOperation\":{\"details\":\"rufs\"},\"provisioningState\":\"Succeeded\"},\"location\":\"xk\",\"tags\":{\"s\":\"m\",\"ceylaulpuexyigxz\":\"vxwkscwbshfihvlm\"},\"id\":\"yecxdslspgn\",\"name\":\"d\",\"type\":\"fyhsb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.internetGateways().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("wdqrxros", response.iterator().next().location()); - Assertions.assertEquals("rldxfuaefew", response.iterator().next().tags().get("atktwjrppifeyrq")); - Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().typePropertiesType()); - Assertions.assertEquals("yf", response.iterator().next().networkFabricControllerId()); - Assertions.assertEquals("ifbwbl", response.iterator().next().internetGatewayRuleId()); - Assertions.assertEquals("hpxukxgoyxon", response.iterator().next().annotation()); + Assertions.assertEquals("xk", response.iterator().next().location()); + Assertions.assertEquals("m", response.iterator().next().tags().get("s")); + Assertions.assertEquals("hsxw", response.iterator().next().properties().annotation()); + Assertions.assertEquals("rztdacrqcwk", response.iterator().next().properties().internetGatewayRuleId()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().properties().type()); + Assertions.assertEquals(GatewayType.WORKLOAD, response.iterator().next().properties().internetGatewayType()); + Assertions.assertEquals("zupd", response.iterator().next().properties().networkFabricControllerId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.java deleted file mode 100644 index 5c68e391a9c6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListResultTests.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.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; -import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; -import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewaysListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InternetGatewaysListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternetGatewaysListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ipv4Address\":\"hbhlvbm\",\"port\":453041096,\"type\":\"Workload\",\"networkFabricControllerId\":\"bsxtkcudfbsfarfs\",\"provisioningState\":\"Accepted\",\"internetGatewayRuleId\":\"kjxnqpvwgfstmhq\",\"annotation\":\"izmdksa\"},\"location\":\"fcluqvo\",\"tags\":{\"w\":\"cjimryvwgcwwpbmz\",\"bvopwndyqle\":\"sydsxwefohe\",\"lowkxxpvb\":\"llklmtk\",\"k\":\"dfjmzsyzfhotlh\"},\"id\":\"yych\",\"name\":\"nsjlpjrtws\",\"type\":\"hv\"},{\"properties\":{\"ipv4Address\":\"icphvtrrmhw\",\"port\":231529095,\"type\":\"Workload\",\"networkFabricControllerId\":\"pyf\",\"provisioningState\":\"Failed\",\"internetGatewayRuleId\":\"vjglrocuyzlwhhme\",\"annotation\":\"ooclutnp\"},\"location\":\"emc\",\"tags\":{\"jxsglhsr\":\"mmyky\",\"ylmbkzudni\":\"rye\",\"tjewlpxuzzj\":\"rfih\",\"otoihiqa\":\"nrefqyh\"},\"id\":\"ydiw\",\"name\":\"brkwpzdqt\",\"type\":\"hcspo\"}],\"nextLink\":\"qaxsipietgbebjf\"}") - .toObject(InternetGatewaysListResult.class); - Assertions.assertEquals("fcluqvo", model.value().get(0).location()); - Assertions.assertEquals("cjimryvwgcwwpbmz", model.value().get(0).tags().get("w")); - Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).typePropertiesType()); - Assertions.assertEquals("bsxtkcudfbsfarfs", model.value().get(0).networkFabricControllerId()); - Assertions.assertEquals("kjxnqpvwgfstmhq", model.value().get(0).internetGatewayRuleId()); - Assertions.assertEquals("izmdksa", model.value().get(0).annotation()); - Assertions.assertEquals("qaxsipietgbebjf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternetGatewaysListResult model = new InternetGatewaysListResult().withValue(Arrays.asList( - new InternetGatewayInner().withLocation("fcluqvo") - .withTags(mapOf("w", "cjimryvwgcwwpbmz", "bvopwndyqle", "sydsxwefohe", "lowkxxpvb", "llklmtk", "k", - "dfjmzsyzfhotlh")) - .withTypePropertiesType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("bsxtkcudfbsfarfs") - .withInternetGatewayRuleId("kjxnqpvwgfstmhq") - .withAnnotation("izmdksa"), - new InternetGatewayInner().withLocation("emc") - .withTags(mapOf("jxsglhsr", "mmyky", "ylmbkzudni", "rye", "tjewlpxuzzj", "rfih", "otoihiqa", "nrefqyh")) - .withTypePropertiesType(GatewayType.WORKLOAD) - .withNetworkFabricControllerId("pyf") - .withInternetGatewayRuleId("vjglrocuyzlwhhme") - .withAnnotation("ooclutnp"))) - .withNextLink("qaxsipietgbebjf"); - model = BinaryData.fromObject(model).toObject(InternetGatewaysListResult.class); - Assertions.assertEquals("fcluqvo", model.value().get(0).location()); - Assertions.assertEquals("cjimryvwgcwwpbmz", model.value().get(0).tags().get("w")); - Assertions.assertEquals(GatewayType.WORKLOAD, model.value().get(0).typePropertiesType()); - Assertions.assertEquals("bsxtkcudfbsfarfs", model.value().get(0).networkFabricControllerId()); - Assertions.assertEquals("kjxnqpvwgfstmhq", model.value().get(0).internetGatewayRuleId()); - Assertions.assertEquals("izmdksa", model.value().get(0).annotation()); - Assertions.assertEquals("qaxsipietgbebjf", model.nextLink()); - } - - // Use "Map.of" if available - @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/IpCommunitiesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java index 0c4151496afc..de2628f19fa9 100644 --- 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 @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.nio.charset.StandardCharsets; @@ -27,43 +28,49 @@ public final class IpCommunitiesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":7419786157769811395,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"rrrqnneqrypyurv\",\"hhovtue\"]},{\"action\":\"Permit\",\"sequenceNumber\":5041983404964007850,\"wellKnownCommunities\":[\"NoExport\",\"GShut\"],\"communityMembers\":[\"yb\",\"dzycxhaoegjzgplj\",\"nwczsraz\"]},{\"action\":\"Deny\",\"sequenceNumber\":7036914459390802617,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoAdvertise\"],\"communityMembers\":[\"h\",\"pua\",\"asizzfmugykwuyc\",\"otennd\"]}],\"annotation\":\"thdzitjzffph\"},\"location\":\"wjqvs\",\"tags\":{\"z\":\"onadez\",\"rsguogkcbr\":\"vfybxmmrvnuvqk\",\"tvvqtmvifgcvsim\":\"tpyabensjflwp\",\"xgosnxa\":\"lbmti\"},\"id\":\"ptcd\",\"name\":\"mzxaoxlhmvj\",\"type\":\"nn\"}"; + = "{\"properties\":{\"annotation\":\"dawe\",\"networkFabricId\":\"avfyihuzsbpw\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4667096588741355727,\"wellKnownCommunities\":[\"GShut\"],\"communityMembers\":[\"wiimdlzgkooag\"]},{\"action\":\"Deny\",\"sequenceNumber\":6080877762122125877,\"wellKnownCommunities\":[\"LocalAS\",\"GShut\"],\"communityMembers\":[\"twqade\",\"h\",\"wxkyxi\"]},{\"action\":\"Permit\",\"sequenceNumber\":1049366336236077662,\"wellKnownCommunities\":[\"GShut\"],\"communityMembers\":[\"ifllxccprk\",\"yfozwhomydxg\",\"uqbvfq\"]}],\"lastOperation\":{\"details\":\"hirqvvke\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"t\",\"tags\":{\"aqgbb\":\"vqxerxrmhr\",\"zsyiumtitlq\":\"lvihylrxsi\"},\"id\":\"cf\",\"name\":\"ernnkqpkayqiv\",\"type\":\"igdrqgzetboyz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - IpCommunity response - = manager.ipCommunities() - .define("khdhpmkxdujkxpuq") - .withRegion("i") - .withExistingResourceGroup("cabaam") - .withTags(mapOf("pvhcbtza", "bvxqtolpwb", "ick", "rjxcon", "gvuqzgbjwvrudmp", "kithueoc", "esgyzwph", - "ewpmioleaja")) + IpCommunity response = manager.ipCommunities() + .define("o") + .withRegion("ujtcoojybolq") + .withExistingResourceGroup("ipssv") + .withProperties(new IpCommunityProperties().withAnnotation("jcqcjozzjk") .withIpCommunityRules(Arrays.asList( new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4994198146168498626L) + .withSequenceNumber(8226253770069264460L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.GSHUT, + WellKnownCommunities.NO_EXPORT, WellKnownCommunities.GSHUT)) + .withCommunityMembers( + Arrays.asList("rhwetto", "gpzwxyvtkzbhizx", "usddmwnfhmjusu", "nkushvlxudhekaqn")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(5039074890047899257L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("cgszfbqygkxrlfo")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(6616732895204300669L) .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("ezxiz", "syxbfjilb")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6838121574977908802L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE)) - .withCommunityMembers(Arrays.asList("wivkdf", "jsk")))) - .withAnnotation("bxzepirtv") - .create(); + Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("ybodhrv", "k", "u"))))) + .withTags(mapOf("zlinvamtykx", "ptsliivmlkw", "sqmzdoz", "zdekfx")) + .create(); - Assertions.assertEquals("wjqvs", response.location()); - Assertions.assertEquals("onadez", response.tags().get("z")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.ipCommunityRules().get(0).action()); - Assertions.assertEquals(7419786157769811395L, response.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, - response.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("rrrqnneqrypyurv", response.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("thdzitjzffph", response.annotation()); + Assertions.assertEquals("t", response.location()); + Assertions.assertEquals("vqxerxrmhr", response.tags().get("aqgbb")); + Assertions.assertEquals("dawe", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(4667096588741355727L, response.properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.GSHUT, + response.properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("wiimdlzgkooag", + response.properties().ipCommunityRules().get(0).communityMembers().get(0)); } // Use "Map.of" if available 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 index ccd1f7f7fcb3..205e545c4992 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; @@ -23,26 +23,26 @@ public final class IpCommunitiesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":6487978937622546147,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"dfiekkiskyy\",\"aeknfffy\"]},{\"action\":\"Permit\",\"sequenceNumber\":2958499754343838175,\"wellKnownCommunities\":[\"NoExport\",\"GShut\",\"NoExport\"],\"communityMembers\":[\"ufbbjiu\",\"fofhoajjyls\"]},{\"action\":\"Permit\",\"sequenceNumber\":3348662806706509828,\"wellKnownCommunities\":[\"LocalAS\",\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"qquyhbcee\"]},{\"action\":\"Permit\",\"sequenceNumber\":7959928209860796152,\"wellKnownCommunities\":[\"LocalAS\",\"NoExport\",\"Internet\"],\"communityMembers\":[\"tvuxeu\",\"mds\",\"ij\",\"axxfdlypkcpw\"]}],\"annotation\":\"qnnmjundt\"},\"location\":\"cltjhbcycgqa\",\"tags\":{\"acww\":\"ihxv\",\"qgugwl\":\"opxpryxnsbubwhz\"},\"id\":\"xahtqmmkdhwqc\",\"name\":\"webagmfpkephu\",\"type\":\"eucosvkk\"}"; + = "{\"properties\":{\"annotation\":\"obbaibcfbfy\",\"networkFabricId\":\"aisf\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":396307834586114510,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"fmyzbuhdn\",\"hcmt\"]},{\"action\":\"Deny\",\"sequenceNumber\":2789392273507546454,\"wellKnownCommunities\":[\"Internet\"],\"communityMembers\":[\"nhblqivcnuqfp\",\"jzzbpcwtwtrchkcm\"]},{\"action\":\"Deny\",\"sequenceNumber\":5511560934156278449,\"wellKnownCommunities\":[\"LocalAS\",\"Internet\"],\"communityMembers\":[\"qmie\",\"xipwqchfpt\",\"kkvjjl\",\"ajcur\"]}],\"lastOperation\":{\"details\":\"okb\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\"},\"location\":\"pxxizchmbuzgi\",\"tags\":{\"laybhozlsb\":\"jkngzfs\",\"ytrsljzmzui\":\"fnhbvcntpoe\",\"mkqbylbbnjldicq\":\"sggsxznbp\",\"efwlenitv\":\"ma\"},\"id\":\"yahfoyfz\",\"name\":\"idyaeprevcjukf\",\"type\":\"lwceechcayvqbeq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpCommunity response = manager.ipCommunities() - .getByResourceGroupWithResponse("zsbzrrxeyvidcowl", "mbdctqxavejo", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("uajkufpvvdgn", "eio", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cltjhbcycgqa", response.location()); - Assertions.assertEquals("ihxv", response.tags().get("acww")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipCommunityRules().get(0).action()); - Assertions.assertEquals(6487978937622546147L, response.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, - response.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("dfiekkiskyy", response.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qnnmjundt", response.annotation()); + Assertions.assertEquals("pxxizchmbuzgi", response.location()); + Assertions.assertEquals("jkngzfs", response.tags().get("laybhozlsb")); + Assertions.assertEquals("obbaibcfbfy", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(396307834586114510L, response.properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, + response.properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("fmyzbuhdn", response.properties().ipCommunityRules().get(0).communityMembers().get(0)); } } 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 index 13b10b7842f6..1e58ab3fecf0 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; @@ -24,28 +24,28 @@ public final class IpCommunitiesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6659845447567248443,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"zfpffbuqxknvmcgm\",\"gzyojfchicpare\",\"zoksgqhb\"]},{\"action\":\"Permit\",\"sequenceNumber\":321179277904162,\"wellKnownCommunities\":[\"NoAdvertise\",\"GShut\"],\"communityMembers\":[\"blkcrfldfljw\",\"kbptsfl\"]}],\"annotation\":\"umbmwgftshfg\"},\"location\":\"xuq\",\"tags\":{\"ikuqirhs\":\"sk\",\"zibrlr\":\"xpaowkgvnlfueyx\",\"cfebpiucenbvrll\":\"u\",\"dzwilsxryi\":\"dfkn\"},\"id\":\"j\",\"name\":\"lwrduxntpfxxgja\",\"type\":\"yxfwfctq\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"ybfby\",\"networkFabricId\":\"lqllbofsn\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":1821548977169932640,\"wellKnownCommunities\":[\"NoAdvertise\",\"GShut\"],\"communityMembers\":[\"kn\"]}],\"lastOperation\":{\"details\":\"gseiqb\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"location\":\"zkux\",\"tags\":{\"ldrqqv\":\"ksgotbunvnj\",\"xedthfwlnvqac\":\"ugusqlx\"},\"id\":\"yfi\",\"name\":\"blnlmpuyypaggpai\",\"type\":\"eaeyzwloqrmgdhym\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.ipCommunities().listByResourceGroup("ergv", com.azure.core.util.Context.NONE); + = manager.ipCommunities().listByResourceGroup("ucnusnylfhicrj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xuq", response.iterator().next().location()); - Assertions.assertEquals("sk", response.iterator().next().tags().get("ikuqirhs")); + Assertions.assertEquals("zkux", response.iterator().next().location()); + Assertions.assertEquals("ksgotbunvnj", response.iterator().next().tags().get("ldrqqv")); + Assertions.assertEquals("ybfby", response.iterator().next().properties().annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, - response.iterator().next().ipCommunityRules().get(0).action()); - Assertions.assertEquals(6659845447567248443L, - response.iterator().next().ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, - response.iterator().next().ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("zfpffbuqxknvmcgm", - response.iterator().next().ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("umbmwgftshfg", response.iterator().next().annotation()); + response.iterator().next().properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(1821548977169932640L, + response.iterator().next().properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, + response.iterator().next().properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("kn", + response.iterator().next().properties().ipCommunityRules().get(0).communityMembers().get(0)); } } 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 index 49aed4146839..5cbfebb7fe57 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; @@ -24,26 +24,27 @@ public final class IpCommunitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5260536428143266927,\"wellKnownCommunities\":[\"GShut\",\"LocalAS\",\"LocalAS\"],\"communityMembers\":[\"jck\",\"ehdmvfoyrxxxff\",\"mcuanszeerv\",\"cgcsapvbcqpf\"]},{\"action\":\"Deny\",\"sequenceNumber\":1940775927740565981,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"inenk\",\"ivp\",\"rkvorlfqmljewyn\"]},{\"action\":\"Deny\",\"sequenceNumber\":8398901790986088094,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"rkm\",\"ufavvlnpbso\",\"m\",\"nklnmrz\"]}],\"annotation\":\"tvrkkfcwxizkstx\"},\"location\":\"ykeipxutcbvr\",\"tags\":{\"xtvsayyaeiivjq\":\"nfa\",\"xqetxtdqius\":\"qtjwrvewojoq\",\"jvg\":\"guz\",\"mjsisfqqhc\":\"ijzqjhljsa\"},\"id\":\"ecagsbfeiirpn\",\"name\":\"ygllfkchhgsjuzzc\",\"type\":\"jlwmqc\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"vlxtywukhjdspl\",\"networkFabricId\":\"txrrgkwiyoyhq\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2105370250243066430,\"wellKnownCommunities\":[\"LocalAS\",\"GShut\",\"Internet\"],\"communityMembers\":[\"ytcachhsizfuew\",\"fwfiikqcdnzsfi\",\"hgneo\"]},{\"action\":\"Permit\",\"sequenceNumber\":3192819682274198337,\"wellKnownCommunities\":[\"GShut\",\"NoAdvertise\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"ho\"]},{\"action\":\"Deny\",\"sequenceNumber\":6155573672597797186,\"wellKnownCommunities\":[\"Internet\"],\"communityMembers\":[\"jwnbrmdwtbrnl\",\"yiaanistcjhatclp\"]},{\"action\":\"Deny\",\"sequenceNumber\":8528762759243447232,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"cpanap\",\"aoiz\",\"inlpxngzzxqbgqn\"]}],\"lastOperation\":{\"details\":\"ctbxzj\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\"},\"location\":\"bdozwbskueafz\",\"tags\":{\"dukcdnzoxla\":\"binpxmiwtkqifpv\",\"sugqcglma\":\"uxtwgbawshram\",\"xvqlauu\":\"fzto\"},\"id\":\"gwa\",\"name\":\"fmcerfxfeiqba\",\"type\":\"thzw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ipCommunities().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ykeipxutcbvr", response.iterator().next().location()); - Assertions.assertEquals("nfa", response.iterator().next().tags().get("xtvsayyaeiivjq")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, - response.iterator().next().ipCommunityRules().get(0).action()); - Assertions.assertEquals(5260536428143266927L, - response.iterator().next().ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, - response.iterator().next().ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("jck", response.iterator().next().ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("tvrkkfcwxizkstx", response.iterator().next().annotation()); + Assertions.assertEquals("bdozwbskueafz", response.iterator().next().location()); + Assertions.assertEquals("binpxmiwtkqifpv", response.iterator().next().tags().get("dukcdnzoxla")); + Assertions.assertEquals("vlxtywukhjdspl", response.iterator().next().properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, + response.iterator().next().properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(2105370250243066430L, + response.iterator().next().properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, + response.iterator().next().properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("ytcachhsizfuew", + response.iterator().next().properties().ipCommunityRules().get(0).communityMembers().get(0)); } } 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 0064e629b8b7..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 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 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; -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\":{\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4356169983765004043,\"wellKnownCommunities\":[\"Internet\",\"GShut\",\"LocalAS\"],\"communityMembers\":[\"geleohdbvq\",\"wzkjopwbeonrlkw\"]}],\"annotation\":\"qybxceakxcp\"},\"location\":\"oqfyiaseqch\",\"tags\":{\"uem\":\"tzrazisgyk\",\"klinhmdptysprq\":\"anbwzohmnrxxbso\",\"pli\":\"gnzxojpslsvj\"},\"id\":\"fiqwoy\",\"name\":\"qvapcohhoucq\",\"type\":\"q\"},{\"properties\":{\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8065845285267929372,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"Internet\",\"LocalAS\"],\"communityMembers\":[\"cawetzqddt\",\"wflj\"]},{\"action\":\"Permit\",\"sequenceNumber\":1601336838590319246,\"wellKnownCommunities\":[\"Internet\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"zwcjjncqtj\",\"mizvgbgatzuuvbx\",\"grebwggahttzlsw\"]},{\"action\":\"Permit\",\"sequenceNumber\":8685578675388239679,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"qzasunwqrjzfrgqh\"]},{\"action\":\"Permit\",\"sequenceNumber\":8053513658904619463,\"wellKnownCommunities\":[\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"njrohmbpy\",\"yx\",\"meblyd\",\"vkfkmr\"]}],\"annotation\":\"xne\"},\"location\":\"sm\",\"tags\":{\"ucygvo\":\"lfpya\"},\"id\":\"vyuns\",\"name\":\"xlghieegj\",\"type\":\"gvvpasek\"}],\"nextLink\":\"buxantuyg\"}") - .toObject(IpCommunitiesListResult.class); - Assertions.assertEquals("oqfyiaseqch", model.value().get(0).location()); - Assertions.assertEquals("tzrazisgyk", model.value().get(0).tags().get("uem")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipCommunityRules().get(0).action()); - Assertions.assertEquals(4356169983765004043L, model.value().get(0).ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, - model.value().get(0).ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("geleohdbvq", model.value().get(0).ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qybxceakxcp", model.value().get(0).annotation()); - Assertions.assertEquals("buxantuyg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunitiesListResult model - = new IpCommunitiesListResult().withValue(Arrays.asList( - new IpCommunityInner().withLocation("oqfyiaseqch") - .withTags(mapOf("uem", "tzrazisgyk", "klinhmdptysprq", "anbwzohmnrxxbso", "pli", "gnzxojpslsvj")) - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4356169983765004043L) - .withWellKnownCommunities(Arrays.asList( - WellKnownCommunities.INTERNET, WellKnownCommunities.GSHUT, WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("geleohdbvq", "wzkjopwbeonrlkw")))) - .withAnnotation("qybxceakxcp"), - new IpCommunityInner().withLocation("sm") - .withTags(mapOf("ucygvo", "lfpya")) - .withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8065845285267929372L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.INTERNET, - WellKnownCommunities.INTERNET, WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("cawetzqddt", "wflj")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1601336838590319246L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("zwcjjncqtj", "mizvgbgatzuuvbx", "grebwggahttzlsw")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8685578675388239679L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("qzasunwqrjzfrgqh")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8053513658904619463L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("njrohmbpy", "yx", "meblyd", "vkfkmr")))) - .withAnnotation("xne"))) - .withNextLink("buxantuyg"); - model = BinaryData.fromObject(model).toObject(IpCommunitiesListResult.class); - Assertions.assertEquals("oqfyiaseqch", model.value().get(0).location()); - Assertions.assertEquals("tzrazisgyk", model.value().get(0).tags().get("uem")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipCommunityRules().get(0).action()); - Assertions.assertEquals(4356169983765004043L, model.value().get(0).ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, - model.value().get(0).ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("geleohdbvq", model.value().get(0).ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qybxceakxcp", model.value().get(0).annotation()); - Assertions.assertEquals("buxantuyg", model.nextLink()); - } - - // Use "Map.of" if available - @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 50395313ff7e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.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.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\":[\"gkuirxxeuwiiir\",\"vnfgbdviwxo\",\"ktxagfujdb\"]}}") - .toObject(IpCommunityAddOperationProperties.class); - Assertions.assertEquals("gkuirxxeuwiiir", 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("gkuirxxeuwiiir", "vnfgbdviwxo", "ktxagfujdb"))); - model = BinaryData.fromObject(model).toObject(IpCommunityAddOperationProperties.class); - Assertions.assertEquals("gkuirxxeuwiiir", 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 6962651ce673..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.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.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\":[\"exbvxgxq\"]}}") - .toObject(IpCommunityDeleteOperationProperties.class); - Assertions.assertEquals("exbvxgxq", 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("exbvxgxq"))); - model = BinaryData.fromObject(model).toObject(IpCommunityDeleteOperationProperties.class); - Assertions.assertEquals("exbvxgxq", 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 index f9baea7c71d4..62b3fe527ca4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,15 +12,17 @@ public final class IpCommunityIdListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpCommunityIdList model = BinaryData.fromString("{\"ipCommunityIds\":[\"ywdal\",\"sdeqngcaydzinlo\"]}") - .toObject(IpCommunityIdList.class); - Assertions.assertEquals("ywdal", model.ipCommunityIds().get(0)); + IpCommunityIdList model + = BinaryData.fromString("{\"ipCommunityIds\":[\"jbpwjwzqgipdz\",\"mzkhxfpzcu\",\"dq\",\"adxjvvlyibw\"]}") + .toObject(IpCommunityIdList.class); + Assertions.assertEquals("jbpwjwzqgipdz", model.ipCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityIdList model = new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ywdal", "sdeqngcaydzinlo")); + IpCommunityIdList model = new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("jbpwjwzqgipdz", "mzkhxfpzcu", "dq", "adxjvvlyibw")); model = BinaryData.fromObject(model).toObject(IpCommunityIdList.class); - Assertions.assertEquals("ywdal", model.ipCommunityIds().get(0)); + Assertions.assertEquals("jbpwjwzqgipdz", 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 index b4458e250098..8ba730cea7c0 100644 --- 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.IpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; @@ -18,57 +19,48 @@ public final class IpCommunityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityInner model = BinaryData.fromString( - "{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8541029645599018882,\"wellKnownCommunities\":[\"GShut\",\"GShut\"],\"communityMembers\":[\"ufypiv\"]},{\"action\":\"Permit\",\"sequenceNumber\":4020865096407527323,\"wellKnownCommunities\":[\"LocalAS\",\"NoAdvertise\",\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"mifoxxkub\",\"phavpmhbrb\",\"gvgovpbbttefjo\"]},{\"action\":\"Deny\",\"sequenceNumber\":1806621259574631060,\"wellKnownCommunities\":[\"Internet\",\"NoExport\",\"NoExport\"],\"communityMembers\":[\"ik\",\"frdbiqmrjgeihf\",\"lg\"]},{\"action\":\"Deny\",\"sequenceNumber\":5397474834240245211,\"wellKnownCommunities\":[\"NoAdvertise\",\"Internet\",\"LocalAS\"],\"communityMembers\":[\"pbyephmgtvljvrcm\",\"fqip\",\"xhnpo\"]}],\"annotation\":\"qwcabvnui\"},\"location\":\"ey\",\"tags\":{\"jlrxwtoaukhfk\":\"lpaugmrm\",\"oaedsxjwuivedwcg\":\"cisiz\",\"mguaml\":\"eewxeiqbpsmg\",\"lzgaufcshhvnew\":\"dlrgms\"},\"id\":\"nxkympqanxrjk\",\"name\":\"xtwbta\",\"type\":\"ypnyghshxc\"}") + "{\"properties\":{\"annotation\":\"shwddkvbxgk\",\"networkFabricId\":\"sybwptdaca\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1905951141442135587,\"wellKnownCommunities\":[\"GShut\",\"GShut\",\"NoAdvertise\",\"NoAdvertise\"],\"communityMembers\":[\"iwenazero\",\"zrsq\",\"lsxkd\",\"wqapfgsdp\"]},{\"action\":\"Permit\",\"sequenceNumber\":115581442317625172,\"wellKnownCommunities\":[\"LocalAS\",\"Internet\",\"NoExport\",\"Internet\"],\"communityMembers\":[\"uipldqq\",\"tekva\"]},{\"action\":\"Permit\",\"sequenceNumber\":18469641626225882,\"wellKnownCommunities\":[\"GShut\"],\"communityMembers\":[\"qyv\",\"eh\",\"a\",\"mxhzzysevus\"]}],\"lastOperation\":{\"details\":\"zrrryv\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\"},\"location\":\"yzatvfuzkaft\",\"tags\":{\"wigsyeipqdsm\":\"ru\"},\"id\":\"tgrqgdgkkile\",\"name\":\"lkcsmknhwtbbae\",\"type\":\"orvvmqfloygbdgw\"}") .toObject(IpCommunityInner.class); - Assertions.assertEquals("ey", model.location()); - Assertions.assertEquals("lpaugmrm", model.tags().get("jlrxwtoaukhfk")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8541029645599018882L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("yzatvfuzkaft", model.location()); + Assertions.assertEquals("ru", model.tags().get("wigsyeipqdsm")); + Assertions.assertEquals("shwddkvbxgk", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(1905951141442135587L, model.properties().ipCommunityRules().get(0).sequenceNumber()); Assertions.assertEquals(WellKnownCommunities.GSHUT, - model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("ufypiv", model.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qwcabvnui", model.annotation()); + model.properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("iwenazero", model.properties().ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityInner model - = new IpCommunityInner().withLocation("ey") - .withTags(mapOf("jlrxwtoaukhfk", "lpaugmrm", "oaedsxjwuivedwcg", "cisiz", "mguaml", "eewxeiqbpsmg", - "lzgaufcshhvnew", "dlrgms")) - .withIpCommunityRules( - Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8541029645599018882L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("ufypiv")), - new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4020865096407527323L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_ADVERTISE, - WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("mifoxxkub", "phavpmhbrb", "gvgovpbbttefjo")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1806621259574631060L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_EXPORT, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("ik", "frdbiqmrjgeihf", "lg")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5397474834240245211L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, - WellKnownCommunities.INTERNET, WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("pbyephmgtvljvrcm", "fqip", "xhnpo")))) - .withAnnotation("qwcabvnui"); + IpCommunityInner model = new IpCommunityInner().withLocation("yzatvfuzkaft") + .withTags(mapOf("wigsyeipqdsm", "ru")) + .withProperties(new IpCommunityProperties().withAnnotation("shwddkvbxgk") + .withIpCommunityRules(Arrays.asList( + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(1905951141442135587L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.GSHUT, + WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_ADVERTISE)) + .withCommunityMembers(Arrays.asList("iwenazero", "zrsq", "lsxkd", "wqapfgsdp")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(115581442317625172L) + .withWellKnownCommunities( + Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.INTERNET, + WellKnownCommunities.NO_EXPORT, WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("uipldqq", "tekva")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(18469641626225882L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT)) + .withCommunityMembers(Arrays.asList("qyv", "eh", "a", "mxhzzysevus"))))); model = BinaryData.fromObject(model).toObject(IpCommunityInner.class); - Assertions.assertEquals("ey", model.location()); - Assertions.assertEquals("lpaugmrm", model.tags().get("jlrxwtoaukhfk")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8541029645599018882L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("yzatvfuzkaft", model.location()); + Assertions.assertEquals("ru", model.tags().get("wigsyeipqdsm")); + Assertions.assertEquals("shwddkvbxgk", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(1905951141442135587L, model.properties().ipCommunityRules().get(0).sequenceNumber()); Assertions.assertEquals(WellKnownCommunities.GSHUT, - model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("ufypiv", model.ipCommunityRules().get(0).communityMembers().get(0)); - Assertions.assertEquals("qwcabvnui", model.annotation()); + model.properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("iwenazero", model.properties().ipCommunityRules().get(0).communityMembers().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityListResultTests.java new file mode 100644 index 000000000000..826ffb1fe648 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityListResultTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpCommunityListResult; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; +import org.junit.jupiter.api.Assertions; + +public final class IpCommunityListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpCommunityListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"mkyupijub\",\"networkFabricId\":\"jfkakfqfrke\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4498347556178380582,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoAdvertise\",\"NoAdvertise\"],\"communityMembers\":[\"cowvfdjkp\"]},{\"action\":\"Deny\",\"sequenceNumber\":8765144030354375146,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"nmgzvyfijdkzuqnw\",\"it\",\"uqoly\"]},{\"action\":\"Deny\",\"sequenceNumber\":3750252785724961382,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"NoExport\",\"NoExport\"],\"communityMembers\":[\"trjbhxykfhyq\",\"zvqqugdrftbcvexr\",\"uquowtljvfwhr\"]},{\"action\":\"Permit\",\"sequenceNumber\":7851129503450624204,\"wellKnownCommunities\":[\"NoAdvertise\",\"GShut\",\"GShut\",\"Internet\"],\"communityMembers\":[\"vbczsulmdg\",\"lmepjpf\",\"eykgsangpszngaf\"]}],\"lastOperation\":{\"details\":\"lkvec\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\"},\"location\":\"dyedmzrgjfo\",\"tags\":{\"kpztrgd\":\"bnoit\"},\"id\":\"x\",\"name\":\"coqra\",\"type\":\"wugyx\"},{\"properties\":{\"annotation\":\"itweialwvskbuh\",\"networkFabricId\":\"caqt\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1393690559949786756,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"pdsxzakuejkm\"]},{\"action\":\"Permit\",\"sequenceNumber\":6720677576464482292,\"wellKnownCommunities\":[\"Internet\",\"LocalAS\",\"LocalAS\",\"Internet\"],\"communityMembers\":[\"ovjufycsjmlbe\",\"yeji\",\"iuxegth\",\"rtudawlpjfel\"]}],\"lastOperation\":{\"details\":\"pptcbgqnzmnhii\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"ckbbcc\",\"tags\":{\"uffatsgftipwc\":\"praoxn\",\"hza\":\"byubhiqdxyurnpn\"},\"id\":\"ccnuhiig\",\"name\":\"yl\",\"type\":\"ui\"},{\"properties\":{\"annotation\":\"xvatvcr\",\"networkFabricId\":\"lbnb\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":955791618764846038,\"wellKnownCommunities\":[\"Internet\",\"NoAdvertise\",\"GShut\",\"Internet\"],\"communityMembers\":[\"aeaovur\",\"xdndsbdweaderzm\",\"ntopa\",\"ttmvmmagoaqylkjz\"]},{\"action\":\"Permit\",\"sequenceNumber\":3420360474864195769,\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"gmxitpfi\"]}],\"lastOperation\":{\"details\":\"pdltkrlg\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"location\":\"qgu\",\"tags\":{\"lf\":\"hompheqdurelyu\",\"clcdigptajbrzmq\":\"oumpcky\"},\"id\":\"ucycijo\",\"name\":\"lxiutgjcyzyzjdnr\",\"type\":\"jb\"}],\"nextLink\":\"jeaoqaqbz\"}") + .toObject(IpCommunityListResult.class); + Assertions.assertEquals("dyedmzrgjfo", model.value().get(0).location()); + Assertions.assertEquals("bnoit", model.value().get(0).tags().get("kpztrgd")); + Assertions.assertEquals("mkyupijub", model.value().get(0).properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + model.value().get(0).properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(4498347556178380582L, + model.value().get(0).properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, + model.value().get(0).properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("cowvfdjkp", + model.value().get(0).properties().ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("jeaoqaqbz", model.nextLink()); + } +} 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 index afd4769ce721..bf0b69d647f4 100644 --- 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.IpCommunityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatchableProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; @@ -18,32 +19,38 @@ public final class IpCommunityPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityPatch model = BinaryData.fromString( - "{\"properties\":{\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8815374333697807058,\"wellKnownCommunities\":[\"NoExport\",\"GShut\",\"LocalAS\",\"Internet\"],\"communityMembers\":[\"wrxaomzisg\",\"rrczezkhhltnj\",\"dhqoawj\"]}]},\"tags\":{\"rrueqthwmg\":\"ueayfbpcmsplb\",\"gdhxi\":\"mbscbbx\",\"opedbwdpyqyybxub\":\"d\"}}") + "{\"tags\":{\"ejwwviyoyps\":\"wsrsxkrplbja\",\"qwjhqkbiwetpozyc\":\"hbrnnhjx\",\"ledynojpz\":\"qiqyhgfsetzlexbs\",\"ljselp\":\"uwfbzkkdtnhqsy\"},\"properties\":{\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1621789316417844074,\"wellKnownCommunities\":[\"NoAdvertise\",\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"ccbevxrhyzdf\"]},{\"action\":\"Deny\",\"sequenceNumber\":7426999832729660145,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"dbmairrhvhfnr\"]}]}}") .toObject(IpCommunityPatch.class); - Assertions.assertEquals("ueayfbpcmsplb", model.tags().get("rrueqthwmg")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8815374333697807058L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, - model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("wrxaomzisg", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("wsrsxkrplbja", model.tags().get("ejwwviyoyps")); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(1621789316417844074L, model.properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, + model.properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("ccbevxrhyzdf", model.properties().ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpCommunityPatch model = new IpCommunityPatch() - .withTags(mapOf("rrueqthwmg", "ueayfbpcmsplb", "gdhxi", "mbscbbx", "opedbwdpyqyybxub", "d")) - .withIpCommunityRules(Arrays.asList(new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8815374333697807058L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_EXPORT, WellKnownCommunities.GSHUT, - WellKnownCommunities.LOCAL_AS, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("wrxaomzisg", "rrczezkhhltnj", "dhqoawj")))); + .withTags(mapOf("ejwwviyoyps", "wsrsxkrplbja", "qwjhqkbiwetpozyc", "hbrnnhjx", "ledynojpz", + "qiqyhgfsetzlexbs", "ljselp", "uwfbzkkdtnhqsy")) + .withProperties(new IpCommunityPatchableProperties().withIpCommunityRules(Arrays.asList( + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(1621789316417844074L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, + WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("ccbevxrhyzdf")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(7426999832729660145L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("dbmairrhvhfnr"))))); model = BinaryData.fromObject(model).toObject(IpCommunityPatch.class); - Assertions.assertEquals("ueayfbpcmsplb", model.tags().get("rrueqthwmg")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8815374333697807058L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, - model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("wrxaomzisg", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("wsrsxkrplbja", model.tags().get("ejwwviyoyps")); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().ipCommunityRules().get(0).action()); + Assertions.assertEquals(1621789316417844074L, model.properties().ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, + model.properties().ipCommunityRules().get(0).wellKnownCommunities().get(0)); + Assertions.assertEquals("ccbevxrhyzdf", model.properties().ipCommunityRules().get(0).communityMembers().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java index 37a1427ccd16..16f4bd7ac981 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchablePropertiesTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityPatchableProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatchableProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; @@ -16,33 +16,41 @@ public final class IpCommunityPatchablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityPatchableProperties model = BinaryData.fromString( - "{\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3602928584762894021,\"wellKnownCommunities\":[\"Internet\",\"LocalAS\",\"GShut\"],\"communityMembers\":[\"rldefxrdcox\",\"b\"]},{\"action\":\"Permit\",\"sequenceNumber\":2255670015013104702,\"wellKnownCommunities\":[\"LocalAS\",\"Internet\",\"Internet\"],\"communityMembers\":[\"bnqbpizxqltgrd\",\"gypxrxvbfihwuhvc\",\"a\",\"s\"]}]}") + "{\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5267029333666193938,\"wellKnownCommunities\":[\"NoExport\"],\"communityMembers\":[\"ujwouhdawsi\"]},{\"action\":\"Permit\",\"sequenceNumber\":2551040558110498862,\"wellKnownCommunities\":[\"NoAdvertise\",\"GShut\",\"Internet\"],\"communityMembers\":[\"vitvqkjyaz\",\"umtggmuwdchozfn\",\"fexl\"]},{\"action\":\"Permit\",\"sequenceNumber\":6060971044812127967,\"wellKnownCommunities\":[\"Internet\",\"Internet\"],\"communityMembers\":[\"oaiknaqlnuwig\",\"yxl\",\"kwph\"]},{\"action\":\"Deny\",\"sequenceNumber\":1500034694767545162,\"wellKnownCommunities\":[\"LocalAS\",\"GShut\",\"NoExport\"],\"communityMembers\":[\"jtlkexaonwivkcqh\",\"xhxknlc\"]}]}") .toObject(IpCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(3602928584762894021L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(5267029333666193938L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("rldefxrdcox", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("ujwouhdawsi", model.ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpCommunityPatchableProperties model = new IpCommunityPatchableProperties().withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3602928584762894021L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("rldefxrdcox", "b")), new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2255670015013104702L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.INTERNET, + .withSequenceNumber(5267029333666193938L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("ujwouhdawsi")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(2551040558110498862L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.GSHUT, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("bnqbpizxqltgrd", "gypxrxvbfihwuhvc", "a", "s")))); + .withCommunityMembers(Arrays.asList("vitvqkjyaz", "umtggmuwdchozfn", "fexl")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(6060971044812127967L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("oaiknaqlnuwig", "yxl", "kwph")), + new IpCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(1500034694767545162L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.GSHUT, + WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("jtlkexaonwivkcqh", "xhxknlc")))); model = BinaryData.fromObject(model).toObject(IpCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(3602928584762894021L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(5267029333666193938L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.NO_EXPORT, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("rldefxrdcox", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("ujwouhdawsi", model.ipCommunityRules().get(0).communityMembers().get(0)); } } 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 index 531079b4b4d2..2f2bd479d15a 100644 --- 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 @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.IpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; @@ -16,41 +16,43 @@ public final class IpCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityProperties model = BinaryData.fromString( - "{\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"ipCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8431047214936206826,\"wellKnownCommunities\":[\"Internet\",\"Internet\",\"GShut\",\"NoExport\"],\"communityMembers\":[\"jjkhvyomaclu\",\"vxnqmhrpqpd\"]},{\"action\":\"Permit\",\"sequenceNumber\":1779225770048104813,\"wellKnownCommunities\":[\"NoAdvertise\",\"LocalAS\",\"NoAdvertise\",\"Internet\"],\"communityMembers\":[\"f\",\"xuifmcsypobkdqz\"]},{\"action\":\"Deny\",\"sequenceNumber\":1055349990243516782,\"wellKnownCommunities\":[\"LocalAS\"],\"communityMembers\":[\"lgtrczzy\"]}],\"annotation\":\"xzji\"}") + "{\"annotation\":\"gxdgdhpab\",\"networkFabricId\":\"exjddvjsaqwot\",\"ipCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4964201215388711394,\"wellKnownCommunities\":[\"GShut\",\"NoExport\",\"LocalAS\"],\"communityMembers\":[\"xaptefhexcgjok\"]},{\"action\":\"Permit\",\"sequenceNumber\":7175556925640052383,\"wellKnownCommunities\":[\"Internet\"],\"communityMembers\":[\"jbekpeeksnbksdq\",\"jvyklxeslkhhust\"]},{\"action\":\"Permit\",\"sequenceNumber\":3767567277930171512,\"wellKnownCommunities\":[\"GShut\",\"GShut\"],\"communityMembers\":[\"qjwgoknlej\",\"jkxyb\"]},{\"action\":\"Permit\",\"sequenceNumber\":9183686445747419798,\"wellKnownCommunities\":[\"GShut\",\"LocalAS\"],\"communityMembers\":[\"ensvkzykjtj\",\"nsxfwu\",\"hcdpkupnqrmgj\"]}],\"lastOperation\":{\"details\":\"kuwxeoiojfizfavk\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\"}") .toObject(IpCommunityProperties.class); - Assertions.assertEquals("xzji", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8431047214936206826L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals("gxdgdhpab", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(4964201215388711394L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.GSHUT, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("jjkhvyomaclu", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("xaptefhexcgjok", model.ipCommunityRules().get(0).communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityProperties model = new IpCommunityProperties().withAnnotation("xzji") + IpCommunityProperties model = new IpCommunityProperties().withAnnotation("gxdgdhpab") .withIpCommunityRules(Arrays.asList( - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8431047214936206826L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET, - WellKnownCommunities.INTERNET, WellKnownCommunities.GSHUT, WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("jjkhvyomaclu", "vxnqmhrpqpd")), new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1779225770048104813L) - .withWellKnownCommunities( - Arrays.asList(WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.NO_ADVERTISE, WellKnownCommunities.INTERNET)) - .withCommunityMembers(Arrays.asList("f", "xuifmcsypobkdqz")), - new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1055349990243516782L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS)) - .withCommunityMembers(Arrays.asList("lgtrczzy")))); + .withSequenceNumber(4964201215388711394L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.NO_EXPORT, + WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("xaptefhexcgjok")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(7175556925640052383L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("jbekpeeksnbksdq", "jvyklxeslkhhust")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(3767567277930171512L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.GSHUT)) + .withCommunityMembers(Arrays.asList("qjwgoknlej", "jkxyb")), + new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(9183686445747419798L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.LOCAL_AS)) + .withCommunityMembers(Arrays.asList("ensvkzykjtj", "nsxfwu", "hcdpkupnqrmgj")))); model = BinaryData.fromObject(model).toObject(IpCommunityProperties.class); - Assertions.assertEquals("xzji", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipCommunityRules().get(0).action()); - Assertions.assertEquals(8431047214936206826L, model.ipCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.INTERNET, + Assertions.assertEquals("gxdgdhpab", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipCommunityRules().get(0).action()); + Assertions.assertEquals(4964201215388711394L, model.ipCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.GSHUT, model.ipCommunityRules().get(0).wellKnownCommunities().get(0)); - Assertions.assertEquals("jjkhvyomaclu", model.ipCommunityRules().get(0).communityMembers().get(0)); + Assertions.assertEquals("xaptefhexcgjok", model.ipCommunityRules().get(0).communityMembers().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java index d44e8922e209..48098f989689 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,25 +15,24 @@ public final class IpCommunityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpCommunityRule model = BinaryData.fromString( - "{\"action\":\"Deny\",\"sequenceNumber\":4981708752507309083,\"wellKnownCommunities\":[\"GShut\",\"LocalAS\",\"Internet\",\"GShut\"],\"communityMembers\":[\"xihspnxwq\",\"gnepz\"]}") + "{\"action\":\"Permit\",\"sequenceNumber\":771809816865473045,\"wellKnownCommunities\":[\"LocalAS\",\"NoExport\"],\"communityMembers\":[\"bfw\",\"rzx\"]}") .toObject(IpCommunityRule.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(4981708752507309083L, model.sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("xihspnxwq", model.communityMembers().get(0)); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); + Assertions.assertEquals(771809816865473045L, model.sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.wellKnownCommunities().get(0)); + Assertions.assertEquals("bfw", model.communityMembers().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpCommunityRule model = new IpCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(4981708752507309083L) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.GSHUT, WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.INTERNET, WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("xihspnxwq", "gnepz")); + IpCommunityRule model = new IpCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(771809816865473045L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.NO_EXPORT)) + .withCommunityMembers(Arrays.asList("bfw", "rzx")); model = BinaryData.fromObject(model).toObject(IpCommunityRule.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(4981708752507309083L, model.sequenceNumber()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("xihspnxwq", model.communityMembers().get(0)); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); + Assertions.assertEquals(771809816865473045L, model.sequenceNumber()); + Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.wellKnownCommunities().get(0)); + Assertions.assertEquals("bfw", 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 8577855d7613..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.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.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\":[\"feoo\",\"ftpvevtarp\",\"klqlii\"]}}") - .toObject(IpCommunitySetOperationProperties.class); - Assertions.assertEquals("feoo", 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("feoo", "ftpvevtarp", "klqlii"))); - model = BinaryData.fromObject(model).toObject(IpCommunitySetOperationProperties.class); - Assertions.assertEquals("feoo", 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 index 61eaa614d365..20126aa1c653 100644 --- 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 @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -26,39 +27,38 @@ public final class IpExtendedCommunitiesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":1711996139104785096,\"routeTargets\":[\"nguhbnhogsezre\",\"eggpdtyzpxlit\",\"kejmgemudupehsk\"]},{\"action\":\"Deny\",\"sequenceNumber\":3023047299258548814,\"routeTargets\":[\"hrype\"]},{\"action\":\"Deny\",\"sequenceNumber\":5734677290528862693,\"routeTargets\":[\"kapvnpeukgn\",\"fakeqnitro\",\"lcsvktfpsrows\",\"vfxjtxlawmv\"]}],\"annotation\":\"qabjropxfqdmllz\"},\"location\":\"jyuwq\",\"tags\":{\"trhqdoxdeg\":\"gdpvhwirilam\"},\"id\":\"cdedpkwdtobpgdci\",\"name\":\"pdaqermn\",\"type\":\"dlirqqclsaqifep\"}"; + = "{\"properties\":{\"annotation\":\"rkqpyfjxkby\",\"networkFabricId\":\"buq\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5607922725451791962,\"routeTargets\":[\"kmn\",\"sggnowx\"]},{\"action\":\"Permit\",\"sequenceNumber\":8143716610874917650,\"routeTargets\":[\"rdvsv\",\"hbtyc\"]}],\"lastOperation\":{\"details\":\"usgiikhrcthype\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"scsd\",\"tags\":{\"laf\":\"mktcwmivoxgzegn\",\"dcozwxux\":\"fgazagh\",\"utuhvemg\":\"r\"},\"id\":\"lssolqypv\",\"name\":\"xlx\",\"type\":\"hvrkqv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpExtendedCommunity response = manager.ipExtendedCommunities() - .define("lislxyljzbkd") - .withRegion("i") - .withExistingResourceGroup("tkajqhsnsej") - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1053364534586372657L) - .withRouteTargets(Arrays.asList("tvrpeawzzkv", "ccozvqxsphtra", "trmsukxt", "ytgcpt")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1590788620746051426L) - .withRouteTargets(Arrays.asList("egyckmemfvrc", "lcl")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(6350842390036956791L) - .withRouteTargets(Arrays.asList("j")))) - .withTags(mapOf("ebvsewfzvvpay", "lx", "dcyandblkb", "qwh", "qctfvxu", "tcvpvdfmo")) - .withAnnotation("mwrv") + .define("vyjcdpncvfyeqyod") + .withRegion("mumljvvcrsmwojmx") + .withExistingResourceGroup("vuvda") + .withProperties(new IpExtendedCommunityProperties().withAnnotation("jc") + .withIpExtendedCommunityRules(Arrays.asList( + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(2505430440051587327L) + .withRouteTargets(Arrays.asList("vlj")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(3839903988241792029L) + .withRouteTargets(Arrays.asList("fgpjfvqwkseo", "vlmd"))))) + .withTags(mapOf("q", "umnru", "cvpkb", "keqjftvltjop")) .create(); - Assertions.assertEquals("jyuwq", response.location()); - Assertions.assertEquals("gdpvhwirilam", response.tags().get("trhqdoxdeg")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(1711996139104785096L, response.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("nguhbnhogsezre", response.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("qabjropxfqdmllz", response.annotation()); + Assertions.assertEquals("scsd", response.location()); + Assertions.assertEquals("mktcwmivoxgzegn", response.tags().get("laf")); + Assertions.assertEquals("rkqpyfjxkby", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + response.properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(5607922725451791962L, + response.properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("kmn", response.properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } // Use "Map.of" if available 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 index cc016ad2280f..3f2c19491ca9 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; import java.nio.charset.StandardCharsets; @@ -22,24 +22,26 @@ public final class IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3845588111981176241,\"routeTargets\":[\"oxovlz\",\"kleldkqdlqqhnt\",\"rykkxakruuptiicg\",\"pz\"]},{\"action\":\"Deny\",\"sequenceNumber\":5786331397833650098,\"routeTargets\":[\"n\",\"xiemacmztje\"]},{\"action\":\"Deny\",\"sequenceNumber\":7768651645848572236,\"routeTargets\":[\"brysgktfmocnqbb\",\"rtb\",\"fzghfuifwxudyn\",\"hocqxugjx\"]},{\"action\":\"Deny\",\"sequenceNumber\":649725561434329546,\"routeTargets\":[\"rfbplvhmhu\",\"osdjlz\",\"dmddghqeuyaorse\",\"vp\"]}],\"annotation\":\"sorsbegcl\"},\"location\":\"x\",\"tags\":{\"lunssky\":\"qzyhzydyvtuqvi\",\"hxzjdcwuzs\":\"igtvjxsocsvjekej\",\"aojeeyvfxb\":\"yfyixecmasjnfgng\"},\"id\":\"ckmoaljaxvwxt\",\"name\":\"uzhvojyffwflbk\",\"type\":\"cdzuiygtcyzc\"}"; + = "{\"properties\":{\"annotation\":\"gwhzbbdwrje\",\"networkFabricId\":\"ofeiiewibdtplj\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2293932464407137373,\"routeTargets\":[\"kbxxc\",\"khxjwtkftgzl\"]},{\"action\":\"Deny\",\"sequenceNumber\":6612412390692735736,\"routeTargets\":[\"ewsj\",\"gbmlbxjhgvtep\",\"runudmakkshrna\"]},{\"action\":\"Deny\",\"sequenceNumber\":7050956704616690916,\"routeTargets\":[\"wohdige\",\"uocft\"]}],\"lastOperation\":{\"details\":\"odwqbaktvxerowu\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"ra\",\"tags\":{\"ofmazhkqqs\":\"nmtojxg\",\"dmwiwevveswg\":\"knaqszbwgp\"},\"id\":\"hbq\",\"name\":\"hdldarg\",\"type\":\"wimtcceeeuquu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpExtendedCommunity response = manager.ipExtendedCommunities() - .getByResourceGroupWithResponse("sbnuc", "xh", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("gnmuxp", "wpcfmgr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("x", response.location()); - Assertions.assertEquals("qzyhzydyvtuqvi", response.tags().get("lunssky")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3845588111981176241L, response.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("oxovlz", response.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("sorsbegcl", response.annotation()); + Assertions.assertEquals("ra", response.location()); + Assertions.assertEquals("nmtojxg", response.tags().get("ofmazhkqqs")); + Assertions.assertEquals("gwhzbbdwrje", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, + response.properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(2293932464407137373L, + response.properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("kbxxc", response.properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } 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 index f002466ad39c..4b1d8d143ff0 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; import java.nio.charset.StandardCharsets; @@ -23,26 +23,26 @@ public final class IpExtendedCommunitiesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8880320550954967024,\"routeTargets\":[\"aujbfomfbozpj\",\"xefppq\",\"wdnnjjthpsnxebyc\"]},{\"action\":\"Deny\",\"sequenceNumber\":7875316579641726370,\"routeTargets\":[\"xubnn\"]},{\"action\":\"Deny\",\"sequenceNumber\":7308374102330148260,\"routeTargets\":[\"cxnouspdyzssjl\",\"ykdygjvgs\",\"jlf\",\"h\"]},{\"action\":\"Deny\",\"sequenceNumber\":1052579675599113124,\"routeTargets\":[\"xcrbcrgyoimm\",\"szzcctvk\"]}],\"annotation\":\"nhtvagw\"},\"location\":\"wcnvpnyldjdkjvdr\",\"tags\":{\"nrjlqdoqejexf\":\"kxiox\",\"drklpdyehjrwc\":\"lhuhdkubgyw\",\"yw\":\"lvxboc\"},\"id\":\"fvuhzmolhveolngs\",\"name\":\"mhwdxqupyml\",\"type\":\"klmnjqzmqynhitr\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"wxvbkirgknhfw\",\"networkFabricId\":\"jwdajy\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3314633167297996143,\"routeTargets\":[\"pvspewyzhydtk\",\"mtrsdp\",\"viaiga\",\"mawo\"]},{\"action\":\"Deny\",\"sequenceNumber\":4283745664220712204,\"routeTargets\":[\"vi\",\"cwbqy\",\"clwbjgiynqryoisw\",\"ofvsxau\"]},{\"action\":\"Permit\",\"sequenceNumber\":6584841494065392626,\"routeTargets\":[\"in\",\"yydxwgti\",\"vz\"]}],\"lastOperation\":{\"details\":\"exccwldgfq\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\"},\"location\":\"rscfcn\",\"tags\":{\"wfpo\":\"jcullm\",\"hmuby\":\"owoszzwncsjgfxv\"},\"id\":\"uqhgnmsvjfgrpryy\",\"name\":\"rcbajxjr\",\"type\":\"vyrkbuatxkznlwl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.ipExtendedCommunities().listByResourceGroup("efpubaldjcgldryv", com.azure.core.util.Context.NONE); + = manager.ipExtendedCommunities().listByResourceGroup("czzc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wcnvpnyldjdkjvdr", response.iterator().next().location()); - Assertions.assertEquals("kxiox", response.iterator().next().tags().get("nrjlqdoqejexf")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, - response.iterator().next().ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(8880320550954967024L, - response.iterator().next().ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("aujbfomfbozpj", - response.iterator().next().ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("nhtvagw", response.iterator().next().annotation()); + Assertions.assertEquals("rscfcn", response.iterator().next().location()); + Assertions.assertEquals("jcullm", response.iterator().next().tags().get("wfpo")); + Assertions.assertEquals("wxvbkirgknhfw", response.iterator().next().properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, + response.iterator().next().properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(3314633167297996143L, + response.iterator().next().properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("pvspewyzhydtk", + response.iterator().next().properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } 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 index 704c41e00352..bda587d52e65 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; import java.nio.charset.StandardCharsets; @@ -23,26 +23,26 @@ public final class IpExtendedCommunitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6239357357687311670,\"routeTargets\":[\"iqnrjocogwfvkywz\",\"qeiaddp\"]},{\"action\":\"Deny\",\"sequenceNumber\":6395873061735067904,\"routeTargets\":[\"lmdcnutiexmizu\",\"zbqvioyn\",\"tfqhhvvwzprjaaai\"]}],\"annotation\":\"btvavlya\"},\"location\":\"locnwmefzvzuzq\",\"tags\":{\"enfsfyqncowm\":\"korvbzgy\"},\"id\":\"nozf\",\"name\":\"ywjiaaosla\",\"type\":\"agwaakktbjort\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"xogkevdayvxzkxi\",\"networkFabricId\":\"zgrgkja\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":7372545983235319345,\"routeTargets\":[\"zply\",\"spsbomtcep\",\"imfcfsuiwexpasck\",\"gbmlyxbwslx\"]},{\"action\":\"Permit\",\"sequenceNumber\":2193432378671718757,\"routeTargets\":[\"oejtqvqctmli\",\"kxz\"]}],\"lastOperation\":{\"details\":\"uzntbpcadd\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"rrpl\",\"tags\":{\"zxlbiqqeba\":\"vmjjfz\",\"nfvbsymag\":\"x\",\"lb\":\"ahdbtjmkuzonr\",\"xhuqfvpanloqov\":\"z\"},\"id\":\"cxgqtquirgopgza\",\"name\":\"ucujtjuzvyjxuxch\",\"type\":\"uoqhqrcsksxqfhl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("locnwmefzvzuzq", response.iterator().next().location()); - Assertions.assertEquals("korvbzgy", response.iterator().next().tags().get("enfsfyqncowm")); + Assertions.assertEquals("rrpl", response.iterator().next().location()); + Assertions.assertEquals("vmjjfz", response.iterator().next().tags().get("zxlbiqqeba")); + Assertions.assertEquals("xogkevdayvxzkxi", response.iterator().next().properties().annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, - response.iterator().next().ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(6239357357687311670L, - response.iterator().next().ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("iqnrjocogwfvkywz", - response.iterator().next().ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("btvavlya", response.iterator().next().annotation()); + response.iterator().next().properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(7372545983235319345L, + response.iterator().next().properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("zply", + response.iterator().next().properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } 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 d7d8d0827170..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.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.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\":[\"vaedogzou\",\"xbxxgjogcphivfhr\"]}}") - .toObject(IpExtendedCommunityAddOperationProperties.class); - Assertions.assertEquals("vaedogzou", 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("vaedogzou", "xbxxgjogcphivfhr"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityAddOperationProperties.class); - Assertions.assertEquals("vaedogzou", 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 acab63a08078..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.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.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\":[\"fdvdoeary\"]}}") - .toObject(IpExtendedCommunityDeleteOperationProperties.class); - Assertions.assertEquals("fdvdoeary", 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("fdvdoeary"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityDeleteOperationProperties.class); - Assertions.assertEquals("fdvdoeary", 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 index 725710c0accc..724a2123a295 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,17 +12,16 @@ public final class IpExtendedCommunityIdListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpExtendedCommunityIdList model = BinaryData - .fromString("{\"ipExtendedCommunityIds\":[\"p\",\"zmdahyclxrs\",\"doebldpoiaffj\",\"rtnhrevimxmax\"]}") + IpExtendedCommunityIdList model = BinaryData.fromString("{\"ipExtendedCommunityIds\":[\"iulddgiqlnhcxw\"]}") .toObject(IpExtendedCommunityIdList.class); - Assertions.assertEquals("p", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("iulddgiqlnhcxw", model.ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityIdList model = new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("p", "zmdahyclxrs", "doebldpoiaffj", "rtnhrevimxmax")); + IpExtendedCommunityIdList model + = new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("iulddgiqlnhcxw")); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityIdList.class); - Assertions.assertEquals("p", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("iulddgiqlnhcxw", 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 index 51b72228490a..4af2a029a006 100644 --- 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.IpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; @@ -17,41 +18,45 @@ public final class IpExtendedCommunityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityInner model = BinaryData.fromString( - "{\"properties\":{\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8508263172627219350,\"routeTargets\":[\"rqofulopmjnlexwh\"]},{\"action\":\"Permit\",\"sequenceNumber\":3625150454036060730,\"routeTargets\":[\"bke\",\"hu\"]},{\"action\":\"Permit\",\"sequenceNumber\":2124934229054015076,\"routeTargets\":[\"t\",\"toyint\",\"pbrlcyrduczkgofx\",\"fsrucv\"]},{\"action\":\"Permit\",\"sequenceNumber\":8080220027377198790,\"routeTargets\":[\"jttbstv\",\"eaqnrmvvfkoxm\",\"ghktuidvrm\",\"zlpdwwex\"]}],\"annotation\":\"zvlazipbhpwvqsgn\"},\"location\":\"uuzivensrpmeyyvp\",\"tags\":{\"ksrf\":\"tlbijpzg\"},\"id\":\"fvolmknbnxwcd\",\"name\":\"mmpvf\",\"type\":\"awz\"}") + "{\"properties\":{\"annotation\":\"hfw\",\"networkFabricId\":\"uatbwbqamteuliy\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":6587094493738850881,\"routeTargets\":[\"mw\",\"auxxepmyw\",\"ormcqmic\"]},{\"action\":\"Deny\",\"sequenceNumber\":8362080808430835103,\"routeTargets\":[\"kzfbojxjmcsmyq\",\"ixvcpwnkwywzwo\",\"alickduoi\"]},{\"action\":\"Permit\",\"sequenceNumber\":3414104404996175909,\"routeTargets\":[\"yvsk\"]},{\"action\":\"Deny\",\"sequenceNumber\":8433171077389401210,\"routeTargets\":[\"awnvsbcfhza\",\"xn\",\"hycvdimwrzre\",\"zgyufutrwp\"]}],\"lastOperation\":{\"details\":\"ye\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"tta\",\"tags\":{\"hnhjtfvpndpmi\":\"osxw\"},\"id\":\"jpnwynudql\",\"name\":\"zsauzp\",\"type\":\"lxeehuxiq\"}") .toObject(IpExtendedCommunityInner.class); - Assertions.assertEquals("uuzivensrpmeyyvp", model.location()); - Assertions.assertEquals("tlbijpzg", model.tags().get("ksrf")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(8508263172627219350L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("rqofulopmjnlexwh", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("zvlazipbhpwvqsgn", model.annotation()); + Assertions.assertEquals("tta", model.location()); + Assertions.assertEquals("osxw", model.tags().get("hnhjtfvpndpmi")); + Assertions.assertEquals("hfw", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + model.properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(6587094493738850881L, + model.properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("mw", model.properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityInner model = new IpExtendedCommunityInner().withLocation("uuzivensrpmeyyvp") - .withTags(mapOf("ksrf", "tlbijpzg")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8508263172627219350L) - .withRouteTargets(Arrays.asList("rqofulopmjnlexwh")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(3625150454036060730L) - .withRouteTargets(Arrays.asList("bke", "hu")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2124934229054015076L) - .withRouteTargets(Arrays.asList("t", "toyint", "pbrlcyrduczkgofx", "fsrucv")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(8080220027377198790L) - .withRouteTargets(Arrays.asList("jttbstv", "eaqnrmvvfkoxm", "ghktuidvrm", "zlpdwwex")))) - .withAnnotation("zvlazipbhpwvqsgn"); + IpExtendedCommunityInner model = new IpExtendedCommunityInner().withLocation("tta") + .withTags(mapOf("hnhjtfvpndpmi", "osxw")) + .withProperties(new IpExtendedCommunityProperties().withAnnotation("hfw") + .withIpExtendedCommunityRules(Arrays.asList( + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(6587094493738850881L) + .withRouteTargets(Arrays.asList("mw", "auxxepmyw", "ormcqmic")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(8362080808430835103L) + .withRouteTargets(Arrays.asList("kzfbojxjmcsmyq", "ixvcpwnkwywzwo", "alickduoi")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(3414104404996175909L) + .withRouteTargets(Arrays.asList("yvsk")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(8433171077389401210L) + .withRouteTargets(Arrays.asList("awnvsbcfhza", "xn", "hycvdimwrzre", "zgyufutrwp"))))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityInner.class); - Assertions.assertEquals("uuzivensrpmeyyvp", model.location()); - Assertions.assertEquals("tlbijpzg", model.tags().get("ksrf")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(8508263172627219350L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("rqofulopmjnlexwh", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("zvlazipbhpwvqsgn", model.annotation()); + Assertions.assertEquals("tta", model.location()); + Assertions.assertEquals("osxw", model.tags().get("hnhjtfvpndpmi")); + Assertions.assertEquals("hfw", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + model.properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(6587094493738850881L, + model.properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("mw", model.properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } // Use "Map.of" if available 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 index d23680cf3d1c..f0cd4dfd14f0 100644 --- 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 @@ -1,103 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.IpExtendedCommunityListResult; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityListResult; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; -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\":{\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":1372777057626285328,\"routeTargets\":[\"upeuknijduyye\",\"pydjfboc\",\"v\"]},{\"action\":\"Deny\",\"sequenceNumber\":2704241280285106932,\"routeTargets\":[\"tywikd\",\"hl\"]},{\"action\":\"Permit\",\"sequenceNumber\":7479528386540707541,\"routeTargets\":[\"gbhgau\",\"cdixmx\",\"f\"]},{\"action\":\"Deny\",\"sequenceNumber\":8950923037770050787,\"routeTargets\":[\"qg\",\"kfnozoeoqbvj\",\"vefgwbmqjchntas\"]}],\"annotation\":\"ymxbulpzealb\"},\"location\":\"kyojwyvfk\",\"tags\":{\"sgxjc\":\"suah\"},\"id\":\"mzrrscubiwsdrn\",\"name\":\"xqw\",\"type\":\"diffjxcjrmmuab\"},{\"properties\":{\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2828569188008254931,\"routeTargets\":[\"yefoyzbamwineo\",\"vfkakpold\",\"vevboclzh\",\"jknyu\"]},{\"action\":\"Permit\",\"sequenceNumber\":1613523004175535231,\"routeTargets\":[\"xpn\",\"upzaamrdixtre\",\"ids\"]}],\"annotation\":\"skbruffgllukkut\"},\"location\":\"xhrp\",\"tags\":{\"iryr\":\"mblcouqehbhbcds\",\"pmbltoormkfql\":\"ndo\",\"nbmjksibjgsjjxxa\":\"xldykalsygaolnjp\"},\"id\":\"mr\",\"name\":\"ad\",\"type\":\"yqegx\"},{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8159905812934622437,\"routeTargets\":[\"ijkgqxnhm\",\"keznjaujvaa\",\"nggiycwkdtaa\",\"xw\"]},{\"action\":\"Permit\",\"sequenceNumber\":1273993162017075597,\"routeTargets\":[\"mrrqmbzmqkratb\",\"xwbjs\",\"dbirkfpksokdgo\"]},{\"action\":\"Deny\",\"sequenceNumber\":6649960660552995565,\"routeTargets\":[\"ym\",\"hbguzo\"]}],\"annotation\":\"yewnfnzhhhqos\"},\"location\":\"fjkutycyarnroo\",\"tags\":{\"ocnhzqrottjzcfyj\":\"abzoghktdpyczhco\",\"rl\":\"pt\",\"pqinf\":\"h\"},\"id\":\"zpyglqdhmrj\",\"name\":\"ralcxpjbyypsj\",\"type\":\"qcjenkyhf\"}],\"nextLink\":\"vsqxfxjelgcmpzqj\"}") + "{\"value\":[{\"properties\":{\"annotation\":\"jbc\",\"networkFabricId\":\"i\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6836303048608842720,\"routeTargets\":[\"tuowogtgitsqh\",\"vbrzcdb\",\"nfzndscxmxeat\",\"db\"]},{\"action\":\"Deny\",\"sequenceNumber\":2580805120871115843,\"routeTargets\":[\"jyibqbna\",\"mhjrm\",\"u\",\"maxljalfihcj\"]},{\"action\":\"Deny\",\"sequenceNumber\":2110046772829254579,\"routeTargets\":[\"nc\"]}],\"lastOperation\":{\"details\":\"xqcwgax\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\"},\"location\":\"zwjjzr\",\"tags\":{\"mmpuj\":\"xldzyyfytpqsix\",\"ovwzdbpqvybefg\":\"vyqlkjuvsmbmslzo\",\"okcvtlubses\":\"mx\"},\"id\":\"vcuartrhun\",\"name\":\"pirykycndzfqiv\",\"type\":\"reuykbbmnwagl\"}],\"nextLink\":\"xoe\"}") .toObject(IpExtendedCommunityListResult.class); - Assertions.assertEquals("kyojwyvfk", model.value().get(0).location()); - Assertions.assertEquals("suah", model.value().get(0).tags().get("sgxjc")); + Assertions.assertEquals("zwjjzr", model.value().get(0).location()); + Assertions.assertEquals("xldzyyfytpqsix", model.value().get(0).tags().get("mmpuj")); + Assertions.assertEquals("jbc", model.value().get(0).properties().annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, - model.value().get(0).ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(1372777057626285328L, - model.value().get(0).ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("upeuknijduyye", - model.value().get(0).ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("ymxbulpzealb", model.value().get(0).annotation()); - Assertions.assertEquals("vsqxfxjelgcmpzqj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityListResult model = new IpExtendedCommunityListResult().withValue(Arrays.asList( - new IpExtendedCommunityInner().withLocation("kyojwyvfk") - .withTags(mapOf("sgxjc", "suah")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1372777057626285328L) - .withRouteTargets(Arrays.asList("upeuknijduyye", "pydjfboc", "v")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2704241280285106932L) - .withRouteTargets(Arrays.asList("tywikd", "hl")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(7479528386540707541L) - .withRouteTargets(Arrays.asList("gbhgau", "cdixmx", "f")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8950923037770050787L) - .withRouteTargets(Arrays.asList("qg", "kfnozoeoqbvj", "vefgwbmqjchntas")))) - .withAnnotation("ymxbulpzealb"), - new IpExtendedCommunityInner().withLocation("xhrp") - .withTags( - mapOf("iryr", "mblcouqehbhbcds", "pmbltoormkfql", "ndo", "nbmjksibjgsjjxxa", "xldykalsygaolnjp")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2828569188008254931L) - .withRouteTargets(Arrays.asList("yefoyzbamwineo", "vfkakpold", "vevboclzh", "jknyu")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1613523004175535231L) - .withRouteTargets(Arrays.asList("xpn", "upzaamrdixtre", "ids")))) - .withAnnotation("skbruffgllukkut"), - new IpExtendedCommunityInner().withLocation("fjkutycyarnroo") - .withTags(mapOf("ocnhzqrottjzcfyj", "abzoghktdpyczhco", "rl", "pt", "pqinf", "h")) - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8159905812934622437L) - .withRouteTargets(Arrays.asList("ijkgqxnhm", "keznjaujvaa", "nggiycwkdtaa", "xw")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(1273993162017075597L) - .withRouteTargets(Arrays.asList("mrrqmbzmqkratb", "xwbjs", "dbirkfpksokdgo")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6649960660552995565L) - .withRouteTargets(Arrays.asList("ym", "hbguzo")))) - .withAnnotation("yewnfnzhhhqos"))) - .withNextLink("vsqxfxjelgcmpzqj"); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityListResult.class); - Assertions.assertEquals("kyojwyvfk", model.value().get(0).location()); - Assertions.assertEquals("suah", model.value().get(0).tags().get("sgxjc")); - Assertions.assertEquals(CommunityActionTypes.DENY, - model.value().get(0).ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(1372777057626285328L, - model.value().get(0).ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("upeuknijduyye", - model.value().get(0).ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("ymxbulpzealb", model.value().get(0).annotation()); - Assertions.assertEquals("vsqxfxjelgcmpzqj", model.nextLink()); - } - - // Use "Map.of" if available - @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; + model.value().get(0).properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(6836303048608842720L, + model.value().get(0).properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("tuowogtgitsqh", + model.value().get(0).properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("xoe", model.nextLink()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java index 013f56d5e4c5..0e42116dd8c0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchPropertiesTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,27 +15,26 @@ public final class IpExtendedCommunityPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityPatchProperties model = BinaryData.fromString( - "{\"annotation\":\"weftkwq\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4430853762890090237,\"routeTargets\":[\"s\"]}]}") + "{\"annotation\":\"knwfoanniyo\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":586837661109482420,\"routeTargets\":[\"nrlyxnuc\",\"ephblkwqpatvbqs\"]}]}") .toObject(IpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("knwfoanniyo", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(4430853762890090237L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("s", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("weftkwq", model.annotation()); + Assertions.assertEquals(586837661109482420L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("nrlyxnuc", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpExtendedCommunityPatchProperties model - = new IpExtendedCommunityPatchProperties() + = new IpExtendedCommunityPatchProperties().withAnnotation("knwfoanniyo") .withIpExtendedCommunityRules( Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(4430853762890090237L) - .withRouteTargets(Arrays.asList("s")))) - .withAnnotation("weftkwq"); + .withSequenceNumber(586837661109482420L) + .withRouteTargets(Arrays.asList("nrlyxnuc", "ephblkwqpatvbqs")))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatchProperties.class); + Assertions.assertEquals("knwfoanniyo", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(4430853762890090237L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("s", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - Assertions.assertEquals("weftkwq", model.annotation()); + Assertions.assertEquals(586837661109482420L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("nrlyxnuc", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } 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 index 7b121efe6bfc..4f717755dc6e 100644 --- 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.IpExtendedCommunityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; @@ -17,36 +18,39 @@ public final class IpExtendedCommunityPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityPatch model = BinaryData.fromString( - "{\"properties\":{\"annotation\":\"vnynkb\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3587482268659031002,\"routeTargets\":[\"hpsprkzyaupiac\",\"xnafbw\",\"ro\",\"htuov\"]},{\"action\":\"Deny\",\"sequenceNumber\":6160359867810551901,\"routeTargets\":[\"rjtumghih\",\"ve\",\"mslclblyjxlt\"]},{\"action\":\"Deny\",\"sequenceNumber\":8653084665379016179,\"routeTargets\":[\"c\",\"sfxigctmgx\",\"upbezqccydrt\"]}]},\"tags\":{\"eq\":\"kdqkkyihzt\",\"ecfehuwa\":\"gqzgwldoychill\",\"uhicqllizstacsjv\":\"a\"}}") + "{\"tags\":{\"annnoytzposewx\":\"fg\"},\"properties\":{\"annotation\":\"xvkqm\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5446597763085760543,\"routeTargets\":[\"fdfa\"]},{\"action\":\"Deny\",\"sequenceNumber\":8594312185059625660,\"routeTargets\":[\"zeyuubeidszl\",\"ytoithgygvfl\",\"gvdihoynkrxwetwk\"]},{\"action\":\"Deny\",\"sequenceNumber\":1697658661218579356,\"routeTargets\":[\"ucpcunnuzdqumoen\",\"dnaienhqhskndnel\",\"kaa\"]}]}}") .toObject(IpExtendedCommunityPatch.class); - Assertions.assertEquals("kdqkkyihzt", model.tags().get("eq")); - Assertions.assertEquals("vnynkb", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3587482268659031002L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("hpsprkzyaupiac", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("fg", model.tags().get("annnoytzposewx")); + Assertions.assertEquals("xvkqm", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + model.properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(5446597763085760543L, + model.properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("fdfa", model.properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityPatch model = new IpExtendedCommunityPatch() - .withTags(mapOf("eq", "kdqkkyihzt", "ecfehuwa", "gqzgwldoychill", "uhicqllizstacsjv", "a")) - .withAnnotation("vnynkb") - .withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3587482268659031002L) - .withRouteTargets(Arrays.asList("hpsprkzyaupiac", "xnafbw", "ro", "htuov")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6160359867810551901L) - .withRouteTargets(Arrays.asList("rjtumghih", "ve", "mslclblyjxlt")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8653084665379016179L) - .withRouteTargets(Arrays.asList("c", "sfxigctmgx", "upbezqccydrt")))); + IpExtendedCommunityPatch model = new IpExtendedCommunityPatch().withTags(mapOf("annnoytzposewx", "fg")) + .withProperties(new IpExtendedCommunityPatchProperties().withAnnotation("xvkqm") + .withIpExtendedCommunityRules(Arrays.asList( + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(5446597763085760543L) + .withRouteTargets(Arrays.asList("fdfa")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(8594312185059625660L) + .withRouteTargets(Arrays.asList("zeyuubeidszl", "ytoithgygvfl", "gvdihoynkrxwetwk")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(1697658661218579356L) + .withRouteTargets(Arrays.asList("ucpcunnuzdqumoen", "dnaienhqhskndnel", "kaa"))))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatch.class); - Assertions.assertEquals("kdqkkyihzt", model.tags().get("eq")); - Assertions.assertEquals("vnynkb", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3587482268659031002L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("hpsprkzyaupiac", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("fg", model.tags().get("annnoytzposewx")); + Assertions.assertEquals("xvkqm", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + model.properties().ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(5446597763085760543L, + model.properties().ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("fdfa", model.properties().ipExtendedCommunityRules().get(0).routeTargets().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchablePropertiesTests.java deleted file mode 100644 index 9bde4d3dc7cf..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchablePropertiesTests.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.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityPatchableProperties model = BinaryData.fromString( - "{\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3069608234026742101,\"routeTargets\":[\"k\",\"ctwwgzw\",\"jlmec\"]},{\"action\":\"Permit\",\"sequenceNumber\":6971905808635311445,\"routeTargets\":[\"zyvneezaifghtmo\",\"qtlffhzbk\"]}]}") - .toObject(IpExtendedCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3069608234026742101L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("k", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityPatchableProperties model - = new IpExtendedCommunityPatchableProperties().withIpExtendedCommunityRules(Arrays.asList( - new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3069608234026742101L) - .withRouteTargets(Arrays.asList("k", "ctwwgzw", "jlmec")), - new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(6971905808635311445L) - .withRouteTargets(Arrays.asList("zyvneezaifghtmo", "qtlffhzbk")))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(3069608234026742101L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("k", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); - } -} 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 index afbaef87ccbd..29a4a179274a 100644 --- 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 @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,25 +15,28 @@ public final class IpExtendedCommunityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpExtendedCommunityProperties model = BinaryData.fromString( - "{\"configurationState\":\"Rejected\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"ipExtendedCommunityRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2275725598738013501,\"routeTargets\":[\"iexhajl\",\"n\",\"hiqfyuttdiy\",\"b\"]}],\"annotation\":\"n\"}") + "{\"annotation\":\"lraymezxlskih\",\"networkFabricId\":\"rfdsajrednwy\",\"ipExtendedCommunityRules\":[{\"action\":\"Permit\",\"sequenceNumber\":78120671226064723,\"routeTargets\":[\"gmevuafpwzy\"]},{\"action\":\"Deny\",\"sequenceNumber\":2750983513823051299,\"routeTargets\":[\"wltxeqipxgzdyims\",\"ayorprav\",\"jogeslabnsmjkwyn\"]}],\"lastOperation\":{\"details\":\"ekqsykvwjtqpkev\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\"}") .toObject(IpExtendedCommunityProperties.class); - Assertions.assertEquals("n", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(2275725598738013501L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("iexhajl", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("lraymezxlskih", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(78120671226064723L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("gmevuafpwzy", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpExtendedCommunityProperties model = new IpExtendedCommunityProperties().withAnnotation("n") - .withIpExtendedCommunityRules( - Arrays.asList(new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2275725598738013501L) - .withRouteTargets(Arrays.asList("iexhajl", "n", "hiqfyuttdiy", "b")))); + IpExtendedCommunityProperties model = new IpExtendedCommunityProperties().withAnnotation("lraymezxlskih") + .withIpExtendedCommunityRules(Arrays.asList( + new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(78120671226064723L) + .withRouteTargets(Arrays.asList("gmevuafpwzy")), + new IpExtendedCommunityRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(2750983513823051299L) + .withRouteTargets(Arrays.asList("wltxeqipxgzdyims", "ayorprav", "jogeslabnsmjkwyn")))); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityProperties.class); - Assertions.assertEquals("n", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipExtendedCommunityRules().get(0).action()); - Assertions.assertEquals(2275725598738013501L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); - Assertions.assertEquals("iexhajl", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); + Assertions.assertEquals("lraymezxlskih", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipExtendedCommunityRules().get(0).action()); + Assertions.assertEquals(78120671226064723L, model.ipExtendedCommunityRules().get(0).sequenceNumber()); + Assertions.assertEquals("gmevuafpwzy", model.ipExtendedCommunityRules().get(0).routeTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java index d56975ba98be..9167f29ccd09 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,22 +13,22 @@ public final class IpExtendedCommunityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpExtendedCommunityRule model = BinaryData.fromString( - "{\"action\":\"Permit\",\"sequenceNumber\":4121428237576255143,\"routeTargets\":[\"avfqnvhnqoewdogi\",\"etesypvidbztjhqt\"]}") + IpExtendedCommunityRule model = BinaryData + .fromString("{\"action\":\"Permit\",\"sequenceNumber\":257074047575142082,\"routeTargets\":[\"l\",\"r\"]}") .toObject(IpExtendedCommunityRule.class); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(4121428237576255143L, model.sequenceNumber()); - Assertions.assertEquals("avfqnvhnqoewdogi", model.routeTargets().get(0)); + Assertions.assertEquals(257074047575142082L, model.sequenceNumber()); + Assertions.assertEquals("l", model.routeTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpExtendedCommunityRule model = new IpExtendedCommunityRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4121428237576255143L) - .withRouteTargets(Arrays.asList("avfqnvhnqoewdogi", "etesypvidbztjhqt")); + .withSequenceNumber(257074047575142082L) + .withRouteTargets(Arrays.asList("l", "r")); model = BinaryData.fromObject(model).toObject(IpExtendedCommunityRule.class); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(4121428237576255143L, model.sequenceNumber()); - Assertions.assertEquals("avfqnvhnqoewdogi", model.routeTargets().get(0)); + Assertions.assertEquals(257074047575142082L, model.sequenceNumber()); + Assertions.assertEquals("l", 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 8502677a1198..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.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 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\":[\"jzhdtrsyfezf\",\"my\",\"jdzyyrwnmwtq\",\"ljknnkynkstdtfwh\"]}}") - .toObject(IpExtendedCommunitySetOperationProperties.class); - Assertions.assertEquals("jzhdtrsyfezf", 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("jzhdtrsyfezf", "my", "jdzyyrwnmwtq", "ljknnkynkstdtfwh"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunitySetOperationProperties.class); - Assertions.assertEquals("jzhdtrsyfezf", model.set().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java new file mode 100644 index 000000000000..5921e98bce9b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPatchPropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IpGroupPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpGroupPatchProperties model = BinaryData.fromString( + "{\"name\":\"vgp\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"gfsxzec\",\"axwk\",\"fykhvuhxepmru\",\"znabaobns\"]}") + .toObject(IpGroupPatchProperties.class); + Assertions.assertEquals("vgp", model.name()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("gfsxzec", model.ipPrefixes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpGroupPatchProperties model = new IpGroupPatchProperties().withName("vgp") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("gfsxzec", "axwk", "fykhvuhxepmru", "znabaobns")); + model = BinaryData.fromObject(model).toObject(IpGroupPatchProperties.class); + Assertions.assertEquals("vgp", model.name()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("gfsxzec", model.ipPrefixes().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java index 4e595c337d71..9209903ad67e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpGroupPropertiesTests.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -13,22 +13,22 @@ public final class IpGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpGroupProperties model = BinaryData - .fromString("{\"name\":\"lboxqvkjl\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"dynhdwdigum\"]}") + IpGroupProperties model = BinaryData.fromString( + "{\"name\":\"tcyohpfkyrk\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"ogsjkmnwqjno\",\"aiy\",\"ddviacegfnmntfpm\"]}") .toObject(IpGroupProperties.class); - Assertions.assertEquals("lboxqvkjl", model.name()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("dynhdwdigum", model.ipPrefixes().get(0)); + Assertions.assertEquals("tcyohpfkyrk", model.name()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("ogsjkmnwqjno", model.ipPrefixes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpGroupProperties model = new IpGroupProperties().withName("lboxqvkjl") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("dynhdwdigum")); + IpGroupProperties model = new IpGroupProperties().withName("tcyohpfkyrk") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("ogsjkmnwqjno", "aiy", "ddviacegfnmntfpm")); model = BinaryData.fromObject(model).toObject(IpGroupProperties.class); - Assertions.assertEquals("lboxqvkjl", model.name()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("dynhdwdigum", model.ipPrefixes().get(0)); + Assertions.assertEquals("tcyohpfkyrk", model.name()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("ogsjkmnwqjno", model.ipPrefixes().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java new file mode 100644 index 000000000000..0d801f2564cf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionPatchTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IpMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpMatchConditionPatch model = BinaryData.fromString( + "{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"bqzolxr\",\"vhqjwtrhtgvg\",\"pcrrk\",\"lawjmjsmwrok\"],\"ipGroupNames\":[\"fzzzwyjafitlhg\",\"ynuchlgmltxd\",\"hmoz\",\"sgzv\"]}") + .toObject(IpMatchConditionPatch.class); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.prefixType()); + Assertions.assertEquals("bqzolxr", model.ipPrefixValues().get(0)); + Assertions.assertEquals("fzzzwyjafitlhg", model.ipGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpMatchConditionPatch model = new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("bqzolxr", "vhqjwtrhtgvg", "pcrrk", "lawjmjsmwrok")) + .withIpGroupNames(Arrays.asList("fzzzwyjafitlhg", "ynuchlgmltxd", "hmoz", "sgzv")); + model = BinaryData.fromObject(model).toObject(IpMatchConditionPatch.class); + Assertions.assertEquals(SourceDestinationType.BIDIRECTIONAL, model.type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.prefixType()); + Assertions.assertEquals("bqzolxr", model.ipPrefixValues().get(0)); + Assertions.assertEquals("fzzzwyjafitlhg", model.ipGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java index 222bec93fb38..0d06bdd9d633 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,24 +15,24 @@ public final class IpMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpMatchCondition model = BinaryData.fromString( - "{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"unnoxyhk\",\"g\",\"ddrihpf\",\"oqcaaewdaomdj\"],\"ipGroupNames\":[\"jxxkzbrmsgei\",\"siykzkdncjdxonbz\"]}") + "{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"yuqdu\",\"vmnnrw\",\"biorktal\",\"wjhhgdnhxmsivf\"],\"ipGroupNames\":[\"loxggdufiqn\",\"ieuzaofjchvcyyy\",\"fgdo\"]}") .toObject(IpMatchCondition.class); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.type()); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.prefixType()); - Assertions.assertEquals("unnoxyhk", model.ipPrefixValues().get(0)); - Assertions.assertEquals("jxxkzbrmsgei", model.ipGroupNames().get(0)); + Assertions.assertEquals("yuqdu", model.ipPrefixValues().get(0)); + Assertions.assertEquals("loxggdufiqn", model.ipGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpMatchCondition model = new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + IpMatchCondition model = new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("unnoxyhk", "g", "ddrihpf", "oqcaaewdaomdj")) - .withIpGroupNames(Arrays.asList("jxxkzbrmsgei", "siykzkdncjdxonbz")); + .withIpPrefixValues(Arrays.asList("yuqdu", "vmnnrw", "biorktal", "wjhhgdnhxmsivf")) + .withIpGroupNames(Arrays.asList("loxggdufiqn", "ieuzaofjchvcyyy", "fgdo")); model = BinaryData.fromObject(model).toObject(IpMatchCondition.class); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.type()); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.prefixType()); - Assertions.assertEquals("unnoxyhk", model.ipPrefixValues().get(0)); - Assertions.assertEquals("jxxkzbrmsgei", model.ipGroupNames().get(0)); + Assertions.assertEquals("yuqdu", model.ipPrefixValues().get(0)); + Assertions.assertEquals("loxggdufiqn", model.ipGroupNames().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 index 1ca569bcdaa3..f461c37f67e7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,6 +8,7 @@ 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.IpPrefixProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; @@ -18,43 +19,50 @@ public final class IpPrefixInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixInner model = BinaryData.fromString( - "{\"properties\":{\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6992436865522878201,\"networkPrefix\":\"oyvivbsiz\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"zlbscmnlziji\"},{\"action\":\"Permit\",\"sequenceNumber\":3252520713262268196,\"networkPrefix\":\"gmvflnwyvqkx\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"niylyly\"}],\"annotation\":\"xzutgqztwhghmupg\"},\"location\":\"jtcdxabbujftaben\",\"tags\":{\"ucafedd\":\"lqpx\",\"gnhgook\":\"wnlzafwxu\"},\"id\":\"talvnbwgp\",\"name\":\"emeluclv\",\"type\":\"jjukyrdnqodxah\"}") + "{\"properties\":{\"annotation\":\"nqlnfwmyymvqd\",\"networkFabricId\":\"bhfckdvezcrcssb\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6209496105832776974,\"networkPrefix\":\"b\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"b\"},{\"action\":\"Permit\",\"sequenceNumber\":6787898884842594028,\"networkPrefix\":\"lehpavawu\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"tiogqgdmini\"},{\"action\":\"Deny\",\"sequenceNumber\":486844500805381299,\"networkPrefix\":\"aj\",\"condition\":\"Range\",\"subnetMaskLength\":\"gspnbonhpczykm\"}],\"lastOperation\":{\"details\":\"vw\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"khufmpqumqyjgydz\",\"tags\":{\"enwphpzfngq\":\"dsaeuzanhsfnh\",\"tujwjju\":\"clid\",\"tssruqnmdvhazc\":\"wbeqrkuor\"},\"id\":\"jy\",\"name\":\"iqswbqer\",\"type\":\"w\"}") .toObject(IpPrefixInner.class); - Assertions.assertEquals("jtcdxabbujftaben", model.location()); - Assertions.assertEquals("lqpx", model.tags().get("ucafedd")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6992436865522878201L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("oyvivbsiz", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("zlbscmnlziji", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("xzutgqztwhghmupg", model.annotation()); + Assertions.assertEquals("khufmpqumqyjgydz", model.location()); + Assertions.assertEquals("dsaeuzanhsfnh", model.tags().get("enwphpzfngq")); + Assertions.assertEquals("nqlnfwmyymvqd", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(6209496105832776974L, model.properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("b", model.properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, + model.properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("b", model.properties().ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixInner model = new IpPrefixInner().withLocation("jtcdxabbujftaben") - .withTags(mapOf("ucafedd", "lqpx", "gnhgook", "wnlzafwxu")) - .withIpPrefixRules(Arrays.asList( - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6992436865522878201L) - .withNetworkPrefix("oyvivbsiz") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("zlbscmnlziji"), - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(3252520713262268196L) - .withNetworkPrefix("gmvflnwyvqkx") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("niylyly"))) - .withAnnotation("xzutgqztwhghmupg"); + IpPrefixInner model = new IpPrefixInner().withLocation("khufmpqumqyjgydz") + .withTags(mapOf("enwphpzfngq", "dsaeuzanhsfnh", "tujwjju", "clid", "tssruqnmdvhazc", "wbeqrkuor")) + .withProperties(new IpPrefixProperties().withAnnotation("nqlnfwmyymvqd") + .withIpPrefixRules(Arrays.asList( + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(6209496105832776974L) + .withNetworkPrefix("b") + .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("b"), + new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(6787898884842594028L) + .withNetworkPrefix("lehpavawu") + .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("tiogqgdmini"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(486844500805381299L) + .withNetworkPrefix("aj") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("gspnbonhpczykm")))); model = BinaryData.fromObject(model).toObject(IpPrefixInner.class); - Assertions.assertEquals("jtcdxabbujftaben", model.location()); - Assertions.assertEquals("lqpx", model.tags().get("ucafedd")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6992436865522878201L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("oyvivbsiz", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("zlbscmnlziji", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("xzutgqztwhghmupg", model.annotation()); + Assertions.assertEquals("khufmpqumqyjgydz", model.location()); + Assertions.assertEquals("dsaeuzanhsfnh", model.tags().get("enwphpzfngq")); + Assertions.assertEquals("nqlnfwmyymvqd", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(6209496105832776974L, model.properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("b", model.properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, + model.properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("b", model.properties().ipPrefixRules().get(0).subnetMaskLength()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixListResultTests.java new file mode 100644 index 000000000000..da6a98ded257 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixListResultTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.IpPrefixListResult; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.Condition; +import org.junit.jupiter.api.Assertions; + +public final class IpPrefixListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpPrefixListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"uasigr\",\"networkFabricId\":\"socnequygdjboq\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":793699651661280507,\"networkPrefix\":\"jkqev\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"mwiuawvcm\"},{\"action\":\"Permit\",\"sequenceNumber\":7552072590640530804,\"networkPrefix\":\"iidisczskoswoqiq\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"am\"},{\"action\":\"Deny\",\"sequenceNumber\":6808659347528868408,\"networkPrefix\":\"rcoiis\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"ppc\"}],\"lastOperation\":{\"details\":\"u\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\"},\"location\":\"xyfukzxuizhyhn\",\"tags\":{\"rx\":\"peti\",\"xdazv\":\"iubxdukec\",\"dblnsntrp\":\"hctmmkosz\"},\"id\":\"aqkiofkb\",\"name\":\"fmhklbnld\",\"type\":\"vcb\"},{\"properties\":{\"annotation\":\"ezyquw\",\"networkFabricId\":\"qxutrpbrruyuua\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3782180935149915880,\"networkPrefix\":\"jwcolbm\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"w\"}],\"lastOperation\":{\"details\":\"pa\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\"},\"location\":\"mt\",\"tags\":{\"ngxno\":\"cnxzcmj\",\"sn\":\"rxtd\"},\"id\":\"evhdlmydid\",\"name\":\"hepfwwtjfdoes\",\"type\":\"xhmw\"},{\"properties\":{\"annotation\":\"bckyoikxk\",\"networkFabricId\":\"negknjzrb\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":52999178106922181,\"networkPrefix\":\"lvukaobrlb\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"bagn\"}],\"lastOperation\":{\"details\":\"hg\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\"},\"location\":\"wa\",\"tags\":{\"rclsso\":\"ymxcgqtag\",\"gjco\":\"jomevtfycnlb\"},\"id\":\"kk\",\"name\":\"ji\",\"type\":\"ytssikiz\"}],\"nextLink\":\"ufqbvntnr\"}") + .toObject(IpPrefixListResult.class); + Assertions.assertEquals("xyfukzxuizhyhn", model.value().get(0).location()); + Assertions.assertEquals("peti", model.value().get(0).tags().get("rx")); + Assertions.assertEquals("uasigr", model.value().get(0).properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, + model.value().get(0).properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(793699651661280507L, + model.value().get(0).properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("jkqev", model.value().get(0).properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, + model.value().get(0).properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("mwiuawvcm", + model.value().get(0).properties().ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("ufqbvntnr", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java index f6a1eaa57f63..512fe48e40df 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchPropertiesTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -16,46 +16,46 @@ public final class IpPrefixPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixPatchProperties model = BinaryData.fromString( - "{\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":2543116814718955542,\"networkPrefix\":\"gtywatmqaqkue\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"oeshoygzcbyfq\"},{\"action\":\"Deny\",\"sequenceNumber\":3455942189061392603,\"networkPrefix\":\"oytehqpuvjm\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"dwckygroe\"},{\"action\":\"Permit\",\"sequenceNumber\":3395907540745395486,\"networkPrefix\":\"ljdjuskbrreqy\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"ysfaqegplwrysh\"},{\"action\":\"Deny\",\"sequenceNumber\":736166165406062542,\"networkPrefix\":\"vbxgkqusyb\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"acarvvlf\"}],\"annotation\":\"ymtpo\"}") + "{\"annotation\":\"wtdvrfmvli\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":3724654213238024863,\"networkPrefix\":\"qcrj\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"tuk\"},{\"action\":\"Permit\",\"sequenceNumber\":2321191755057707838,\"networkPrefix\":\"lwyojbfqzdkfnj\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"afr\"},{\"action\":\"Permit\",\"sequenceNumber\":4541288238071533181,\"networkPrefix\":\"mbjrou\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"valqjrhuzgfxo\"},{\"action\":\"Deny\",\"sequenceNumber\":1102303796949054971,\"networkPrefix\":\"usllywpvtiotz\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"ollgry\"}]}") .toObject(IpPrefixPatchProperties.class); - Assertions.assertEquals("ymtpo", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(2543116814718955542L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gtywatmqaqkue", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oeshoygzcbyfq", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("wtdvrfmvli", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); + Assertions.assertEquals(3724654213238024863L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("qcrj", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("tuk", model.ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixPatchProperties model = new IpPrefixPatchProperties().withAnnotation("ymtpo") + IpPrefixPatchProperties model = new IpPrefixPatchProperties().withAnnotation("wtdvrfmvli") .withIpPrefixRules(Arrays.asList( - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2543116814718955542L) - .withNetworkPrefix("gtywatmqaqkue") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("oeshoygzcbyfq"), new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3455942189061392603L) - .withNetworkPrefix("oytehqpuvjm") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("dwckygroe"), + .withSequenceNumber(3724654213238024863L) + .withNetworkPrefix("qcrj") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("tuk"), new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(3395907540745395486L) - .withNetworkPrefix("ljdjuskbrreqy") + .withSequenceNumber(2321191755057707838L) + .withNetworkPrefix("lwyojbfqzdkfnj") .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("ysfaqegplwrysh"), + .withSubnetMaskLength("afr"), + new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4541288238071533181L) + .withNetworkPrefix("mbjrou") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("valqjrhuzgfxo"), new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(736166165406062542L) - .withNetworkPrefix("vbxgkqusyb") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("acarvvlf"))); + .withSequenceNumber(1102303796949054971L) + .withNetworkPrefix("usllywpvtiotz") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("ollgry"))); model = BinaryData.fromObject(model).toObject(IpPrefixPatchProperties.class); - Assertions.assertEquals("ymtpo", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(2543116814718955542L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gtywatmqaqkue", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oeshoygzcbyfq", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("wtdvrfmvli", model.annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); + Assertions.assertEquals(3724654213238024863L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("qcrj", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.ipPrefixRules().get(0).condition()); + Assertions.assertEquals("tuk", model.ipPrefixRules().get(0).subnetMaskLength()); } } 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 index 1f0a221e9bf1..2d9684246de3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -8,6 +8,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; @@ -18,46 +19,46 @@ public final class IpPrefixPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixPatch model = BinaryData.fromString( - "{\"properties\":{\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4852295860770033656,\"networkPrefix\":\"gd\",\"condition\":\"Range\",\"subnetMaskLength\":\"oycblevpmc\"},{\"action\":\"Deny\",\"sequenceNumber\":1739626855088905602,\"networkPrefix\":\"xkyxlzgs\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"zltafhbzffovwm\"},{\"action\":\"Deny\",\"sequenceNumber\":1639207383510022302,\"networkPrefix\":\"qsczpgvdwnapfdqw\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"ptnuwjtkschgc\"}],\"annotation\":\"y\"},\"tags\":{\"kwiswskukjtas\":\"seyqrhvyeldotjv\",\"xkdtxfkndlqvtwkn\":\"vwisp\"}}") + "{\"tags\":{\"f\":\"ec\",\"smaklixqcahy\":\"gzmxieqv\",\"tblxpkkwjdjodqhy\":\"xalybxawoijpo\"},\"properties\":{\"annotation\":\"cnre\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":7773165548588342586,\"networkPrefix\":\"zhceumoqodk\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"yibngqladywrxwh\"},{\"action\":\"Deny\",\"sequenceNumber\":3328962571965232866,\"networkPrefix\":\"uvvadswzsnu\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"owuowh\"},{\"action\":\"Deny\",\"sequenceNumber\":4449545911268941751,\"networkPrefix\":\"wyrmouv\",\"condition\":\"Range\",\"subnetMaskLength\":\"okzkltr\"}]}}") .toObject(IpPrefixPatch.class); - Assertions.assertEquals("seyqrhvyeldotjv", model.tags().get("kwiswskukjtas")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(4852295860770033656L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gd", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oycblevpmc", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("y", model.annotation()); + Assertions.assertEquals("ec", model.tags().get("f")); + Assertions.assertEquals("cnre", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(7773165548588342586L, model.properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("zhceumoqodk", model.properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("yibngqladywrxwh", model.properties().ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixPatch model - = new IpPrefixPatch().withTags(mapOf("kwiswskukjtas", "seyqrhvyeldotjv", "xkdtxfkndlqvtwkn", "vwisp")) + IpPrefixPatch model = new IpPrefixPatch() + .withTags(mapOf("f", "ec", "smaklixqcahy", "gzmxieqv", "tblxpkkwjdjodqhy", "xalybxawoijpo")) + .withProperties(new IpPrefixPatchProperties().withAnnotation("cnre") .withIpPrefixRules(Arrays.asList( new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(4852295860770033656L) - .withNetworkPrefix("gd") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("oycblevpmc"), + .withSequenceNumber(7773165548588342586L) + .withNetworkPrefix("zhceumoqodk") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("yibngqladywrxwh"), new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1739626855088905602L) - .withNetworkPrefix("xkyxlzgs") + .withSequenceNumber(3328962571965232866L) + .withNetworkPrefix("uvvadswzsnu") .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("zltafhbzffovwm"), + .withSubnetMaskLength("owuowh"), new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(1639207383510022302L) - .withNetworkPrefix("qsczpgvdwnapfdqw") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("ptnuwjtkschgc"))) - .withAnnotation("y"); + .withSequenceNumber(4449545911268941751L) + .withNetworkPrefix("wyrmouv") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("okzkltr")))); model = BinaryData.fromObject(model).toObject(IpPrefixPatch.class); - Assertions.assertEquals("seyqrhvyeldotjv", model.tags().get("kwiswskukjtas")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(4852295860770033656L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gd", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.RANGE, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("oycblevpmc", model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("y", model.annotation()); + Assertions.assertEquals("ec", model.tags().get("f")); + Assertions.assertEquals("cnre", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(7773165548588342586L, model.properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("zhceumoqodk", model.properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, model.properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("yibngqladywrxwh", model.properties().ipPrefixRules().get(0).subnetMaskLength()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.java deleted file mode 100644 index cc1cdfbb9cda..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchablePropertiesTests.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.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixPatchableProperties model = BinaryData.fromString( - "{\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":6119785955978410906,\"networkPrefix\":\"ravjuq\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"mr\"}]}") - .toObject(IpPrefixPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6119785955978410906L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("ravjuq", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("mr", model.ipPrefixRules().get(0).subnetMaskLength()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixPatchableProperties model = new IpPrefixPatchableProperties() - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(6119785955978410906L) - .withNetworkPrefix("ravjuq") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("mr"))); - model = BinaryData.fromObject(model).toObject(IpPrefixPatchableProperties.class); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(6119785955978410906L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("ravjuq", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("mr", model.ipPrefixRules().get(0).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 index 9bc3bfa05fc3..4ed54dbbdfe5 100644 --- 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 @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.IpPrefixProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -16,46 +16,36 @@ public final class IpPrefixPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixProperties model = BinaryData.fromString( - "{\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":5435314181058093460,\"networkPrefix\":\"gyipem\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"v\"},{\"action\":\"Deny\",\"sequenceNumber\":5139152311796566006,\"networkPrefix\":\"ejdtxptl\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"homewjjstliu\"},{\"action\":\"Deny\",\"sequenceNumber\":3810638848978413172,\"networkPrefix\":\"moaiancz\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"rrslblxydkx\"},{\"action\":\"Permit\",\"sequenceNumber\":7966232904898723422,\"networkPrefix\":\"bxiwkgfbqljn\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"chocokulehur\"}],\"annotation\":\"rqffaweyurk\"}") + "{\"annotation\":\"ytxtdgu\",\"networkFabricId\":\"lbpktg\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":34710180000183892,\"networkPrefix\":\"uambewreswmowegm\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"yxey\"},{\"action\":\"Permit\",\"sequenceNumber\":8487268843737209941,\"networkPrefix\":\"gijiitnspxlzd\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"rijwai\"}],\"lastOperation\":{\"details\":\"n\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\"}") .toObject(IpPrefixProperties.class); - Assertions.assertEquals("rqffaweyurk", model.annotation()); + Assertions.assertEquals("ytxtdgu", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(5435314181058093460L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gyipem", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(34710180000183892L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("uambewreswmowegm", model.ipPrefixRules().get(0).networkPrefix()); Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("v", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("yxey", model.ipPrefixRules().get(0).subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpPrefixProperties model = new IpPrefixProperties().withAnnotation("rqffaweyurk") + IpPrefixProperties model = new IpPrefixProperties().withAnnotation("ytxtdgu") .withIpPrefixRules(Arrays.asList( new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5435314181058093460L) - .withNetworkPrefix("gyipem") + .withSequenceNumber(34710180000183892L) + .withNetworkPrefix("uambewreswmowegm") .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("v"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5139152311796566006L) - .withNetworkPrefix("ejdtxptl") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("homewjjstliu"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3810638848978413172L) - .withNetworkPrefix("moaiancz") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("rrslblxydkx"), + .withSubnetMaskLength("yxey"), new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(7966232904898723422L) - .withNetworkPrefix("bxiwkgfbqljn") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("chocokulehur"))); + .withSequenceNumber(8487268843737209941L) + .withNetworkPrefix("gijiitnspxlzd") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("rijwai"))); model = BinaryData.fromObject(model).toObject(IpPrefixProperties.class); - Assertions.assertEquals("rqffaweyurk", model.annotation()); + Assertions.assertEquals("ytxtdgu", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(5435314181058093460L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("gyipem", model.ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(34710180000183892L, model.ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("uambewreswmowegm", model.ipPrefixRules().get(0).networkPrefix()); Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("v", model.ipPrefixRules().get(0).subnetMaskLength()); + Assertions.assertEquals("yxey", model.ipPrefixRules().get(0).subnetMaskLength()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java index 0aec97659aae..a75c5285b1c2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,27 +14,27 @@ public final class IpPrefixRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpPrefixRule model = BinaryData.fromString( - "{\"action\":\"Deny\",\"sequenceNumber\":667258597321052143,\"networkPrefix\":\"apx\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"jjk\"}") + "{\"action\":\"Deny\",\"sequenceNumber\":62185905537223135,\"networkPrefix\":\"oj\",\"condition\":\"Range\",\"subnetMaskLength\":\"rhydkygywez\"}") .toObject(IpPrefixRule.class); Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(667258597321052143L, model.sequenceNumber()); - Assertions.assertEquals("apx", model.networkPrefix()); - Assertions.assertEquals(Condition.EQUAL_TO, model.condition()); - Assertions.assertEquals("jjk", model.subnetMaskLength()); + Assertions.assertEquals(62185905537223135L, model.sequenceNumber()); + Assertions.assertEquals("oj", model.networkPrefix()); + Assertions.assertEquals(Condition.RANGE, model.condition()); + Assertions.assertEquals("rhydkygywez", model.subnetMaskLength()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpPrefixRule model = new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(667258597321052143L) - .withNetworkPrefix("apx") - .withCondition(Condition.EQUAL_TO) - .withSubnetMaskLength("jjk"); + .withSequenceNumber(62185905537223135L) + .withNetworkPrefix("oj") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("rhydkygywez"); model = BinaryData.fromObject(model).toObject(IpPrefixRule.class); Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(667258597321052143L, model.sequenceNumber()); - Assertions.assertEquals("apx", model.networkPrefix()); - Assertions.assertEquals(Condition.EQUAL_TO, model.condition()); - Assertions.assertEquals("jjk", model.subnetMaskLength()); + Assertions.assertEquals(62185905537223135L, model.sequenceNumber()); + Assertions.assertEquals("oj", model.networkPrefix()); + Assertions.assertEquals(Condition.RANGE, model.condition()); + Assertions.assertEquals("rhydkygywez", model.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 index fa98bc96494a..f95b0d44ae93 100644 --- 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 @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; 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.IpPrefixProperties; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -27,37 +28,48 @@ public final class IpPrefixesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":4520960034287352179,\"networkPrefix\":\"bdj\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"xotudamkiyao\"}],\"annotation\":\"hulzugifgsp\"},\"location\":\"dlnoc\",\"tags\":{\"wm\":\"gimizlukj\",\"mspppoeszthjt\":\"ksr\"},\"id\":\"yjskdiylg\",\"name\":\"zuqix\",\"type\":\"sybqowgvmxwbo\"}"; + = "{\"properties\":{\"annotation\":\"at\",\"networkFabricId\":\"swbrnbo\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":4917767018612931314,\"networkPrefix\":\"mq\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"s\"},{\"action\":\"Permit\",\"sequenceNumber\":4713772169804832084,\"networkPrefix\":\"mwow\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"ifhfutjyxntmg\"}],\"lastOperation\":{\"details\":\"qaemo\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"dqr\",\"tags\":{\"nsydksvjf\":\"icxtcllq\",\"jhcsgzooefzsdtt\":\"xgdpivjkhcoscol\"},\"id\":\"qkaqdvwojvx\",\"name\":\"f\",\"type\":\"hrqxrqghotingzi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpPrefix response = manager.ipPrefixes() - .define("chmeodhzj") - .withRegion("owqrzvuxn") - .withExistingResourceGroup("zje") - .withTags(mapOf("mjdhypngo", "ohshzultdb", "zukekytkzvt", "bdxvrivptbczsuzg", "inha", "maatvogpyc", - "khwfjudapbq", "hbdxsbypl")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(5837362985759110973L) - .withNetworkPrefix("eqkwqphfvsfts") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("p"))) - .withAnnotation("achdtezgfctu") + .define("inlic") + .withRegion("oepjzaqbodswazb") + .withExistingResourceGroup("znwwtkuytwii") + .withProperties(new IpPrefixProperties().withAnnotation("oyoioxdwffwyzqke") + .withIpPrefixRules(Arrays.asList( + new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(6100533237196466393L) + .withNetworkPrefix("bqveht") + .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("vkdvcgowrd"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(6585215549270848811L) + .withNetworkPrefix("dwzdlbbcztamkyrk") + .withCondition(Condition.EQUAL_TO) + .withSubnetMaskLength("pivoc"), + new IpPrefixRule().withAction(CommunityActionTypes.DENY) + .withSequenceNumber(3002378465529632018L) + .withNetworkPrefix("vnodqqzjbfy") + .withCondition(Condition.RANGE) + .withSubnetMaskLength("nfqdfwvsxfr")))) + .withTags(mapOf("ffudbkvunn", "k", "awowqsni", "joasnz", "vukszkmxbh", "xwdqzu")) .create(); - Assertions.assertEquals("dlnoc", response.location()); - Assertions.assertEquals("gimizlukj", response.tags().get("wm")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.ipPrefixRules().get(0).action()); - Assertions.assertEquals(4520960034287352179L, response.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("bdj", response.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, response.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("xotudamkiyao", response.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("hulzugifgsp", response.annotation()); + Assertions.assertEquals("dqr", response.location()); + Assertions.assertEquals("icxtcllq", response.tags().get("nsydksvjf")); + Assertions.assertEquals("at", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(4917767018612931314L, response.properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("mq", response.properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, + response.properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("s", response.properties().ipPrefixRules().get(0).subnetMaskLength()); } // Use "Map.of" if available 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 index 449fab878c44..24a269421c1d 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; @@ -23,26 +23,26 @@ public final class IpPrefixesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":8148053506381843263,\"networkPrefix\":\"tbltytvnpbgcesfd\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"mowurofof\"},{\"action\":\"Permit\",\"sequenceNumber\":1224957652054116236,\"networkPrefix\":\"zzwweoblb\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"hixcc\"},{\"action\":\"Permit\",\"sequenceNumber\":7690295423276930746,\"networkPrefix\":\"og\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"myqzyqepgbbzdsl\"}],\"annotation\":\"kcevoxdd\"},\"location\":\"wmgwxwukfjv\",\"tags\":{\"gyphheovejkpalec\":\"axseisvv\",\"pu\":\"tlthrt\"},\"id\":\"fssrgrq\",\"name\":\"fnquollouurmuz\",\"type\":\"mbqqiehdhj\"}"; + = "{\"properties\":{\"annotation\":\"pmqdsq\",\"networkFabricId\":\"i\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":8156955737135842081,\"networkPrefix\":\"kdi\",\"condition\":\"EqualTo\",\"subnetMaskLength\":\"qkuzabrsoihataj\"}],\"lastOperation\":{\"details\":\"cvsyns\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\"},\"location\":\"adohsj\",\"tags\":{\"z\":\"hkxgf\",\"xipdnlbyitfzpww\":\"qnzkwlxqd\",\"iimx\":\"zeylz\"},\"id\":\"crktjoygynsixg\",\"name\":\"bbnu\",\"type\":\"lquarbruvqb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); IpPrefix response = manager.ipPrefixes() - .getByResourceGroupWithResponse("ure", "vivkiglioklsu", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("vgdojcvzfcmxmjp", "akjdtuodocgquqxn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wmgwxwukfjv", response.location()); - Assertions.assertEquals("axseisvv", response.tags().get("gyphheovejkpalec")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.ipPrefixRules().get(0).action()); - Assertions.assertEquals(8148053506381843263L, response.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("tbltytvnpbgcesfd", response.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, response.ipPrefixRules().get(0).condition()); - Assertions.assertEquals("mowurofof", response.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("kcevoxdd", response.annotation()); + Assertions.assertEquals("adohsj", response.location()); + Assertions.assertEquals("hkxgf", response.tags().get("z")); + Assertions.assertEquals("pmqdsq", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(8156955737135842081L, response.properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("kdi", response.properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.EQUAL_TO, response.properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("qkuzabrsoihataj", response.properties().ipPrefixRules().get(0).subnetMaskLength()); } } 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 index 9cc8bb777886..071497280dce 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; @@ -24,29 +24,30 @@ public final class IpPrefixesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":245835078321548908,\"networkPrefix\":\"u\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"aglyyhrgmabspmlu\"},{\"action\":\"Permit\",\"sequenceNumber\":4123582002679106167,\"networkPrefix\":\"kk\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"tocrbfgqicmdrgcu\"}],\"annotation\":\"m\"},\"location\":\"r\",\"tags\":{\"qjvfio\":\"cqhgcmljzksqimy\",\"szopeuku\":\"hcaqpv\",\"emosq\":\"dswbsskgq\",\"gipdzym\":\"fsjbpwjwz\"},\"id\":\"khxfpz\",\"name\":\"uudqhadxjvvl\",\"type\":\"ibweua\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"jajkvwkocxfbdzl\",\"networkFabricId\":\"natb\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2700665554817017155,\"networkPrefix\":\"fygenfakybepsihz\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"ymppglxjsfgb\"}],\"lastOperation\":{\"details\":\"saz\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"uk\",\"tags\":{\"vvj\":\"uoyrbdkgqdm\",\"eauuuvh\":\"fjjfexuvsveam\"},\"id\":\"io\",\"name\":\"glmufzuuyszhae\",\"type\":\"mtyosdpxtsdy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.ipPrefixes().listByResourceGroup("fywwnax", com.azure.core.util.Context.NONE); + = manager.ipPrefixes().listByResourceGroup("yxwrmupzpexzb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("r", response.iterator().next().location()); - Assertions.assertEquals("cqhgcmljzksqimy", response.iterator().next().tags().get("qjvfio")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, - response.iterator().next().ipPrefixRules().get(0).action()); - Assertions.assertEquals(245835078321548908L, - response.iterator().next().ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("u", response.iterator().next().ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, - response.iterator().next().ipPrefixRules().get(0).condition()); - Assertions.assertEquals("aglyyhrgmabspmlu", - response.iterator().next().ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("m", response.iterator().next().annotation()); + Assertions.assertEquals("uk", response.iterator().next().location()); + Assertions.assertEquals("uoyrbdkgqdm", response.iterator().next().tags().get("vvj")); + Assertions.assertEquals("jajkvwkocxfbdzl", response.iterator().next().properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, + response.iterator().next().properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(2700665554817017155L, + response.iterator().next().properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("fygenfakybepsihz", + response.iterator().next().properties().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, + response.iterator().next().properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("ymppglxjsfgb", + response.iterator().next().properties().ipPrefixRules().get(0).subnetMaskLength()); } } 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 index ebb6a3722d27..148f16c0158d 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; @@ -24,27 +24,29 @@ public final class IpPrefixesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":5109634825070710854,\"networkPrefix\":\"vytzq\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"jvzmxyrazzstjvc\"},{\"action\":\"Permit\",\"sequenceNumber\":4983579071329982771,\"networkPrefix\":\"brlbozlt\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"cbibtk\"}],\"annotation\":\"ecupmwxdsokr\"},\"location\":\"rpeylfii\",\"tags\":{\"hcxwwwvun\":\"dgiql\",\"atrtcqyfjvifbmo\":\"nsgvxhxrm\"},\"id\":\"tehqyoytrcoufkq\",\"name\":\"bhukdfpknv\",\"type\":\"iv\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"gef\",\"networkFabricId\":\"gwphw\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":3216610997754939338,\"networkPrefix\":\"mixaqgfpuhhzwr\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"lkjsvkbtmli\"},{\"action\":\"Deny\",\"sequenceNumber\":9155130915805149262,\"networkPrefix\":\"hkgminhecjg\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"msngmluyrlkpismm\"},{\"action\":\"Deny\",\"sequenceNumber\":8458217260449277142,\"networkPrefix\":\"pjthizsabcylzzi\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"zenkrdruesxexaw\"}],\"lastOperation\":{\"details\":\"bdctj\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"et\",\"tags\":{\"dkewqwamp\":\"clczfrofyyraiai\"},\"id\":\"ldddorzljhnxf\",\"name\":\"ffngfpilloirm\",\"type\":\"xdbktuqnbcjknrq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ipPrefixes().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("rpeylfii", response.iterator().next().location()); - Assertions.assertEquals("dgiql", response.iterator().next().tags().get("hcxwwwvun")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().ipPrefixRules().get(0).action()); - Assertions.assertEquals(5109634825070710854L, - response.iterator().next().ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("vytzq", response.iterator().next().ipPrefixRules().get(0).networkPrefix()); + Assertions.assertEquals("et", response.iterator().next().location()); + Assertions.assertEquals("clczfrofyyraiai", response.iterator().next().tags().get("dkewqwamp")); + Assertions.assertEquals("gef", response.iterator().next().properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, + response.iterator().next().properties().ipPrefixRules().get(0).action()); + Assertions.assertEquals(3216610997754939338L, + response.iterator().next().properties().ipPrefixRules().get(0).sequenceNumber()); + Assertions.assertEquals("mixaqgfpuhhzwr", + response.iterator().next().properties().ipPrefixRules().get(0).networkPrefix()); Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, - response.iterator().next().ipPrefixRules().get(0).condition()); - Assertions.assertEquals("jvzmxyrazzstjvc", - response.iterator().next().ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("ecupmwxdsokr", response.iterator().next().annotation()); + response.iterator().next().properties().ipPrefixRules().get(0).condition()); + Assertions.assertEquals("lkjsvkbtmli", + response.iterator().next().properties().ipPrefixRules().get(0).subnetMaskLength()); } } 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 0d59730c8adb..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 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.IpPrefixRule; -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\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":932286244659176936,\"networkPrefix\":\"a\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":\"dnwqapfg\"}],\"annotation\":\"pcvessm\"},\"location\":\"h\",\"tags\":{\"dqq\":\"ip\",\"blhtjq\":\"tekva\"},\"id\":\"qyv\",\"name\":\"eh\",\"type\":\"a\"},{\"properties\":{\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":5431502201952850372,\"networkPrefix\":\"xivzrrry\",\"condition\":\"Range\",\"subnetMaskLength\":\"ipsk\"}],\"annotation\":\"zatvfuzka\"},\"location\":\"jvvruxwigsyei\",\"tags\":{\"kileplkcsmknhwtb\":\"smjtgrqgdg\",\"oygbdgwumgxd\":\"aedorvvmqf\"},\"id\":\"dhp\",\"name\":\"bgd\",\"type\":\"xjd\"},{\"properties\":{\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\",\"ipPrefixRules\":[{\"action\":\"Permit\",\"sequenceNumber\":6883686834742004480,\"networkPrefix\":\"llcolsrsxapte\",\"condition\":\"Range\",\"subnetMaskLength\":\"cgjokjljnhvlq\"}],\"annotation\":\"ek\"},\"location\":\"eksnbksdqhjvyk\",\"tags\":{\"hhus\":\"sl\"},\"id\":\"cpoq\",\"name\":\"avnwqj\",\"type\":\"g\"},{\"properties\":{\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":424186973430303992,\"networkPrefix\":\"wfd\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"ztensvkzykjtj\"},{\"action\":\"Permit\",\"sequenceNumber\":2113099919480363245,\"networkPrefix\":\"fwushcdpkupn\",\"condition\":\"Range\",\"subnetMaskLength\":\"jfbp\"},{\"action\":\"Deny\",\"sequenceNumber\":8039859701811063701,\"networkPrefix\":\"eoiojfizfavkjzw\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":\"aykmmf\"}],\"annotation\":\"bfw\"},\"location\":\"zxmdew\",\"tags\":{\"jwwviy\":\"xkrplbjaz\",\"suhbrnn\":\"y\"},\"id\":\"jxsqwjhqkbiwetp\",\"name\":\"zycyqiqyhg\",\"type\":\"se\"}],\"nextLink\":\"lexbsf\"}") - .toObject(IpPrefixesListResult.class); - Assertions.assertEquals("h", model.value().get(0).location()); - Assertions.assertEquals("ip", model.value().get(0).tags().get("dqq")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipPrefixRules().get(0).action()); - Assertions.assertEquals(932286244659176936L, model.value().get(0).ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("a", model.value().get(0).ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, - model.value().get(0).ipPrefixRules().get(0).condition()); - Assertions.assertEquals("dnwqapfg", model.value().get(0).ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("pcvessm", model.value().get(0).annotation()); - Assertions.assertEquals("lexbsf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixesListResult model = new IpPrefixesListResult().withValue(Arrays.asList( - new IpPrefixInner().withLocation("h") - .withTags(mapOf("dqq", "ip", "blhtjq", "tekva")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(932286244659176936L) - .withNetworkPrefix("a") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("dnwqapfg"))) - .withAnnotation("pcvessm"), - new IpPrefixInner().withLocation("jvvruxwigsyei") - .withTags(mapOf("kileplkcsmknhwtb", "smjtgrqgdg", "oygbdgwumgxd", "aedorvvmqf")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(5431502201952850372L) - .withNetworkPrefix("xivzrrry") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("ipsk"))) - .withAnnotation("zatvfuzka"), - new IpPrefixInner().withLocation("eksnbksdqhjvyk") - .withTags(mapOf("hhus", "sl")) - .withIpPrefixRules(Arrays.asList(new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(6883686834742004480L) - .withNetworkPrefix("llcolsrsxapte") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("cgjokjljnhvlq"))) - .withAnnotation("ek"), - new IpPrefixInner().withLocation("zxmdew") - .withTags(mapOf("jwwviy", "xkrplbjaz", "suhbrnn", "y")) - .withIpPrefixRules(Arrays.asList( - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(424186973430303992L) - .withNetworkPrefix("wfd") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("ztensvkzykjtj"), - new IpPrefixRule().withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(2113099919480363245L) - .withNetworkPrefix("fwushcdpkupn") - .withCondition(Condition.RANGE) - .withSubnetMaskLength("jfbp"), - new IpPrefixRule().withAction(CommunityActionTypes.DENY) - .withSequenceNumber(8039859701811063701L) - .withNetworkPrefix("eoiojfizfavkjzw") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength("aykmmf"))) - .withAnnotation("bfw"))) - .withNextLink("lexbsf"); - model = BinaryData.fromObject(model).toObject(IpPrefixesListResult.class); - Assertions.assertEquals("h", model.value().get(0).location()); - Assertions.assertEquals("ip", model.value().get(0).tags().get("dqq")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).ipPrefixRules().get(0).action()); - Assertions.assertEquals(932286244659176936L, model.value().get(0).ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("a", model.value().get(0).ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, - model.value().get(0).ipPrefixRules().get(0).condition()); - Assertions.assertEquals("dnwqapfg", model.value().get(0).ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("pcvessm", model.value().get(0).annotation()); - Assertions.assertEquals("lexbsf", model.nextLink()); - } - - // Use "Map.of" if available - @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/IsolationDomainPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPatchPropertiesTests.java new file mode 100644 index 000000000000..a5d8c15de640 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPatchPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IsolationDomainPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IsolationDomainPatchProperties model = BinaryData + .fromString("{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ioleajabesgyzwp\",\"bjkscecmbaajdfwr\"]}") + .toObject(IsolationDomainPatchProperties.class); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("ioleajabesgyzwp", model.neighborGroupIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IsolationDomainPatchProperties model + = new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("ioleajabesgyzwp", "bjkscecmbaajdfwr")); + model = BinaryData.fromObject(model).toObject(IsolationDomainPatchProperties.class); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("ioleajabesgyzwp", model.neighborGroupIds().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java index aed85f530ed0..f8a4a0317e9a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IsolationDomainPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,19 +13,19 @@ public final class IsolationDomainPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IsolationDomainProperties model = BinaryData - .fromString("{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"ysokliiksyb\",\"rrbnhylsbhujcydy\",\"l\"]}") + IsolationDomainProperties model = BinaryData.fromString( + "{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"iagskoikuqir\",\"skxpaowkgvnlfue\",\"x\",\"zibrlr\"]}") .toObject(IsolationDomainProperties.class); - Assertions.assertEquals(Encapsulation.GRE, model.encapsulation()); - Assertions.assertEquals("ysokliiksyb", model.neighborGroupIds().get(0)); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("iagskoikuqir", model.neighborGroupIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IsolationDomainProperties model = new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("ysokliiksyb", "rrbnhylsbhujcydy", "l")); + IsolationDomainProperties model = new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("iagskoikuqir", "skxpaowkgvnlfue", "x", "zibrlr")); model = BinaryData.fromObject(model).toObject(IsolationDomainProperties.class); - Assertions.assertEquals(Encapsulation.GRE, model.encapsulation()); - Assertions.assertEquals("ysokliiksyb", model.neighborGroupIds().get(0)); + Assertions.assertEquals(Encapsulation.NONE, model.encapsulation()); + Assertions.assertEquals("iagskoikuqir", model.neighborGroupIds().get(0)); } } 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 index 28e0df02bb9b..9d2e8536a40e 100644 --- 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 @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,31 +16,37 @@ public final class L2IsolationDomainInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2IsolationDomainInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"e\",\"vlanId\":76777618,\"mtu\":246722999,\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"annotation\":\"bzkkd\"},\"location\":\"hqsycljselp\",\"tags\":{\"by\":\"afvafh\",\"rsofpltdbmairrh\":\"ccbevxrhyzdf\",\"npq\":\"hfnrac\",\"uuj\":\"g\"},\"id\":\"ouhdawsigrb\",\"name\":\"bxsjybvitvqkj\",\"type\":\"az\"}") + "{\"properties\":{\"annotation\":\"qsorh\",\"networkFabricId\":\"ekxgn\",\"vlanId\":464953682,\"mtu\":1040301389,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"wzvmdoksqd\",\"lastOperation\":{\"details\":\"lwxlboncqbazq\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\"},\"location\":\"v\",\"tags\":{\"qvgx\":\"janepubdpkx\",\"hkxdxuwsaifmc\":\"aodetv\",\"ehgcvkbcknjo\":\"nosbz\"},\"id\":\"gjyy\",\"name\":\"pvelszerqze\",\"type\":\"xoqeintxwalj\"}") .toObject(L2IsolationDomainInner.class); - Assertions.assertEquals("hqsycljselp", model.location()); - Assertions.assertEquals("afvafh", model.tags().get("by")); - Assertions.assertEquals("e", model.networkFabricId()); - Assertions.assertEquals(76777618, model.vlanId()); - Assertions.assertEquals(246722999, model.mtu()); - Assertions.assertEquals("bzkkd", model.annotation()); + Assertions.assertEquals("v", model.location()); + Assertions.assertEquals("janepubdpkx", model.tags().get("qvgx")); + Assertions.assertEquals("qsorh", model.properties().annotation()); + Assertions.assertEquals("ekxgn", model.properties().networkFabricId()); + Assertions.assertEquals(464953682, model.properties().vlanId()); + Assertions.assertEquals(1040301389, model.properties().mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.properties().extendedVlan()); + Assertions.assertEquals("wzvmdoksqd", model.properties().networkToNetworkInterconnectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainInner model = new L2IsolationDomainInner().withLocation("hqsycljselp") - .withTags(mapOf("by", "afvafh", "rsofpltdbmairrh", "ccbevxrhyzdf", "npq", "hfnrac", "uuj", "g")) - .withNetworkFabricId("e") - .withVlanId(76777618) - .withMtu(246722999) - .withAnnotation("bzkkd"); + L2IsolationDomainInner model = new L2IsolationDomainInner().withLocation("v") + .withTags(mapOf("qvgx", "janepubdpkx", "hkxdxuwsaifmc", "aodetv", "ehgcvkbcknjo", "nosbz")) + .withProperties(new L2IsolationDomainProperties().withAnnotation("qsorh") + .withNetworkFabricId("ekxgn") + .withVlanId(464953682) + .withMtu(1040301389) + .withExtendedVlan(ExtendedVlan.ENABLED) + .withNetworkToNetworkInterconnectId("wzvmdoksqd")); model = BinaryData.fromObject(model).toObject(L2IsolationDomainInner.class); - Assertions.assertEquals("hqsycljselp", model.location()); - Assertions.assertEquals("afvafh", model.tags().get("by")); - Assertions.assertEquals("e", model.networkFabricId()); - Assertions.assertEquals(76777618, model.vlanId()); - Assertions.assertEquals(246722999, model.mtu()); - Assertions.assertEquals("bzkkd", model.annotation()); + Assertions.assertEquals("v", model.location()); + Assertions.assertEquals("janepubdpkx", model.tags().get("qvgx")); + Assertions.assertEquals("qsorh", model.properties().annotation()); + Assertions.assertEquals("ekxgn", model.properties().networkFabricId()); + Assertions.assertEquals(464953682, model.properties().vlanId()); + Assertions.assertEquals(1040301389, model.properties().mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, model.properties().extendedVlan()); + Assertions.assertEquals("wzvmdoksqd", model.properties().networkToNetworkInterconnectId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainListResultTests.java new file mode 100644 index 000000000000..f55ece672c42 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainListResultTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L2IsolationDomainListResult; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import org.junit.jupiter.api.Assertions; + +public final class L2IsolationDomainListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L2IsolationDomainListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"iakeciqc\",\"networkFabricId\":\"xrtuicds\",\"vlanId\":1797056708,\"mtu\":1056742134,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"zhzzwvywrg\",\"lastOperation\":{\"details\":\"ydg\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\"},\"location\":\"qao\",\"tags\":{\"lvlmfej\":\"rkclamg\"},\"id\":\"oqeykglt\",\"name\":\"gxhqfgqkayejs\",\"type\":\"tlgflwfgz\"},{\"properties\":{\"annotation\":\"u\",\"networkFabricId\":\"ijjcea\",\"vlanId\":462281991,\"mtu\":614058345,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"tvamcaszknx\",\"lastOperation\":{\"details\":\"cxetyvkunmignoh\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\"},\"location\":\"wpin\",\"tags\":{\"hmedeilbjywfcfxz\":\"vabbx\",\"vjslczwcii\":\"rzzihvwypus\",\"vxadqacfrgnawbab\":\"jsllfryvd\",\"yq\":\"fbktyjmfczlf\"},\"id\":\"frbzgowo\",\"name\":\"qmje\",\"type\":\"jcx\"},{\"properties\":{\"annotation\":\"qg\",\"networkFabricId\":\"hlusrvxisi\",\"vlanId\":1468483041,\"mtu\":1933645120,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"jqvlsumywz\",\"lastOperation\":{\"details\":\"xgo\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"location\":\"ubyzn\",\"tags\":{\"ujlyegq\":\"fkeebgvopemtuo\"},\"id\":\"vn\",\"name\":\"gflqqbtnyjp\",\"type\":\"lxdbfvabmvms\"},{\"properties\":{\"annotation\":\"aevwjcnkot\",\"networkFabricId\":\"lwuhvajmailfe\",\"vlanId\":1656316064,\"mtu\":1821041503,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"wjiqullqxb\",\"lastOperation\":{\"details\":\"rscmqerndbrnye\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\"},\"location\":\"rkadjfynnfmuiiir\",\"tags\":{\"iutgnjizbeewoiy\":\"ohykfkxbbcbrw\",\"uyrsrziuctix\":\"rvzb\"},\"id\":\"bdsuifr\",\"name\":\"vka\",\"type\":\"pezkis\"}],\"nextLink\":\"jm\"}") + .toObject(L2IsolationDomainListResult.class); + Assertions.assertEquals("qao", model.value().get(0).location()); + Assertions.assertEquals("rkclamg", model.value().get(0).tags().get("lvlmfej")); + Assertions.assertEquals("iakeciqc", model.value().get(0).properties().annotation()); + Assertions.assertEquals("xrtuicds", model.value().get(0).properties().networkFabricId()); + Assertions.assertEquals(1797056708, model.value().get(0).properties().vlanId()); + Assertions.assertEquals(1056742134, model.value().get(0).properties().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.value().get(0).properties().extendedVlan()); + Assertions.assertEquals("zhzzwvywrg", model.value().get(0).properties().networkToNetworkInterconnectId()); + Assertions.assertEquals("jm", model.nextLink()); + } +} 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 index 97679d0c62b3..450c0e4221d3 100644 --- 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 @@ -1,28 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.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\":947905115,\"annotation\":\"fijd\"}") + L2IsolationDomainPatchProperties model = BinaryData.fromString( + "{\"annotation\":\"ilfjqqacdmk\",\"mtu\":2078904613,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"jw\"}") .toObject(L2IsolationDomainPatchProperties.class); - Assertions.assertEquals("fijd", model.annotation()); - Assertions.assertEquals(947905115, model.mtu()); + Assertions.assertEquals("ilfjqqacdmk", model.annotation()); + Assertions.assertEquals(2078904613, model.mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.extendedVlan()); + Assertions.assertEquals("jw", model.networkToNetworkInterconnectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainPatchProperties model - = new L2IsolationDomainPatchProperties().withAnnotation("fijd").withMtu(947905115); + L2IsolationDomainPatchProperties model = new L2IsolationDomainPatchProperties().withAnnotation("ilfjqqacdmk") + .withMtu(2078904613) + .withExtendedVlan(ExtendedVlan.DISABLED) + .withNetworkToNetworkInterconnectId("jw"); model = BinaryData.fromObject(model).toObject(L2IsolationDomainPatchProperties.class); - Assertions.assertEquals("fijd", model.annotation()); - Assertions.assertEquals(947905115, model.mtu()); + Assertions.assertEquals("ilfjqqacdmk", model.annotation()); + Assertions.assertEquals(2078904613, model.mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.extendedVlan()); + Assertions.assertEquals("jw", model.networkToNetworkInterconnectId()); } } 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 index 15075c981b96..ee02d21eb768 100644 --- 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 @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatchProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,24 +16,28 @@ public final class L2IsolationDomainPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L2IsolationDomainPatch model = BinaryData.fromString( - "{\"properties\":{\"mtu\":542364624,\"annotation\":\"ykwphvxzcwxhmpe\"},\"tags\":{\"aonwivkcqhrxh\":\"ke\",\"jubyqjfkakfq\":\"knlccrmmkyup\",\"yildudxjascow\":\"rke\",\"jkpdxphlkksnm\":\"f\"}}") + "{\"tags\":{\"gvpyigdaqqilzdc\":\"xxsaetgz\"},\"properties\":{\"annotation\":\"joedx\",\"mtu\":1780634429,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"fpaurw\"}}") .toObject(L2IsolationDomainPatch.class); - Assertions.assertEquals("ke", model.tags().get("aonwivkcqhrxh")); - Assertions.assertEquals(542364624, model.mtu()); - Assertions.assertEquals("ykwphvxzcwxhmpe", model.annotation()); + Assertions.assertEquals("xxsaetgz", model.tags().get("gvpyigdaqqilzdc")); + Assertions.assertEquals("joedx", model.properties().annotation()); + Assertions.assertEquals(1780634429, model.properties().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.properties().extendedVlan()); + Assertions.assertEquals("fpaurw", model.properties().networkToNetworkInterconnectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainPatch model = new L2IsolationDomainPatch() - .withTags(mapOf("aonwivkcqhrxh", "ke", "jubyqjfkakfq", "knlccrmmkyup", "yildudxjascow", "rke", - "jkpdxphlkksnm", "f")) - .withMtu(542364624) - .withAnnotation("ykwphvxzcwxhmpe"); + L2IsolationDomainPatch model = new L2IsolationDomainPatch().withTags(mapOf("gvpyigdaqqilzdc", "xxsaetgz")) + .withProperties(new L2IsolationDomainPatchProperties().withAnnotation("joedx") + .withMtu(1780634429) + .withExtendedVlan(ExtendedVlan.DISABLED) + .withNetworkToNetworkInterconnectId("fpaurw")); model = BinaryData.fromObject(model).toObject(L2IsolationDomainPatch.class); - Assertions.assertEquals("ke", model.tags().get("aonwivkcqhrxh")); - Assertions.assertEquals(542364624, model.mtu()); - Assertions.assertEquals("ykwphvxzcwxhmpe", model.annotation()); + Assertions.assertEquals("xxsaetgz", model.tags().get("gvpyigdaqqilzdc")); + Assertions.assertEquals("joedx", model.properties().annotation()); + Assertions.assertEquals(1780634429, model.properties().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.properties().extendedVlan()); + Assertions.assertEquals("fpaurw", model.properties().networkToNetworkInterconnectId()); } // Use "Map.of" if available 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 index e3a0ac2decef..c37b963dff7e 100644 --- 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 @@ -1,35 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; +import com.azure.resourcemanager.managednetworkfabric.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\":\"umtggmuwdchozfn\",\"vlanId\":820610981,\"mtu\":418227301,\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"annotation\":\"izvoaiknaqlnuwi\"}") + "{\"annotation\":\"zoblq\",\"networkFabricId\":\"aafrqulhmzyqbhd\",\"vlanId\":1682795627,\"mtu\":1440885042,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"jiyrqjcr\",\"lastOperation\":{\"details\":\"wmzwdfkbnrzorpdl\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(L2IsolationDomainProperties.class); - Assertions.assertEquals("izvoaiknaqlnuwi", model.annotation()); - Assertions.assertEquals("umtggmuwdchozfn", model.networkFabricId()); - Assertions.assertEquals(820610981, model.vlanId()); - Assertions.assertEquals(418227301, model.mtu()); + Assertions.assertEquals("zoblq", model.annotation()); + Assertions.assertEquals("aafrqulhmzyqbhd", model.networkFabricId()); + Assertions.assertEquals(1682795627, model.vlanId()); + Assertions.assertEquals(1440885042, model.mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.extendedVlan()); + Assertions.assertEquals("jiyrqjcr", model.networkToNetworkInterconnectId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L2IsolationDomainProperties model = new L2IsolationDomainProperties().withAnnotation("izvoaiknaqlnuwi") - .withNetworkFabricId("umtggmuwdchozfn") - .withVlanId(820610981) - .withMtu(418227301); + L2IsolationDomainProperties model = new L2IsolationDomainProperties().withAnnotation("zoblq") + .withNetworkFabricId("aafrqulhmzyqbhd") + .withVlanId(1682795627) + .withMtu(1440885042) + .withExtendedVlan(ExtendedVlan.DISABLED) + .withNetworkToNetworkInterconnectId("jiyrqjcr"); model = BinaryData.fromObject(model).toObject(L2IsolationDomainProperties.class); - Assertions.assertEquals("izvoaiknaqlnuwi", model.annotation()); - Assertions.assertEquals("umtggmuwdchozfn", model.networkFabricId()); - Assertions.assertEquals(820610981, model.vlanId()); - Assertions.assertEquals(418227301, model.mtu()); + Assertions.assertEquals("zoblq", model.annotation()); + Assertions.assertEquals("aafrqulhmzyqbhd", model.networkFabricId()); + Assertions.assertEquals(1682795627, model.vlanId()); + Assertions.assertEquals(1440885042, model.mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, model.extendedVlan()); + Assertions.assertEquals("jiyrqjcr", model.networkToNetworkInterconnectId()); } } 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 index c29469f25996..1621d21b93a0 100644 --- 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 @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -23,32 +25,37 @@ public final class L2IsolationDomainsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"haezcldkc\",\"vlanId\":2146258576,\"mtu\":113095323,\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"annotation\":\"jstfs\"},\"location\":\"cjakgkqwx\",\"tags\":{\"wdjox\":\"oqzh\"},\"id\":\"kbd\",\"name\":\"sobvcnsb\",\"type\":\"oeznl\"}"; + = "{\"properties\":{\"annotation\":\"cgihnalp\",\"networkFabricId\":\"ue\",\"vlanId\":709838487,\"mtu\":189627182,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"wbm\",\"lastOperation\":{\"details\":\"ikatywedbpirb\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"xncszdwpaveux\",\"tags\":{\"merf\":\"gsoebdltniui\",\"ddoeilhgga\":\"hgvcy\"},\"id\":\"feudbobmoljirch\",\"name\":\"wlzi\",\"type\":\"vccquajpoipdjxyo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L2IsolationDomain response = manager.l2IsolationDomains() - .define("jnzpqhqqsa") - .withRegion("cv") - .withExistingResourceGroup("rvqrwwbdrwroqk") - .withNetworkFabricId("kyu") - .withVlanId(2097989242) - .withTags(mapOf("jocrhnxzmfvmw", "suowtolkyqf", "rawwhyxf", "nrtc")) - .withMtu(696018233) - .withAnnotation("nhekzazvgeytlpls") + .define("dpkihqhnfubev") + .withRegion("bargeeynqlsnrga") + .withExistingResourceGroup("atsiznymwz") + .withProperties(new L2IsolationDomainProperties().withAnnotation("dxcezxevl") + .withNetworkFabricId("febqoqiaklqak") + .withVlanId(917307642) + .withMtu(428571975) + .withExtendedVlan(ExtendedVlan.DISABLED) + .withNetworkToNetworkInterconnectId("twrphmriipzgf")) + .withTags(mapOf("ouoq", "vgjjpfyxhsppvjsd", "ogeqeapas", "enqsom", "ppypfreuwvzhnd", "q", "llwyoxzuhellitp", + "vtoiqofzttqg")) .create(); - Assertions.assertEquals("cjakgkqwx", response.location()); - Assertions.assertEquals("oqzh", response.tags().get("wdjox")); - Assertions.assertEquals("haezcldkc", response.networkFabricId()); - Assertions.assertEquals(2146258576, response.vlanId()); - Assertions.assertEquals(113095323, response.mtu()); - Assertions.assertEquals("jstfs", response.annotation()); + Assertions.assertEquals("xncszdwpaveux", response.location()); + Assertions.assertEquals("gsoebdltniui", response.tags().get("merf")); + Assertions.assertEquals("cgihnalp", response.properties().annotation()); + Assertions.assertEquals("ue", response.properties().networkFabricId()); + Assertions.assertEquals(709838487, response.properties().vlanId()); + Assertions.assertEquals(189627182, response.properties().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, response.properties().extendedVlan()); + Assertions.assertEquals("wbm", response.properties().networkToNetworkInterconnectId()); } // Use "Map.of" if available 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 index 2cc30afa8809..3900909ac8a6 100644 --- 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 @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,24 +22,26 @@ public final class L2IsolationDomainsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"umqeu\",\"vlanId\":1939344941,\"mtu\":1221835156,\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"annotation\":\"vjqutxrbgbzgfhzd\"},\"location\":\"hk\",\"tags\":{\"jwhz\":\"cbicfecthotb\",\"jdpayx\":\"pxjvtwk\",\"qztjfkgb\":\"pqiwuzr\",\"en\":\"qqjobsyn\"},\"id\":\"onjqhdheosx\",\"name\":\"wfudmpf\",\"type\":\"wypphtjtntcwgpd\"}"; + = "{\"properties\":{\"annotation\":\"ubb\",\"networkFabricId\":\"hcidcfwool\",\"vlanId\":1022100401,\"mtu\":179832681,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"mmixfzaupgblna\",\"lastOperation\":{\"details\":\"p\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"location\":\"uyil\",\"tags\":{\"ijebm\":\"z\",\"hoeashu\":\"iongmndw\",\"mzwynsmmphvkyez\":\"fvbj\",\"eofzr\":\"seyuoyjmjwqdslq\"},\"id\":\"rz\",\"name\":\"pyaymh\",\"type\":\"lnmwaxsymnrt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L2IsolationDomain response = manager.l2IsolationDomains() - .getByResourceGroupWithResponse("xdhkoex", "rhgnakajwscmneev", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("kgygawyhpwmdkyfg", "elvyhvvpuqy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hk", response.location()); - Assertions.assertEquals("cbicfecthotb", response.tags().get("jwhz")); - Assertions.assertEquals("umqeu", response.networkFabricId()); - Assertions.assertEquals(1939344941, response.vlanId()); - Assertions.assertEquals(1221835156, response.mtu()); - Assertions.assertEquals("vjqutxrbgbzgfhzd", response.annotation()); + Assertions.assertEquals("uyil", response.location()); + Assertions.assertEquals("z", response.tags().get("ijebm")); + Assertions.assertEquals("ubb", response.properties().annotation()); + Assertions.assertEquals("hcidcfwool", response.properties().networkFabricId()); + Assertions.assertEquals(1022100401, response.properties().vlanId()); + Assertions.assertEquals(179832681, response.properties().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, response.properties().extendedVlan()); + Assertions.assertEquals("mmixfzaupgblna", response.properties().networkToNetworkInterconnectId()); } } 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 index f79966c2a406..afb00ae1b45f 100644 --- 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 @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,23 +23,25 @@ public final class L2IsolationDomainsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"szhh\",\"vlanId\":1061055925,\"mtu\":2093232505,\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"lffqgdodn\"},\"location\":\"yipgkmjt\",\"tags\":{\"tgdrfzj\":\"mdzesime\",\"gvd\":\"flz\",\"rzbidaebez\":\"vabxiefc\"},\"id\":\"icew\",\"name\":\"fajw\",\"type\":\"ylciobb\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"avyotp\",\"networkFabricId\":\"vpahhpk\",\"vlanId\":2097414374,\"mtu\":96041225,\"extendedVlan\":\"Disabled\",\"networkToNetworkInterconnectId\":\"xzn\",\"lastOperation\":{\"details\":\"omi\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\"},\"location\":\"ygasfmhb\",\"tags\":{\"lirybytcaqp\":\"wkqnatxvuzcc\"},\"id\":\"ohlcbnrv\",\"name\":\"yyhhsis\",\"type\":\"tq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.l2IsolationDomains().listByResourceGroup("o", com.azure.core.util.Context.NONE); + = manager.l2IsolationDomains().listByResourceGroup("qm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yipgkmjt", response.iterator().next().location()); - Assertions.assertEquals("mdzesime", response.iterator().next().tags().get("tgdrfzj")); - Assertions.assertEquals("szhh", response.iterator().next().networkFabricId()); - Assertions.assertEquals(1061055925, response.iterator().next().vlanId()); - Assertions.assertEquals(2093232505, response.iterator().next().mtu()); - Assertions.assertEquals("lffqgdodn", response.iterator().next().annotation()); + Assertions.assertEquals("ygasfmhb", response.iterator().next().location()); + Assertions.assertEquals("wkqnatxvuzcc", response.iterator().next().tags().get("lirybytcaqp")); + Assertions.assertEquals("avyotp", response.iterator().next().properties().annotation()); + Assertions.assertEquals("vpahhpk", response.iterator().next().properties().networkFabricId()); + Assertions.assertEquals(2097414374, response.iterator().next().properties().vlanId()); + Assertions.assertEquals(96041225, response.iterator().next().properties().mtu()); + Assertions.assertEquals(ExtendedVlan.DISABLED, response.iterator().next().properties().extendedVlan()); + Assertions.assertEquals("xzn", response.iterator().next().properties().networkToNetworkInterconnectId()); } } 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 index 80211044f3cf..af44afa933bc 100644 --- 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 @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.ExtendedVlan; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,22 +23,24 @@ public final class L2IsolationDomainsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"wwsr\",\"vlanId\":703090542,\"mtu\":2082392760,\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\",\"annotation\":\"xs\"},\"location\":\"teevfgaxfez\",\"tags\":{\"kyrxgmzzeglwd\":\"sddkodkgxq\",\"kkraj\":\"fsspfegaoksd\"},\"id\":\"yuklxkel\",\"name\":\"zpyqbwhuecx\",\"type\":\"gsingmhpavsfg\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"panteqiw\",\"networkFabricId\":\"uukaamimkjz\",\"vlanId\":1081829116,\"mtu\":419650553,\"extendedVlan\":\"Enabled\",\"networkToNetworkInterconnectId\":\"xvksij\",\"lastOperation\":{\"details\":\"yindex\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"up\",\"tags\":{\"kngq\":\"ddatopdtphvjgvjz\",\"nrmd\":\"iyjxzxbthtnyzpu\"},\"id\":\"koabfcvefbw\",\"name\":\"pmgyqshsasm\",\"type\":\"yuyutkbxr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("teevfgaxfez", response.iterator().next().location()); - Assertions.assertEquals("sddkodkgxq", response.iterator().next().tags().get("kyrxgmzzeglwd")); - Assertions.assertEquals("wwsr", response.iterator().next().networkFabricId()); - Assertions.assertEquals(703090542, response.iterator().next().vlanId()); - Assertions.assertEquals(2082392760, response.iterator().next().mtu()); - Assertions.assertEquals("xs", response.iterator().next().annotation()); + Assertions.assertEquals("up", response.iterator().next().location()); + Assertions.assertEquals("ddatopdtphvjgvjz", response.iterator().next().tags().get("kngq")); + Assertions.assertEquals("panteqiw", response.iterator().next().properties().annotation()); + Assertions.assertEquals("uukaamimkjz", response.iterator().next().properties().networkFabricId()); + Assertions.assertEquals(1081829116, response.iterator().next().properties().vlanId()); + Assertions.assertEquals(419650553, response.iterator().next().properties().mtu()); + Assertions.assertEquals(ExtendedVlan.ENABLED, response.iterator().next().properties().extendedVlan()); + Assertions.assertEquals("xvksij", response.iterator().next().properties().networkToNetworkInterconnectId()); } } 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 6b835a8ff347..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.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 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\":\"lmdgglmepjp\",\"vlanId\":188221031,\"mtu\":978481957,\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"annotation\":\"szngafpgyl\"},\"location\":\"ecjujcng\",\"tags\":{\"oknub\":\"yedmzrgj\",\"coqra\":\"oitpkpztrgdgx\",\"qi\":\"wugyx\"},\"id\":\"we\",\"name\":\"alwvskbu\",\"type\":\"z\"},{\"properties\":{\"networkFabricId\":\"caqt\",\"vlanId\":1536605508,\"mtu\":324493870,\"configurationState\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\",\"annotation\":\"sxzakuejkm\"},\"location\":\"iztjof\",\"tags\":{\"yeji\":\"ovjufycsjmlbe\",\"rtudawlpjfel\":\"iuxegth\",\"bgqnz\":\"erppt\",\"ialwc\":\"nhii\"},\"id\":\"gckbb\",\"name\":\"ccgzpraoxnyu\",\"type\":\"fa\"}],\"nextLink\":\"gftipwc\"}") - .toObject(L2IsolationDomainsListResult.class); - Assertions.assertEquals("ecjujcng", model.value().get(0).location()); - Assertions.assertEquals("yedmzrgj", model.value().get(0).tags().get("oknub")); - Assertions.assertEquals("lmdgglmepjp", model.value().get(0).networkFabricId()); - Assertions.assertEquals(188221031, model.value().get(0).vlanId()); - Assertions.assertEquals(978481957, model.value().get(0).mtu()); - Assertions.assertEquals("szngafpgyl", model.value().get(0).annotation()); - Assertions.assertEquals("gftipwc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainsListResult model = new L2IsolationDomainsListResult().withValue(Arrays.asList( - new L2IsolationDomainInner().withLocation("ecjujcng") - .withTags(mapOf("oknub", "yedmzrgj", "coqra", "oitpkpztrgdgx", "qi", "wugyx")) - .withNetworkFabricId("lmdgglmepjp") - .withVlanId(188221031) - .withMtu(978481957) - .withAnnotation("szngafpgyl"), - new L2IsolationDomainInner().withLocation("iztjof") - .withTags(mapOf("yeji", "ovjufycsjmlbe", "rtudawlpjfel", "iuxegth", "bgqnz", "erppt", "ialwc", "nhii")) - .withNetworkFabricId("caqt") - .withVlanId(1536605508) - .withMtu(324493870) - .withAnnotation("sxzakuejkm"))) - .withNextLink("gftipwc"); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainsListResult.class); - Assertions.assertEquals("ecjujcng", model.value().get(0).location()); - Assertions.assertEquals("yedmzrgj", model.value().get(0).tags().get("oknub")); - Assertions.assertEquals("lmdgglmepjp", model.value().get(0).networkFabricId()); - Assertions.assertEquals(188221031, model.value().get(0).vlanId()); - Assertions.assertEquals(978481957, model.value().get(0).mtu()); - Assertions.assertEquals("szngafpgyl", model.value().get(0).annotation()); - Assertions.assertEquals("gftipwc", model.nextLink()); - } - - // Use "Map.of" if available - @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/L3ExportRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyPatchTests.java new file mode 100644 index 000000000000..64027c6c85bb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class L3ExportRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3ExportRoutePolicyPatch model = BinaryData + .fromString( + "{\"exportIpv4RoutePolicyId\":\"ricctkwmuqqoa\",\"exportIpv6RoutePolicyId\":\"eiyglesrwvaexhdc\"}") + .toObject(L3ExportRoutePolicyPatch.class); + Assertions.assertEquals("ricctkwmuqqoa", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("eiyglesrwvaexhdc", model.exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + L3ExportRoutePolicyPatch model = new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("ricctkwmuqqoa") + .withExportIpv6RoutePolicyId("eiyglesrwvaexhdc"); + model = BinaryData.fromObject(model).toObject(L3ExportRoutePolicyPatch.class); + Assertions.assertEquals("ricctkwmuqqoa", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("eiyglesrwvaexhdc", model.exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java index 759ce44f7e40..22c88a4dad4a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3ExportRoutePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class L3ExportRoutePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3ExportRoutePolicy model = BinaryData - .fromString("{\"exportIpv4RoutePolicyId\":\"ipxgzdy\",\"exportIpv6RoutePolicyId\":\"sfayorpravkjoges\"}") + .fromString("{\"exportIpv4RoutePolicyId\":\"qqxvztpbn\",\"exportIpv6RoutePolicyId\":\"qtxjtomalswbnfdd\"}") .toObject(L3ExportRoutePolicy.class); - Assertions.assertEquals("ipxgzdy", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("sfayorpravkjoges", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("qqxvztpbn", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("qtxjtomalswbnfdd", model.exportIpv6RoutePolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3ExportRoutePolicy model = new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("ipxgzdy") - .withExportIpv6RoutePolicyId("sfayorpravkjoges"); + L3ExportRoutePolicy model = new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("qqxvztpbn") + .withExportIpv6RoutePolicyId("qtxjtomalswbnfdd"); model = BinaryData.fromObject(model).toObject(L3ExportRoutePolicy.class); - Assertions.assertEquals("ipxgzdy", model.exportIpv4RoutePolicyId()); - Assertions.assertEquals("sfayorpravkjoges", model.exportIpv6RoutePolicyId()); + Assertions.assertEquals("qqxvztpbn", model.exportIpv4RoutePolicyId()); + Assertions.assertEquals("qtxjtomalswbnfdd", model.exportIpv6RoutePolicyId()); } } 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 index 02e3136bc9e3..a230d4cee6a3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,8 +10,12 @@ 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.L3IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,54 +25,72 @@ public final class L3IsolationDomainInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"byubhiqdxyurnpn\",\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"yl\"}],\"ipv6Routes\":[{\"prefix\":\"gvxvatv\"},{\"prefix\":\"rkdlb\"},{\"prefix\":\"bqxvhcsyhzlwxae\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"ur\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ndsbdw\",\"exportIpv6RoutePolicyId\":\"derzmwnto\"}},\"annotation\":\"gttmvmmagoaqyl\"},\"location\":\"ztj\",\"tags\":{\"xitp\":\"zjcg\",\"tbdrvcqgue\":\"inzcpdltkrlgj\",\"eqdurelyujlfyoum\":\"zhomp\",\"brzmqxucycijoclx\":\"ckyeclcdigpta\"},\"id\":\"utgjcyz\",\"name\":\"zjd\",\"type\":\"r\"}") + "{\"properties\":{\"annotation\":\"jczjnciuiyqv\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"i\"},{\"prefix\":\"qqzlgcndhz\"},{\"prefix\":\"rr\"},{\"prefix\":\"cfsrhkhgsn\"}],\"ipv6Routes\":[{\"prefix\":\"wkpphefsb\"},{\"prefix\":\"xlb\"},{\"prefix\":\"xomeikjclwzacn\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"suqtaazyqbx\",\"exportIpv6RoutePolicyId\":\"oyfpuq\"}},\"networkFabricId\":\"iqezxlhdj\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"a\",\"exportIpv6RoutePolicyId\":\"vpsozjiihjri\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"zo\"]},\"routePrefixLimit\":{\"hardLimit\":1743305955,\"threshold\":1242880517},\"lastOperation\":{\"details\":\"njkgvfnmx\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\"},\"location\":\"btyi\",\"tags\":{\"fqjpnqno\":\"vpi\"},\"id\":\"w\",\"name\":\"bedenrexkx\",\"type\":\"hxvucnu\"}") .toObject(L3IsolationDomainInner.class); - Assertions.assertEquals("ztj", model.location()); - Assertions.assertEquals("zjcg", model.tags().get("xitp")); - Assertions.assertEquals("byubhiqdxyurnpn", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("yl", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gvxvatv", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ur", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("ndsbdw", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("derzmwnto", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("gttmvmmagoaqyl", model.annotation()); + Assertions.assertEquals("btyi", model.location()); + Assertions.assertEquals("vpi", model.tags().get("fqjpnqno")); + Assertions.assertEquals("jczjnciuiyqv", model.properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.properties().redistributeStaticRoutes()); + Assertions.assertEquals("i", model.properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wkpphefsb", + model.properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("suqtaazyqbx", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("oyfpuq", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("iqezxlhdj", model.properties().networkFabricId()); + Assertions.assertEquals("a", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("vpsozjiihjri", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1743305955, model.properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(1242880517, model.properties().routePrefixLimit().threshold()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3IsolationDomainInner model - = new L3IsolationDomainInner().withLocation("ztj") - .withTags(mapOf("xitp", "zjcg", "tbdrvcqgue", "inzcpdltkrlgj", "eqdurelyujlfyoum", "zhomp", - "brzmqxucycijoclx", "ckyeclcdigpta")) - .withNetworkFabricId("byubhiqdxyurnpn") + L3IsolationDomainInner model = new L3IsolationDomainInner().withLocation("btyi") + .withTags(mapOf("fqjpnqno", "vpi")) + .withProperties(new L3IsolationDomainProperties().withAnnotation("jczjnciuiyqv") .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("yl"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("gvxvatv"), - new AggregateRoute().withPrefix("rkdlb"), new AggregateRoute().withPrefix("bqxvhcsyhzlwxae")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("ur") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("ndsbdw") - .withExportIpv6RoutePolicyId("derzmwnto"))) - .withAnnotation("gttmvmmagoaqyl"); + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("i"), + new AggregateRoute().withPrefix("qqzlgcndhz"), new AggregateRoute().withPrefix("rr"), + new AggregateRoute().withPrefix("cfsrhkhgsn"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("wkpphefsb"), + new AggregateRoute().withPrefix("xlb"), new AggregateRoute().withPrefix("xomeikjclwzacn")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("suqtaazyqbx") + .withExportIpv6RoutePolicyId("oyfpuq"))) + .withNetworkFabricId("iqezxlhdj") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("a") + .withExportIpv6RoutePolicyId("vpsozjiihjri"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withRoutePrefixLimit( + new RoutePrefixLimitProperties().withHardLimit(1743305955).withThreshold(1242880517))); model = BinaryData.fromObject(model).toObject(L3IsolationDomainInner.class); - Assertions.assertEquals("ztj", model.location()); - Assertions.assertEquals("zjcg", model.tags().get("xitp")); - Assertions.assertEquals("byubhiqdxyurnpn", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("yl", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gvxvatv", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ur", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("ndsbdw", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("derzmwnto", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("gttmvmmagoaqyl", model.annotation()); + Assertions.assertEquals("btyi", model.location()); + Assertions.assertEquals("vpi", model.tags().get("fqjpnqno")); + Assertions.assertEquals("jczjnciuiyqv", model.properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.properties().redistributeStaticRoutes()); + Assertions.assertEquals("i", model.properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wkpphefsb", + model.properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("suqtaazyqbx", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("oyfpuq", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("iqezxlhdj", model.properties().networkFabricId()); + Assertions.assertEquals("a", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("vpsozjiihjri", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1743305955, model.properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(1242880517, model.properties().routePrefixLimit().threshold()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainListResultTests.java new file mode 100644 index 000000000000..e6759af76021 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainListResultTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.L3IsolationDomainListResult; +import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; +import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import org.junit.jupiter.api.Assertions; + +public final class L3IsolationDomainListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3IsolationDomainListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"phepifexleqirc\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"x\"},{\"prefix\":\"rpjl\"}],\"ipv6Routes\":[{\"prefix\":\"uod\"},{\"prefix\":\"cpunettepdjx\"},{\"prefix\":\"eskoy\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"lpckaewsedves\",\"exportIpv6RoutePolicyId\":\"xegqphr\"}},\"networkFabricId\":\"fn\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mjtsgh\",\"exportIpv6RoutePolicyId\":\"c\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"arpzeqacdldtzm\",\"ypefcpczshnuqnda\",\"zupfkhuytuszxhm\",\"vtvegwqiukvzw\"]},\"routePrefixLimit\":{\"hardLimit\":798786113,\"threshold\":772209790},\"lastOperation\":{\"details\":\"kgkskjivbsshaj\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"},\"location\":\"pgeumilh\",\"tags\":{\"dbzsx\":\"trdexyionofnin\",\"bzbcyksiv\":\"wqqrsmpcbbprtuga\"},\"id\":\"fogdrtbfcm\",\"name\":\"rftsjcwjjxs\",\"type\":\"mb\"},{\"properties\":{\"annotation\":\"vifdxkecifhocjx\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"txvcm\"},{\"prefix\":\"funlcpxxvi\"},{\"prefix\":\"yeyng\"}],\"ipv6Routes\":[{\"prefix\":\"rquv\"},{\"prefix\":\"ygg\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"rdcueljtiahx\",\"exportIpv6RoutePolicyId\":\"q\"}},\"networkFabricId\":\"yarvsxzqbglcjk\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"thzodubtlmjtgbl\",\"exportIpv6RoutePolicyId\":\"skkfmk\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"xyxgbkkqv\",\"cteoedlrslsk\"]},\"routePrefixLimit\":{\"hardLimit\":311372286,\"threshold\":1763792334},\"lastOperation\":{\"details\":\"dpvocojhpcn\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"gyte\",\"tags\":{\"nrzdajlskzptj\":\"ilmhivzkwwwnc\",\"qlehmcgcjeinu\":\"ulweucyrth\",\"qnttmbq\":\"hokamvfej\"},\"id\":\"abzfivf\",\"name\":\"kpysthhzagjf\",\"type\":\"yyrlhgenu\"}],\"nextLink\":\"jgvkvebaqszllr\"}") + .toObject(L3IsolationDomainListResult.class); + Assertions.assertEquals("pgeumilh", model.value().get(0).location()); + Assertions.assertEquals("trdexyionofnin", model.value().get(0).tags().get("dbzsx")); + Assertions.assertEquals("phepifexleqirc", model.value().get(0).properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, + model.value().get(0).properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, + model.value().get(0).properties().redistributeStaticRoutes()); + Assertions.assertEquals("x", + model.value().get(0).properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("uod", + model.value().get(0).properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lpckaewsedves", + model.value() + .get(0) + .properties() + .connectedSubnetRoutePolicy() + .exportRoutePolicy() + .exportIpv4RoutePolicyId()); + Assertions.assertEquals("xegqphr", + model.value() + .get(0) + .properties() + .connectedSubnetRoutePolicy() + .exportRoutePolicy() + .exportIpv6RoutePolicyId()); + Assertions.assertEquals("fn", model.value().get(0).properties().networkFabricId()); + Assertions.assertEquals("mjtsgh", + model.value().get(0).properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("c", + model.value().get(0).properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(798786113, model.value().get(0).properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(772209790, model.value().get(0).properties().routePrefixLimit().threshold()); + Assertions.assertEquals("jgvkvebaqszllr", model.nextLink()); + } +} 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 index f1f93670a1cf..b8e0706aceff 100644 --- 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,44 +21,57 @@ public final class L3IsolationDomainPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainPatchProperties model = BinaryData.fromString( - "{\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"wkd\"}],\"ipv6Routes\":[{\"prefix\":\"rucpcunnuz\"},{\"prefix\":\"qumoeno\"},{\"prefix\":\"naie\"},{\"prefix\":\"hqhsknd\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"qkaadlknw\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"nniyopetxi\",\"exportIpv6RoutePolicyId\":\"nrlyxnuc\"}},\"annotation\":\"p\"}") + "{\"annotation\":\"tuh\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"duyeuyl\"},{\"prefix\":\"phm\"},{\"prefix\":\"ybkcgsuthhllnmwy\"}],\"ipv6Routes\":[{\"prefix\":\"x\"},{\"prefix\":\"x\"},{\"prefix\":\"fciatxtjrr\"},{\"prefix\":\"kmdskjhhxd\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"oxcxscvslx\",\"exportIpv6RoutePolicyId\":\"uavkrmukm\"}},\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"xett\",\"exportIpv6RoutePolicyId\":\"lojfkqidnqto\"}},\"routePrefixLimit\":{\"hardLimit\":1052913178,\"threshold\":317865008}}") .toObject(L3IsolationDomainPatchProperties.class); - Assertions.assertEquals("p", model.annotation()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); + Assertions.assertEquals("tuh", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("wkd", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rucpcunnuz", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("qkaadlknw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("nniyopetxi", + Assertions.assertEquals("duyeuyl", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("x", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("oxcxscvslx", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("nrlyxnuc", + Assertions.assertEquals("uavkrmukm", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("xett", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("lojfkqidnqto", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1052913178, model.routePrefixLimit().hardLimit()); + Assertions.assertEquals(317865008, model.routePrefixLimit().threshold()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3IsolationDomainPatchProperties model - = new L3IsolationDomainPatchProperties().withAnnotation("p") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("wkd"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("rucpcunnuz"), - new AggregateRoute().withPrefix("qumoeno"), new AggregateRoute().withPrefix("naie"), - new AggregateRoute().withPrefix("hqhsknd")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("qkaadlknw") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("nniyopetxi") - .withExportIpv6RoutePolicyId("nrlyxnuc"))); + L3IsolationDomainPatchProperties model = new L3IsolationDomainPatchProperties().withAnnotation("tuh") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("duyeuyl"), + new AggregateRoute().withPrefix("phm"), new AggregateRoute().withPrefix("ybkcgsuthhllnmwy"))) + .withIpv6Routes( + Arrays.asList(new AggregateRoute().withPrefix("x"), new AggregateRoute().withPrefix("x"), + new AggregateRoute().withPrefix("fciatxtjrr"), new AggregateRoute().withPrefix("kmdskjhhxd")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("oxcxscvslx") + .withExportIpv6RoutePolicyId("uavkrmukm"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("xett") + .withExportIpv6RoutePolicyId("lojfkqidnqto"))) + .withRoutePrefixLimit( + new RoutePrefixLimitPatchProperties().withHardLimit(1052913178).withThreshold(317865008)); model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatchProperties.class); - Assertions.assertEquals("p", model.annotation()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); + Assertions.assertEquals("tuh", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("wkd", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rucpcunnuz", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("qkaadlknw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("nniyopetxi", + Assertions.assertEquals("duyeuyl", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("x", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("oxcxscvslx", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("nrlyxnuc", + Assertions.assertEquals("uavkrmukm", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("xett", model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("lojfkqidnqto", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1052913178, model.routePrefixLimit().hardLimit()); + Assertions.assertEquals(317865008, model.routePrefixLimit().threshold()); } } 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 index 343ea287f051..d66773cb59ab 100644 --- 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 @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,47 +24,63 @@ public final class L3IsolationDomainPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainPatch model = BinaryData.fromString( - "{\"properties\":{\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ynq\"},{\"prefix\":\"aekqsykvwj\"},{\"prefix\":\"qpkevmyltjc\"},{\"prefix\":\"spxklu\"}],\"ipv6Routes\":[{\"prefix\":\"lfg\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"n\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"t\",\"exportIpv6RoutePolicyId\":\"osewxi\"}},\"annotation\":\"xvkqm\"},\"tags\":{\"f\":\"xvpif\",\"yzeyuubeid\":\"ify\",\"gygvfltgvdiho\":\"zlfytoit\"}}") + "{\"tags\":{\"fyif\":\"pmfbfununmpzkr\",\"cwnphbkgfyrtogm\":\"dschlzvfictnkjjw\",\"ev\":\"mjpjscdfpdqwty\",\"x\":\"wmseharxifvqn\"},\"properties\":{\"annotation\":\"pjptn\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"qpxlb\"}],\"ipv6Routes\":[{\"prefix\":\"kft\"},{\"prefix\":\"gatwmykyu\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"dwmf\",\"exportIpv6RoutePolicyId\":\"pycvjqdvdwkqpldr\"}},\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"naa\",\"exportIpv6RoutePolicyId\":\"agnteta\"}},\"routePrefixLimit\":{\"hardLimit\":105006498,\"threshold\":498575822}}}") .toObject(L3IsolationDomainPatch.class); - Assertions.assertEquals("xvpif", model.tags().get("f")); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("ynq", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("lfg", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("t", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("osewxi", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xvkqm", model.annotation()); + Assertions.assertEquals("pmfbfununmpzkr", model.tags().get("fyif")); + Assertions.assertEquals("pjptn", model.properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.properties().redistributeStaticRoutes()); + Assertions.assertEquals("qpxlb", model.properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("kft", model.properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dwmf", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("pycvjqdvdwkqpldr", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("naa", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("agnteta", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(105006498, model.properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(498575822, model.properties().routePrefixLimit().threshold()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { L3IsolationDomainPatch model = new L3IsolationDomainPatch() - .withTags(mapOf("f", "xvpif", "yzeyuubeid", "ify", "gygvfltgvdiho", "zlfytoit")) - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes( - Arrays.asList(new AggregateRoute().withPrefix("ynq"), new AggregateRoute().withPrefix("aekqsykvwj"), - new AggregateRoute().withPrefix("qpkevmyltjc"), new AggregateRoute().withPrefix("spxklu"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("lfg")))) - .withConnectedSubnetRoutePolicy( - new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("n") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("t") - .withExportIpv6RoutePolicyId("osewxi"))) - .withAnnotation("xvkqm"); + .withTags(mapOf("fyif", "pmfbfununmpzkr", "cwnphbkgfyrtogm", "dschlzvfictnkjjw", "ev", "mjpjscdfpdqwty", + "x", "wmseharxifvqn")) + .withProperties(new L3IsolationDomainPatchProperties().withAnnotation("pjptn") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration(new AggregateRoutePatchConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("qpxlb"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("kft"), + new AggregateRoute().withPrefix("gatwmykyu")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("dwmf") + .withExportIpv6RoutePolicyId("pycvjqdvdwkqpldr"))) + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("naa") + .withExportIpv6RoutePolicyId("agnteta"))) + .withRoutePrefixLimit( + new RoutePrefixLimitPatchProperties().withHardLimit(105006498).withThreshold(498575822))); model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatch.class); - Assertions.assertEquals("xvpif", model.tags().get("f")); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("ynq", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("lfg", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("t", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("osewxi", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xvkqm", model.annotation()); + Assertions.assertEquals("pmfbfununmpzkr", model.tags().get("fyif")); + Assertions.assertEquals("pjptn", model.properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.properties().redistributeStaticRoutes()); + Assertions.assertEquals("qpxlb", model.properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("kft", model.properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dwmf", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("pycvjqdvdwkqpldr", + model.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("naa", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("agnteta", + model.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(105006498, model.properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(498575822, model.properties().routePrefixLimit().threshold()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.java deleted file mode 100644 index 9aef3875d48e..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchablePropertiesTests.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.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.L3IsolationDomainPatchableProperties; -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 L3IsolationDomainPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainPatchableProperties model = BinaryData.fromString( - "{\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"oiqtamtyvskn\"},{\"prefix\":\"rwzawnvs\"}],\"ipv6Routes\":[{\"prefix\":\"hzagxnvhycvdimw\"},{\"prefix\":\"zregzgyufutrwpw\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"ekzkdhmeottaw\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"sxwwhnhjtf\",\"exportIpv6RoutePolicyId\":\"n\"}}}") - .toObject(L3IsolationDomainPatchableProperties.class); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("oiqtamtyvskn", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hzagxnvhycvdimw", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ekzkdhmeottaw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("sxwwhnhjtf", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainPatchableProperties model = new L3IsolationDomainPatchableProperties() - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("oiqtamtyvskn"), - new AggregateRoute().withPrefix("rwzawnvs"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("hzagxnvhycvdimw"), - new AggregateRoute().withPrefix("zregzgyufutrwpw")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("ekzkdhmeottaw") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("sxwwhnhjtf") - .withExportIpv6RoutePolicyId("n"))); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatchableProperties.class); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("oiqtamtyvskn", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("hzagxnvhycvdimw", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ekzkdhmeottaw", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("sxwwhnhjtf", - model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("n", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - } -} 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 index 17979bd942de..d75dbcf462d4 100644 --- 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 @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,45 +22,59 @@ public final class L3IsolationDomainPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3IsolationDomainProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"jb\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"fwwvuatbwbqam\"}],\"ipv6Routes\":[{\"prefix\":\"liys\"},{\"prefix\":\"pkcvmwf\"},{\"prefix\":\"uxx\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"ywbo\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qmiciijqp\",\"exportIpv6RoutePolicyId\":\"fbojxjmcsmyqwix\"}},\"annotation\":\"pwnkwywzwo\"}") + "{\"annotation\":\"mnhjevdyzn\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"mqozzkivy\"}],\"ipv6Routes\":[{\"prefix\":\"liizjixlqfhef\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"solronqqlm\",\"exportIpv6RoutePolicyId\":\"lqxsjxtelex\"}},\"networkFabricId\":\"vuqbozoo\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"carkuzlb\",\"exportIpv6RoutePolicyId\":\"ndtsnxawqytll\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"myck\"]},\"routePrefixLimit\":{\"hardLimit\":2024803970,\"threshold\":1940153691},\"lastOperation\":{\"details\":\"kywymxgaabj\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"}") .toObject(L3IsolationDomainProperties.class); - Assertions.assertEquals("pwnkwywzwo", model.annotation()); - Assertions.assertEquals("jb", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("fwwvuatbwbqam", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("liys", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ywbo", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("qmiciijqp", + Assertions.assertEquals("mnhjevdyzn", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); + Assertions.assertEquals("mqozzkivy", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("liizjixlqfhef", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("solronqqlm", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fbojxjmcsmyqwix", + Assertions.assertEquals("lqxsjxtelex", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("vuqbozoo", model.networkFabricId()); + Assertions.assertEquals("carkuzlb", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ndtsnxawqytll", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(2024803970, model.routePrefixLimit().hardLimit()); + Assertions.assertEquals(1940153691, model.routePrefixLimit().threshold()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3IsolationDomainProperties model = new L3IsolationDomainProperties().withAnnotation("pwnkwywzwo") - .withNetworkFabricId("jb") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) + L3IsolationDomainProperties model = new L3IsolationDomainProperties().withAnnotation("mnhjevdyzn") + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("fwwvuatbwbqam"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("liys"), - new AggregateRoute().withPrefix("pkcvmwf"), new AggregateRoute().withPrefix("uxx")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("ywbo") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("qmiciijqp") - .withExportIpv6RoutePolicyId("fbojxjmcsmyqwix"))); + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("mqozzkivy"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("liizjixlqfhef")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("solronqqlm") + .withExportIpv6RoutePolicyId("lqxsjxtelex"))) + .withNetworkFabricId("vuqbozoo") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("carkuzlb") + .withExportIpv6RoutePolicyId("ndtsnxawqytll"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withRoutePrefixLimit(new RoutePrefixLimitProperties().withHardLimit(2024803970).withThreshold(1940153691)); model = BinaryData.fromObject(model).toObject(L3IsolationDomainProperties.class); - Assertions.assertEquals("pwnkwywzwo", model.annotation()); - Assertions.assertEquals("jb", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("fwwvuatbwbqam", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("liys", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ywbo", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("qmiciijqp", + Assertions.assertEquals("mnhjevdyzn", model.annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); + Assertions.assertEquals("mqozzkivy", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("liizjixlqfhef", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("solronqqlm", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("fbojxjmcsmyqwix", + Assertions.assertEquals("lqxsjxtelex", model.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("vuqbozoo", model.networkFabricId()); + Assertions.assertEquals("carkuzlb", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ndtsnxawqytll", + model.staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(2024803970, model.routePrefixLimit().hardLimit()); + Assertions.assertEquals(1940153691, model.routePrefixLimit().threshold()); } } 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 index e23c1e16e618..c0f1bd36932f 100644 --- 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 @@ -1,22 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; 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.L3IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -30,49 +34,61 @@ public final class L3IsolationDomainsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"qr\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"lcrqaxlmbr\"}],\"ipv6Routes\":[{\"prefix\":\"golmlplg\"},{\"prefix\":\"layyxhxjvoys\"},{\"prefix\":\"aqqjh\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"faob\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"csbozvcdqw\",\"exportIpv6RoutePolicyId\":\"ydvwr\"}},\"annotation\":\"ivywotjnjuvtzijr\"},\"location\":\"xbaeyocpkvlt\",\"tags\":{\"oztnhvd\":\"zfmnpbdrcibjxnn\"},\"id\":\"u\",\"name\":\"amqobqehs\",\"type\":\"sht\"}"; + = "{\"properties\":{\"annotation\":\"vsobamtarirdzdgv\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"gougxpypbmz\"}],\"ipv6Routes\":[{\"prefix\":\"blmn\"},{\"prefix\":\"rxkulytivviyq\"},{\"prefix\":\"nbxxyfozbgody\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"kfrxvlusedpn\",\"exportIpv6RoutePolicyId\":\"imqaxtmvmycvjpa\"}},\"networkFabricId\":\"jdqvvyjehyvn\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"oqmrdvhbgtuh\",\"exportIpv6RoutePolicyId\":\"xunwenbphyl\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"zr\",\"xdusebkc\",\"etxpun\",\"erma\"]},\"routePrefixLimit\":{\"hardLimit\":476596997,\"threshold\":1492734446},\"lastOperation\":{\"details\":\"ftubqwxvs\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"location\":\"grwjbsyc\",\"tags\":{\"sitsxhvs\":\"o\",\"qi\":\"zp\",\"ttampqep\":\"yxjkctyq\",\"ub\":\"ft\"},\"id\":\"l\",\"name\":\"oepeqlhbtysy\",\"type\":\"zeq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - L3IsolationDomain response - = manager.l3IsolationDomains() - .define("paptgvnaqyjuk") - .withRegion("ktthbmrrmtrx") - .withExistingResourceGroup("itn") - .withNetworkFabricId("ajnnewltonop") - .withTags(mapOf("zwawpewajc", "pdvr", "guzprpxhhboigzxk", "sdjuzmuijtickzo", "va", "pqlrzhtocjzfppex")) + L3IsolationDomain response = manager.l3IsolationDomains() + .define("bxhyfw") + .withRegion("tkfjacktav") + .withExistingResourceGroup("dlb") + .withProperties(new L3IsolationDomainProperties().withAnnotation("qktuzrltpecsd") .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("hzbfcdikqn"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("gzfo"), - new AggregateRoute().withPrefix("qz"), new AggregateRoute().withPrefix("uspaywvs"), - new AggregateRoute().withPrefix("qeron")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("fkxfmuwdbv") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("avouymkd") - .withExportIpv6RoutePolicyId("qxlv"))) - .withAnnotation("fdkaxgbiwpgop") - .create(); + .withAggregateRouteConfiguration(new AggregateRouteConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("tqjntvhnjpbh"), + new AggregateRoute().withPrefix("lugcupcyf"), new AggregateRoute().withPrefix("hooyvmvux"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("afdxsuwlynxzh")))) + .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("dxbhjquxk") + .withExportIpv6RoutePolicyId("qomzdf"))) + .withNetworkFabricId("upqveidzwnkbjqpz") + .withStaticRouteRoutePolicy(new StaticRouteRoutePolicy() + .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("hquxsochtux") + .withExportIpv6RoutePolicyId("e"))) + .withUniqueRdConfiguration(new L3UniqueRouteDistinguisherProperties()) + .withRoutePrefixLimit( + new RoutePrefixLimitProperties().withHardLimit(279709128).withThreshold(165793789))) + .withTags(mapOf("secedsoqwexi", "godjfyplavb", "ikf", "bnzot", "etqj", "jqdfadgywyla", "gylyzolrvwsgseqj", + "ohystdgjtpbtkogf")) + .create(); - Assertions.assertEquals("xbaeyocpkvlt", response.location()); - Assertions.assertEquals("zfmnpbdrcibjxnn", response.tags().get("oztnhvd")); - Assertions.assertEquals("qr", response.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.redistributeStaticRoutes()); - Assertions.assertEquals("lcrqaxlmbr", response.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("golmlplg", response.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("faob", response.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("csbozvcdqw", - response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("ydvwr", - response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("ivywotjnjuvtzijr", response.annotation()); + Assertions.assertEquals("grwjbsyc", response.location()); + Assertions.assertEquals("o", response.tags().get("sitsxhvs")); + Assertions.assertEquals("vsobamtarirdzdgv", response.properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, + response.properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.properties().redistributeStaticRoutes()); + Assertions.assertEquals("gougxpypbmz", + response.properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("blmn", + response.properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("kfrxvlusedpn", + response.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("imqaxtmvmycvjpa", + response.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("jdqvvyjehyvn", response.properties().networkFabricId()); + Assertions.assertEquals("oqmrdvhbgtuh", + response.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("xunwenbphyl", + response.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(476596997, response.properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(1492734446, response.properties().routePrefixLimit().threshold()); } // Use "Map.of" if available 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 index cb0e69cf6b3f..d6a80cacf82b 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; @@ -23,31 +23,38 @@ public final class L3IsolationDomainsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"t\",\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"tnlrlcmwbejyw\"}],\"ipv6Routes\":[{\"prefix\":\"nhw\"},{\"prefix\":\"krmqevrhhafqf\"},{\"prefix\":\"dfyziruqvgnjxi\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"yjmzbmxgikyl\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gmbrdcvolo\",\"exportIpv6RoutePolicyId\":\"vqcbnryh\"}},\"annotation\":\"glvnbenkpsvokky\"},\"location\":\"kxvcptfgfbhnkxas\",\"tags\":{\"a\":\"fe\",\"rdxpcpautfzptr\":\"h\",\"dxcyuwen\":\"dzytrtffvp\"},\"id\":\"qvp\",\"name\":\"awvoqatdjkal\",\"type\":\"pmecsmxfzynf\"}"; + = "{\"properties\":{\"annotation\":\"kosjwr\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"gk\"},{\"prefix\":\"d\"},{\"prefix\":\"imioixviobuwbnge\"}],\"ipv6Routes\":[{\"prefix\":\"dqngqamhb\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"qxn\",\"exportIpv6RoutePolicyId\":\"qzaffzqodokst\"}},\"networkFabricId\":\"vomdqxnoyzqipapi\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"d\",\"exportIpv6RoutePolicyId\":\"ghunqn\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"ocbzvvxdvphxmw\"]},\"routePrefixLimit\":{\"hardLimit\":1115124943,\"threshold\":636152376},\"lastOperation\":{\"details\":\"icbogsfo\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Disabled\"},\"location\":\"gunrukcyyaa\",\"tags\":{\"zkifqbxmnnid\":\"ubzqazdlrkvi\",\"ttqhpvaru\":\"tmpumzuhoo\"},\"id\":\"vuwjyul\",\"name\":\"fpqqllavzlhjgm\",\"type\":\"odbl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); L3IsolationDomain response = manager.l3IsolationDomains() - .getByResourceGroupWithResponse("hn", "z", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("gvraxhntoiw", "szk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kxvcptfgfbhnkxas", response.location()); - Assertions.assertEquals("fe", response.tags().get("a")); - Assertions.assertEquals("t", response.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.redistributeStaticRoutes()); - Assertions.assertEquals("tnlrlcmwbejyw", response.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("nhw", response.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("yjmzbmxgikyl", response.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("gmbrdcvolo", - response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("vqcbnryh", - response.connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("glvnbenkpsvokky", response.annotation()); + Assertions.assertEquals("gunrukcyyaa", response.location()); + Assertions.assertEquals("ubzqazdlrkvi", response.tags().get("zkifqbxmnnid")); + Assertions.assertEquals("kosjwr", response.properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, + response.properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.properties().redistributeStaticRoutes()); + Assertions.assertEquals("gk", response.properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("dqngqamhb", + response.properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("qxn", + response.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("qzaffzqodokst", + response.properties().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("vomdqxnoyzqipapi", response.properties().networkFabricId()); + Assertions.assertEquals("d", + response.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ghunqn", + response.properties().staticRouteRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals(1115124943, response.properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(636152376, response.properties().routePrefixLimit().threshold()); } } 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 index 88a7c1cf6e08..09ea801e8ff1 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; @@ -24,34 +24,59 @@ public final class L3IsolationDomainsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"yqkkpgwgss\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"dsqx\"},{\"prefix\":\"jwdzpvirzyudrqu\"},{\"prefix\":\"rxhxmlfouqpskv\"}],\"ipv6Routes\":[{\"prefix\":\"bpmr\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"jxcqcaczzvwaeztt\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"yfydqlyyslgyfyb\",\"exportIpv6RoutePolicyId\":\"vk\"}},\"annotation\":\"rzhshhkbchcazkg\"},\"location\":\"thprgfwhfzhhr\",\"tags\":{\"dcuqddldaoy\":\"rfyyqjcnibzqrs\"},\"id\":\"fztqewq\",\"name\":\"ojesxjhtyzzwqocy\",\"type\":\"oyineuaxpmezit\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"z\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"bwhxmyibxkcegct\"},{\"prefix\":\"gxk\"}],\"ipv6Routes\":[{\"prefix\":\"xb\"},{\"prefix\":\"jbeyqohviawp\"},{\"prefix\":\"fkrarer\"},{\"prefix\":\"lgbvtpxowgoww\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"asu\",\"exportIpv6RoutePolicyId\":\"egjkfiszhexumf\"}},\"networkFabricId\":\"vwesl\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"txrrsjsco\",\"exportIpv6RoutePolicyId\":\"njsoutrztog\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"nclxhwkz\",\"ggsuzkvd\",\"ntpzuiwa\",\"oabthutctcabc\"]},\"routePrefixLimit\":{\"hardLimit\":2081266644,\"threshold\":1093715142},\"lastOperation\":{\"details\":\"szfkpoidfz\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\"},\"location\":\"wgweccvufjqvfc\",\"tags\":{\"emkrhbsdgktluifi\":\"smy\"},\"id\":\"gpqc\",\"name\":\"enobqysbeespqbvv\",\"type\":\"erszsu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.l3IsolationDomains().listByResourceGroup("m", com.azure.core.util.Context.NONE); + = manager.l3IsolationDomains().listByResourceGroup("pqr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("thprgfwhfzhhr", response.iterator().next().location()); - Assertions.assertEquals("rfyyqjcnibzqrs", response.iterator().next().tags().get("dcuqddldaoy")); - Assertions.assertEquals("yqkkpgwgss", response.iterator().next().networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, - response.iterator().next().redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.iterator().next().redistributeStaticRoutes()); - Assertions.assertEquals("dsqx", - response.iterator().next().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("bpmr", - response.iterator().next().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jxcqcaczzvwaeztt", - response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("yfydqlyyslgyfyb", - response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("vk", - response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("rzhshhkbchcazkg", response.iterator().next().annotation()); + Assertions.assertEquals("wgweccvufjqvfc", response.iterator().next().location()); + Assertions.assertEquals("smy", response.iterator().next().tags().get("emkrhbsdgktluifi")); + Assertions.assertEquals("z", response.iterator().next().properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, + response.iterator().next().properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.TRUE, + response.iterator().next().properties().redistributeStaticRoutes()); + Assertions.assertEquals("bwhxmyibxkcegct", + response.iterator().next().properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xb", + response.iterator().next().properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("asu", + response.iterator() + .next() + .properties() + .connectedSubnetRoutePolicy() + .exportRoutePolicy() + .exportIpv4RoutePolicyId()); + Assertions.assertEquals("egjkfiszhexumf", + response.iterator() + .next() + .properties() + .connectedSubnetRoutePolicy() + .exportRoutePolicy() + .exportIpv6RoutePolicyId()); + Assertions.assertEquals("vwesl", response.iterator().next().properties().networkFabricId()); + Assertions.assertEquals("txrrsjsco", + response.iterator() + .next() + .properties() + .staticRouteRoutePolicy() + .exportRoutePolicy() + .exportIpv4RoutePolicyId()); + Assertions.assertEquals("njsoutrztog", + response.iterator() + .next() + .properties() + .staticRouteRoutePolicy() + .exportRoutePolicy() + .exportIpv6RoutePolicyId()); + Assertions.assertEquals(2081266644, response.iterator().next().properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(1093715142, response.iterator().next().properties().routePrefixLimit().threshold()); } } 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 index f31e4307c800..5028e57b018e 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; @@ -24,32 +24,58 @@ public final class L3IsolationDomainsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"guzlweoyxfoaf\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"hlbpjuajzq\"},{\"prefix\":\"avmitnwlyhbuj\"},{\"prefix\":\"svdtyydd\"}],\"ipv6Routes\":[{\"prefix\":\"tmabtpgn\"},{\"prefix\":\"tjtnnrjewih\"},{\"prefix\":\"igaahm\"},{\"prefix\":\"fspkdnx\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"xtert\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"rwscic\",\"exportIpv6RoutePolicyId\":\"dwienv\"}},\"annotation\":\"lzj\"},\"location\":\"kr\",\"tags\":{\"qw\":\"ghaknklt\",\"bmwrvpvdrohul\":\"pvi\",\"nirnygtixk\":\"bkabhvxjuaivx\",\"kphvdlo\":\"yob\"},\"id\":\"xzpqditudcltf\",\"name\":\"ieileemw\",\"type\":\"kehldopjsxvbbwsg\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"sautbri\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ntzunhyyqxckdlx\"}],\"ipv6Routes\":[{\"prefix\":\"s\"},{\"prefix\":\"dno\"},{\"prefix\":\"incbesfvijnubx\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"tqxewjsyute\",\"exportIpv6RoutePolicyId\":\"ghk\"}},\"networkFabricId\":\"oxdpor\",\"staticRouteRoutePolicy\":{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"bkutogecyqoytws\",\"exportIpv6RoutePolicyId\":\"vqnpwdwdmuvyak\"}},\"uniqueRdConfiguration\":{\"uniqueRds\":[\"wxnblzrmiukothy\",\"jbpn\",\"dhfrvsi\"]},\"routePrefixLimit\":{\"hardLimit\":2072820976,\"threshold\":720582642},\"lastOperation\":{\"details\":\"niaffwcgjj\"},\"configurationState\":\"Provisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"dkpnmwrfuqjdeby\",\"tags\":{\"zyvihevb\":\"cnbgibklscwdko\",\"etsn\":\"vxmtsmgk\",\"oy\":\"rceulbyzzcxsyg\"},\"id\":\"yckd\",\"name\":\"z\",\"type\":\"rxbmljrjyfjleux\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("kr", response.iterator().next().location()); - Assertions.assertEquals("ghaknklt", response.iterator().next().tags().get("qw")); - Assertions.assertEquals("guzlweoyxfoaf", response.iterator().next().networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, - response.iterator().next().redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.iterator().next().redistributeStaticRoutes()); - Assertions.assertEquals("hlbpjuajzq", - response.iterator().next().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("tmabtpgn", - response.iterator().next().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("xtert", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("rwscic", - response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("dwienv", - response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("lzj", response.iterator().next().annotation()); + Assertions.assertEquals("dkpnmwrfuqjdeby", response.iterator().next().location()); + Assertions.assertEquals("cnbgibklscwdko", response.iterator().next().tags().get("zyvihevb")); + Assertions.assertEquals("sautbri", response.iterator().next().properties().annotation()); + Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, + response.iterator().next().properties().redistributeConnectedSubnets()); + Assertions.assertEquals(RedistributeStaticRoutes.FALSE, + response.iterator().next().properties().redistributeStaticRoutes()); + Assertions.assertEquals("ntzunhyyqxckdlx", + response.iterator().next().properties().aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("s", + response.iterator().next().properties().aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("tqxewjsyute", + response.iterator() + .next() + .properties() + .connectedSubnetRoutePolicy() + .exportRoutePolicy() + .exportIpv4RoutePolicyId()); + Assertions.assertEquals("ghk", + response.iterator() + .next() + .properties() + .connectedSubnetRoutePolicy() + .exportRoutePolicy() + .exportIpv6RoutePolicyId()); + Assertions.assertEquals("oxdpor", response.iterator().next().properties().networkFabricId()); + Assertions.assertEquals("bkutogecyqoytws", + response.iterator() + .next() + .properties() + .staticRouteRoutePolicy() + .exportRoutePolicy() + .exportIpv4RoutePolicyId()); + Assertions.assertEquals("vqnpwdwdmuvyak", + response.iterator() + .next() + .properties() + .staticRouteRoutePolicy() + .exportRoutePolicy() + .exportIpv6RoutePolicyId()); + Assertions.assertEquals(2072820976, response.iterator().next().properties().routePrefixLimit().hardLimit()); + Assertions.assertEquals(720582642, response.iterator().next().properties().routePrefixLimit().threshold()); } } 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 0cac7fe5cc44..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.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.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -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.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\":\"kwqpat\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"uzqymtuowog\"},{\"prefix\":\"gitsqh\"}],\"ipv6Routes\":[{\"prefix\":\"rzcdbanf\"}]},\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"scxmxeat\",\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mwnrdj\",\"exportIpv6RoutePolicyId\":\"bqbnaomhjrmkuh\"}},\"annotation\":\"xljalfihc\"},\"location\":\"obcancdexxqcw\",\"tags\":{\"zrltixldzyyf\":\"fgvaknokzwj\"},\"id\":\"tpq\",\"name\":\"ixymmpujivyql\",\"type\":\"juvsmbmslzoyovw\"}],\"nextLink\":\"bpqvybefg\"}") - .toObject(L3IsolationDomainsListResult.class); - Assertions.assertEquals("obcancdexxqcw", model.value().get(0).location()); - Assertions.assertEquals("fgvaknokzwj", model.value().get(0).tags().get("zrltixldzyyf")); - Assertions.assertEquals("kwqpat", model.value().get(0).networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, - model.value().get(0).redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.value().get(0).redistributeStaticRoutes()); - Assertions.assertEquals("uzqymtuowog", - model.value().get(0).aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rzcdbanf", - model.value().get(0).aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("scxmxeat", model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("mwnrdj", - model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bqbnaomhjrmkuh", - model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xljalfihc", model.value().get(0).annotation()); - Assertions.assertEquals("bpqvybefg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainsListResult model = new L3IsolationDomainsListResult() - .withValue(Arrays.asList(new L3IsolationDomainInner().withLocation("obcancdexxqcw") - .withTags(mapOf("zrltixldzyyf", "fgvaknokzwj")) - .withNetworkFabricId("kwqpat") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration(new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("uzqymtuowog"), - new AggregateRoute().withPrefix("gitsqh"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("rzcdbanf")))) - .withConnectedSubnetRoutePolicy(new ConnectedSubnetRoutePolicy().withExportRoutePolicyId("scxmxeat") - .withExportRoutePolicy(new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("mwnrdj") - .withExportIpv6RoutePolicyId("bqbnaomhjrmkuh"))) - .withAnnotation("xljalfihc"))) - .withNextLink("bpqvybefg"); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainsListResult.class); - Assertions.assertEquals("obcancdexxqcw", model.value().get(0).location()); - Assertions.assertEquals("fgvaknokzwj", model.value().get(0).tags().get("zrltixldzyyf")); - Assertions.assertEquals("kwqpat", model.value().get(0).networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, - model.value().get(0).redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.value().get(0).redistributeStaticRoutes()); - Assertions.assertEquals("uzqymtuowog", - model.value().get(0).aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("rzcdbanf", - model.value().get(0).aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("scxmxeat", model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("mwnrdj", - model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("bqbnaomhjrmkuh", - model.value().get(0).connectedSubnetRoutePolicy().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xljalfihc", model.value().get(0).annotation()); - Assertions.assertEquals("bpqvybefg", model.nextLink()); - } - - // Use "Map.of" if available - @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/L3OptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionAPropertiesTests.java deleted file mode 100644 index 70e13e39b28b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionAPropertiesTests.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.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3OptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class L3OptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3OptionAProperties model = BinaryData.fromString( - "{\"mtu\":1884259051,\"vlanId\":58322521,\"fabricASN\":501242553193670995,\"peerASN\":3479899819671117833,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2074968961,\"multiplier\":1582406723},\"ingressAclId\":\"ntgxdncaqttie\",\"egressAclId\":\"i\"}") - .toObject(L3OptionAProperties.class); - Assertions.assertEquals(1884259051, model.mtu()); - Assertions.assertEquals(58322521, model.vlanId()); - Assertions.assertEquals(3479899819671117833L, model.peerAsn()); - Assertions.assertEquals(2074968961, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1582406723, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("ntgxdncaqttie", model.ingressAclId()); - Assertions.assertEquals("i", model.egressAclId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3OptionAProperties model = new L3OptionAProperties().withMtu(1884259051) - .withVlanId(58322521) - .withPeerAsn(3479899819671117833L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2074968961).withMultiplier(1582406723)) - .withIngressAclId("ntgxdncaqttie") - .withEgressAclId("i"); - model = BinaryData.fromObject(model).toObject(L3OptionAProperties.class); - Assertions.assertEquals(1884259051, model.mtu()); - Assertions.assertEquals(58322521, model.vlanId()); - Assertions.assertEquals(3479899819671117833L, model.peerAsn()); - Assertions.assertEquals(2074968961, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1582406723, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("ntgxdncaqttie", model.ingressAclId()); - Assertions.assertEquals("i", model.egressAclId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java new file mode 100644 index 000000000000..6d66328689d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPatchPropertiesTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class L3OptionBPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3OptionBPatchProperties model = BinaryData.fromString( + "{\"importRouteTargets\":[\"pgfqvmtyw\"],\"exportRouteTargets\":[\"kxp\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"w\"],\"importIpv6RouteTargets\":[\"lfxampqc\",\"zgeuqxbpiat\",\"faujegqdtad\",\"akgddhjkrukizy\"],\"exportIpv4RouteTargets\":[\"qtnqsktxqfp\",\"bqggw\",\"eiwdhdmncgbfzu\",\"cstu\"],\"exportIpv6RouteTargets\":[\"hxdfbkl\"]}}") + .toObject(L3OptionBPatchProperties.class); + Assertions.assertEquals("pgfqvmtyw", model.importRouteTargets().get(0)); + Assertions.assertEquals("kxp", model.exportRouteTargets().get(0)); + Assertions.assertEquals("w", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("lfxampqc", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("qtnqsktxqfp", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("hxdfbkl", model.routeTargets().exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + L3OptionBPatchProperties model = new L3OptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("pgfqvmtyw")) + .withExportRouteTargets(Arrays.asList("kxp")) + .withRouteTargets(new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("w")) + .withImportIpv6RouteTargets(Arrays.asList("lfxampqc", "zgeuqxbpiat", "faujegqdtad", "akgddhjkrukizy")) + .withExportIpv4RouteTargets(Arrays.asList("qtnqsktxqfp", "bqggw", "eiwdhdmncgbfzu", "cstu")) + .withExportIpv6RouteTargets(Arrays.asList("hxdfbkl"))); + model = BinaryData.fromObject(model).toObject(L3OptionBPatchProperties.class); + Assertions.assertEquals("pgfqvmtyw", model.importRouteTargets().get(0)); + Assertions.assertEquals("kxp", model.exportRouteTargets().get(0)); + Assertions.assertEquals("w", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("lfxampqc", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("qtnqsktxqfp", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("hxdfbkl", model.routeTargets().exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java index d6c3430a518b..38873d94165d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3OptionBPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,31 +14,33 @@ public final class L3OptionBPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { L3OptionBProperties model = BinaryData.fromString( - "{\"importRouteTargets\":[\"njzudr\"],\"exportRouteTargets\":[\"kgmeb\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"czzqrhmngqbedyg\",\"s\"],\"importIpv6RouteTargets\":[\"nykdi\",\"jch\",\"rmpwctofld\",\"eacdhztx\"],\"exportIpv4RouteTargets\":[\"fg\",\"rwjiyew\"],\"exportIpv6RouteTargets\":[\"srwqrxetfg\",\"wvrrmdqn\",\"ycnawthvmaxgnuy\"]}}") + "{\"importRouteTargets\":[\"ky\",\"zolgjzmicuydocc\",\"xshanzb\"],\"exportRouteTargets\":[\"dh\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"caatsdohzniucbda\",\"mbwiinjdllwktl\",\"pow\",\"vvqxua\"],\"importIpv6RouteTargets\":[\"qwulynkgfcfdru\",\"si\",\"xxtclhuulri\",\"byokvjgbzsxe\"],\"exportIpv4RouteTargets\":[\"lttfyhc\"],\"exportIpv6RouteTargets\":[\"suoardnagttp\",\"fpbpgnrholhujbfw\",\"iplkysolsyjprxs\",\"whdmcvhtbbz\"]}}") .toObject(L3OptionBProperties.class); - Assertions.assertEquals("njzudr", model.importRouteTargets().get(0)); - Assertions.assertEquals("kgmeb", model.exportRouteTargets().get(0)); - Assertions.assertEquals("czzqrhmngqbedyg", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nykdi", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("fg", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("srwqrxetfg", model.routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("ky", model.importRouteTargets().get(0)); + Assertions.assertEquals("dh", model.exportRouteTargets().get(0)); + Assertions.assertEquals("caatsdohzniucbda", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("qwulynkgfcfdru", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("lttfyhc", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("suoardnagttp", model.routeTargets().exportIpv6RouteTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - L3OptionBProperties model = new L3OptionBProperties().withImportRouteTargets(Arrays.asList("njzudr")) - .withExportRouteTargets(Arrays.asList("kgmeb")) - .withRouteTargets( - new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("czzqrhmngqbedyg", "s")) - .withImportIpv6RouteTargets(Arrays.asList("nykdi", "jch", "rmpwctofld", "eacdhztx")) - .withExportIpv4RouteTargets(Arrays.asList("fg", "rwjiyew")) - .withExportIpv6RouteTargets(Arrays.asList("srwqrxetfg", "wvrrmdqn", "ycnawthvmaxgnuy"))); + L3OptionBProperties model + = new L3OptionBProperties().withImportRouteTargets(Arrays.asList("ky", "zolgjzmicuydocc", "xshanzb")) + .withExportRouteTargets(Arrays.asList("dh")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("caatsdohzniucbda", "mbwiinjdllwktl", "pow", "vvqxua")) + .withImportIpv6RouteTargets(Arrays.asList("qwulynkgfcfdru", "si", "xxtclhuulri", "byokvjgbzsxe")) + .withExportIpv4RouteTargets(Arrays.asList("lttfyhc")) + .withExportIpv6RouteTargets( + Arrays.asList("suoardnagttp", "fpbpgnrholhujbfw", "iplkysolsyjprxs", "whdmcvhtbbz"))); model = BinaryData.fromObject(model).toObject(L3OptionBProperties.class); - Assertions.assertEquals("njzudr", model.importRouteTargets().get(0)); - Assertions.assertEquals("kgmeb", model.exportRouteTargets().get(0)); - Assertions.assertEquals("czzqrhmngqbedyg", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("nykdi", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("fg", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("srwqrxetfg", model.routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("ky", model.importRouteTargets().get(0)); + Assertions.assertEquals("dh", model.exportRouteTargets().get(0)); + Assertions.assertEquals("caatsdohzniucbda", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("qwulynkgfcfdru", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("lttfyhc", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("suoardnagttp", model.routeTargets().exportIpv6RouteTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java new file mode 100644 index 000000000000..28805adb8253 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3UniqueRouteDistinguisherPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties; + +public final class L3UniqueRouteDistinguisherPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + L3UniqueRouteDistinguisherProperties model + = BinaryData.fromString("{\"uniqueRds\":[\"hsbrcary\",\"sjjzyvoaqajuveh\",\"ptdmkrrbhmpful\"]}") + .toObject(L3UniqueRouteDistinguisherProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + L3UniqueRouteDistinguisherProperties model = new L3UniqueRouteDistinguisherProperties(); + model = BinaryData.fromObject(model).toObject(L3UniqueRouteDistinguisherProperties.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java new file mode 100644 index 000000000000..a1adedc3a6d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/LastOperationPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.LastOperationProperties; + +public final class LastOperationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LastOperationProperties model + = BinaryData.fromString("{\"details\":\"jbabwidf\"}").toObject(LastOperationProperties.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java new file mode 100644 index 000000000000..34f9bf3f3ba7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class Layer2ConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Layer2ConfigurationPatch model + = BinaryData.fromString("{\"mtu\":1334890599,\"interfaces\":[\"tqpdzfyxcnwawoxc\"]}") + .toObject(Layer2ConfigurationPatch.class); + Assertions.assertEquals(1334890599, model.mtu()); + Assertions.assertEquals("tqpdzfyxcnwawoxc", model.interfaces().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Layer2ConfigurationPatch model + = new Layer2ConfigurationPatch().withMtu(1334890599).withInterfaces(Arrays.asList("tqpdzfyxcnwawoxc")); + model = BinaryData.fromObject(model).toObject(Layer2ConfigurationPatch.class); + Assertions.assertEquals(1334890599, model.mtu()); + Assertions.assertEquals("tqpdzfyxcnwawoxc", model.interfaces().get(0)); + } +} 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 index 56386e5112ab..535fe127da00 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,19 +12,18 @@ public final class Layer2ConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Layer2Configuration model - = BinaryData.fromString("{\"mtu\":1689763711,\"interfaces\":[\"xpthceopvkvt\",\"fve\",\"obpbokhmm\"]}") - .toObject(Layer2Configuration.class); - Assertions.assertEquals(1689763711, model.mtu()); - Assertions.assertEquals("xpthceopvkvt", model.interfaces().get(0)); + Layer2Configuration model = BinaryData.fromString("{\"mtu\":472341981,\"interfaces\":[\"bgacnr\"]}") + .toObject(Layer2Configuration.class); + Assertions.assertEquals(472341981, model.mtu()); + Assertions.assertEquals("bgacnr", model.interfaces().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Layer2Configuration model = new Layer2Configuration().withMtu(1689763711) - .withInterfaces(Arrays.asList("xpthceopvkvt", "fve", "obpbokhmm")); + Layer2Configuration model + = new Layer2Configuration().withMtu(472341981).withInterfaces(Arrays.asList("bgacnr")); model = BinaryData.fromObject(model).toObject(Layer2Configuration.class); - Assertions.assertEquals(1689763711, model.mtu()); - Assertions.assertEquals("xpthceopvkvt", model.interfaces().get(0)); + Assertions.assertEquals(472341981, model.mtu()); + Assertions.assertEquals("bgacnr", model.interfaces().get(0)); } } 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 5ecd353de40d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.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.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\":\"ilm\",\"primaryIpv6Prefix\":\"dqaolfylnkk\",\"secondaryIpv4Prefix\":\"pjvlywltmfwo\",\"secondaryIpv6Prefix\":\"jw\"}") - .toObject(Layer3IpPrefixProperties.class); - Assertions.assertEquals("ilm", model.primaryIpv4Prefix()); - Assertions.assertEquals("dqaolfylnkk", model.primaryIpv6Prefix()); - Assertions.assertEquals("pjvlywltmfwo", model.secondaryIpv4Prefix()); - Assertions.assertEquals("jw", model.secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Layer3IpPrefixProperties model = new Layer3IpPrefixProperties().withPrimaryIpv4Prefix("ilm") - .withPrimaryIpv6Prefix("dqaolfylnkk") - .withSecondaryIpv4Prefix("pjvlywltmfwo") - .withSecondaryIpv6Prefix("jw"); - model = BinaryData.fromObject(model).toObject(Layer3IpPrefixProperties.class); - Assertions.assertEquals("ilm", model.primaryIpv4Prefix()); - Assertions.assertEquals("dqaolfylnkk", model.primaryIpv6Prefix()); - Assertions.assertEquals("pjvlywltmfwo", model.secondaryIpv4Prefix()); - Assertions.assertEquals("jw", model.secondaryIpv6Prefix()); - } -} 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 index 2664f06ac453..7a592b6d7317 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class ManagedResourceGroupConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedResourceGroupConfiguration model - = BinaryData.fromString("{\"name\":\"laxp\",\"location\":\"jwdabalfd\"}") + = BinaryData.fromString("{\"name\":\"kasmcolmugpyva\",\"location\":\"dkluwzxeygzvt\"}") .toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("laxp", model.name()); - Assertions.assertEquals("jwdabalfd", model.location()); + Assertions.assertEquals("kasmcolmugpyva", model.name()); + Assertions.assertEquals("dkluwzxeygzvt", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedResourceGroupConfiguration model - = new ManagedResourceGroupConfiguration().withName("laxp").withLocation("jwdabalfd"); + = new ManagedResourceGroupConfiguration().withName("kasmcolmugpyva").withLocation("dkluwzxeygzvt"); model = BinaryData.fromObject(model).toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("laxp", model.name()); - Assertions.assertEquals("jwdabalfd", model.location()); + Assertions.assertEquals("kasmcolmugpyva", model.name()); + Assertions.assertEquals("dkluwzxeygzvt", model.location()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java new file mode 100644 index 000000000000..a6e80d43ca3c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityPatchTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedServiceIdentityPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedServiceIdentityPatch model = BinaryData.fromString( + "{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"gs\":{\"principalId\":\"iydvxc\",\"clientId\":\"hyhgo\"},\"spglq\":{\"principalId\":\"q\",\"clientId\":\"yjrcbqpb\"},\"jztivfwjlofzek\":{\"principalId\":\"xtdahneao\",\"clientId\":\"t\"}}}") + .toObject(ManagedServiceIdentityPatch.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedServiceIdentityPatch model + = new ManagedServiceIdentityPatch().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("gs", new UserAssignedIdentity(), "spglq", new UserAssignedIdentity(), + "jztivfwjlofzek", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(ManagedServiceIdentityPatch.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @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/ManagedServiceIdentityTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityTests.java new file mode 100644 index 000000000000..017bc40b7b78 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedServiceIdentityTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentity; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedServiceIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedServiceIdentity model = BinaryData.fromString( + "{\"principalId\":\"b\",\"tenantId\":\"ckgk\",\"type\":\"None\",\"userAssignedIdentities\":{\"zrujlqcwnyn\":{\"principalId\":\"tiiqqcqikclsmaln\",\"clientId\":\"woykdnonaaxwm\"}}}") + .toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("zrujlqcwnyn", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + } + + // Use "Map.of" if available + @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/ManagementNetworkConfigurationPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPatchablePropertiesTests.java deleted file mode 100644 index b466829c2eb4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPatchablePropertiesTests.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) 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.ManagementNetworkConfigurationPatchableProperties; -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 org.junit.jupiter.api.Assertions; - -public final class ManagementNetworkConfigurationPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagementNetworkConfigurationPatchableProperties model = BinaryData.fromString( - "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"usdvrgp\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"jdrpizfulgycts\",\"btqgkujdsoox\"],\"exportRouteTargets\":[\"oeurbtigapdyar\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"jdpdfhtwmmkfq\",\"r\",\"qulw\"],\"importIpv6RouteTargets\":[\"jmeqkvy\",\"zokpoy\",\"ohuen\"],\"exportIpv4RouteTargets\":[\"ajphmp\"],\"exportIpv6RouteTargets\":[\"nglpwsada\",\"jsumxpezcoio\",\"jrmfqzwqd\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"eedcnwmywx\",\"primaryIpv6Prefix\":\"zkvemy\",\"secondaryIpv4Prefix\":\"pczaqpqif\",\"secondaryIpv6Prefix\":\"m\",\"mtu\":947190230,\"vlanId\":2060612809,\"peerASN\":6577158463554950611,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2074245837,\"multiplier\":375594726}}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"izexroqsqj\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"splwsttxs\",\"gxfqpan\",\"ceov\",\"gzwhsxyrujmtik\"],\"exportRouteTargets\":[\"ik\",\"ohzixyqhfnkvycqq\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ipnquwzxhrptyod\",\"hkfktlt\",\"dsobjopnouhbq\"],\"importIpv6RouteTargets\":[\"qxsaluzyig\"],\"exportIpv4RouteTargets\":[\"cewbwqhdgsjsatm\",\"ncmazdf\",\"qxhyq\",\"rejparnpv\"],\"exportIpv6RouteTargets\":[\"zrbwtdrcwgz\",\"ll\",\"zlhhfix\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"c\",\"primaryIpv6Prefix\":\"zjrmhpfywvyld\",\"secondaryIpv4Prefix\":\"zfzxsoxinunjlz\",\"secondaryIpv6Prefix\":\"rocqsxy\",\"mtu\":766019445,\"vlanId\":1442676703,\"peerASN\":8406949182785574264,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":480988441,\"multiplier\":725997455}}}}") - .toObject(ManagementNetworkConfigurationPatchableProperties.class); - Assertions.assertEquals("usdvrgp", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("jdrpizfulgycts", - model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("oeurbtigapdyar", - model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("jdpdfhtwmmkfq", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jmeqkvy", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("ajphmp", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("nglpwsada", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(947190230, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(2060612809, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(6577158463554950611L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2074245837, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(375594726, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("eedcnwmywx", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkvemy", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("pczaqpqif", - model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("m", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("izexroqsqj", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("splwsttxs", - model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ik", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("ipnquwzxhrptyod", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qxsaluzyig", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("cewbwqhdgsjsatm", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("zrbwtdrcwgz", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(766019445, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1442676703, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8406949182785574264L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(480988441, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(725997455, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("c", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zjrmhpfywvyld", - model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("zfzxsoxinunjlz", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("rocqsxy", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagementNetworkConfigurationPatchableProperties model - = new ManagementNetworkConfigurationPatchableProperties() - .withInfrastructureVpnConfiguration( - new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("usdvrgp") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("jdrpizfulgycts", "btqgkujdsoox")) - .withExportRouteTargets(Arrays.asList("oeurbtigapdyar")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("jdpdfhtwmmkfq", "r", "qulw")) - .withImportIpv6RouteTargets(Arrays.asList("jmeqkvy", "zokpoy", "ohuen")) - .withExportIpv4RouteTargets(Arrays.asList("ajphmp")) - .withExportIpv6RouteTargets(Arrays.asList("nglpwsada", "jsumxpezcoio", "jrmfqzwqd")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties() - .withMtu(947190230) - .withVlanId(2060612809) - .withPeerAsn(6577158463554950611L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2074245837).withMultiplier(375594726)) - .withPrimaryIpv4Prefix("eedcnwmywx") - .withPrimaryIpv6Prefix("zkvemy") - .withSecondaryIpv4Prefix("pczaqpqif") - .withSecondaryIpv6Prefix("m"))) - .withWorkloadVpnConfiguration(new VpnConfigurationPatchableProperties() - .withNetworkToNetworkInterconnectId("izexroqsqj") - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("splwsttxs", "gxfqpan", "ceov", "gzwhsxyrujmtik")) - .withExportRouteTargets(Arrays.asList("ik", "ohzixyqhfnkvycqq")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("ipnquwzxhrptyod", "hkfktlt", "dsobjopnouhbq")) - .withImportIpv6RouteTargets(Arrays.asList("qxsaluzyig")) - .withExportIpv4RouteTargets( - Arrays.asList("cewbwqhdgsjsatm", "ncmazdf", "qxhyq", "rejparnpv")) - .withExportIpv6RouteTargets(Arrays.asList("zrbwtdrcwgz", "ll", "zlhhfix")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(766019445) - .withVlanId(1442676703) - .withPeerAsn(8406949182785574264L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(480988441).withMultiplier(725997455)) - .withPrimaryIpv4Prefix("c") - .withPrimaryIpv6Prefix("zjrmhpfywvyld") - .withSecondaryIpv4Prefix("zfzxsoxinunjlz") - .withSecondaryIpv6Prefix("rocqsxy"))); - model = BinaryData.fromObject(model).toObject(ManagementNetworkConfigurationPatchableProperties.class); - Assertions.assertEquals("usdvrgp", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("jdrpizfulgycts", - model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("oeurbtigapdyar", - model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("jdpdfhtwmmkfq", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jmeqkvy", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("ajphmp", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("nglpwsada", - model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(947190230, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(2060612809, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(6577158463554950611L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2074245837, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(375594726, - model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("eedcnwmywx", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkvemy", - model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("pczaqpqif", - model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("m", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("izexroqsqj", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("splwsttxs", - model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ik", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("ipnquwzxhrptyod", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qxsaluzyig", - model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("cewbwqhdgsjsatm", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("zrbwtdrcwgz", - model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(766019445, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1442676703, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8406949182785574264L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(480988441, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(725997455, - model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("c", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zjrmhpfywvyld", - model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("zfzxsoxinunjlz", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("rocqsxy", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java index 45ef9fb5c534..b3088e6b26a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationPropertiesTests.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.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.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,163 +19,165 @@ public final class ManagementNetworkConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagementNetworkConfigurationProperties model = BinaryData.fromString( - "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"saudoejtighsx\",\"administrativeState\":\"Disabled\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"bala\",\"ovu\",\"wxhmehjnhjiot\",\"ffbbcngkegxcypxb\"],\"exportRouteTargets\":[\"twilyrzoxp\",\"xql\",\"r\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"wnk\"],\"importIpv6RouteTargets\":[\"jew\",\"ahwkxjjm\"],\"exportIpv4RouteTargets\":[\"lmsoodtmve\",\"dhdyswcrptveaj\"],\"exportIpv6RouteTargets\":[\"vlgsrgkrfiz\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"wlp\",\"primaryIpv6Prefix\":\"uqhrlmcskykp\",\"secondaryIpv4Prefix\":\"ofix\",\"secondaryIpv6Prefix\":\"pcfykkpy\",\"mtu\":401462028,\"vlanId\":1800967897,\"peerASN\":8498572481806754395,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2048384787,\"multiplier\":1708534342}}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"fpcfjf\",\"administrativeState\":\"RMA\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"kgyepe\"],\"exportRouteTargets\":[\"nnidmdiawpzxk\",\"rntmkctdhu\",\"sgwqpsqaz\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"dvqgcnbhcbmjkz\",\"ibniynts\",\"jmfmeftvhkm\",\"ogjrhskbwgm\"],\"importIpv6RouteTargets\":[\"u\",\"cfogxhcxnwjt\"],\"exportIpv4RouteTargets\":[\"zxcouzf\",\"ofwakukzk\",\"tzxsoednlwglihe\"],\"exportIpv6RouteTargets\":[\"ucmqgisnione\",\"bzdrdpuenxkgt\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"mtrlxczn\",\"primaryIpv6Prefix\":\"zkbnbmxl\",\"secondaryIpv4Prefix\":\"wtyg\",\"secondaryIpv6Prefix\":\"zusitoqcahfs\",\"mtu\":1997837951,\"vlanId\":1957504225,\"peerASN\":547030463156659693,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1665599980,\"multiplier\":2049458072}}}}") + "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"yyzivrmitcd\",\"administrativeState\":\"UnderMaintenance\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"rktj\",\"eifibfiplhx\",\"nsmy\",\"jow\"],\"exportRouteTargets\":[\"yzmudsqcmhnx\",\"zbuw\",\"dmac\",\"bkvnrpbjrmvg\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ehmum\",\"zdllczdprwnhkgqg\"],\"importIpv6RouteTargets\":[\"sstciv\"],\"exportIpv4RouteTargets\":[\"frrynjcwmhl\",\"mgnukxrke\"],\"exportIpv6RouteTargets\":[\"equlrlz\",\"udgjtfb\",\"lakkucddwnhcz\",\"utoucgjt\"]}},\"optionAProperties\":{\"mtu\":712335954,\"vlanId\":1115271553,\"peerASN\":1361452630970477653,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":855145493,\"multiplier\":232209529},\"primaryIpv4Prefix\":\"wkslvlized\",\"primaryIpv6Prefix\":\"iabvnsrgek\",\"secondaryIpv4Prefix\":\"qx\",\"secondaryIpv6Prefix\":\"yfhbmwkh\"}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"qttbspvkhgla\",\"administrativeState\":\"UnderMaintenance\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"tujrzxrkn\",\"fdrld\",\"yehi\",\"ittugyu\"],\"exportRouteTargets\":[\"lda\",\"urf\",\"azcsozjvx\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"ggbnvtxo\",\"walzyxwhoeamoeo\"],\"importIpv6RouteTargets\":[\"eysf\",\"nimtwuuhaueg\"],\"exportIpv4RouteTargets\":[\"mnfeub\",\"zjy\",\"kwfugiphrrkuu\",\"nqd\"],\"exportIpv6RouteTargets\":[\"zzfopu\"]}},\"optionAProperties\":{\"mtu\":1734090676,\"vlanId\":1881267273,\"peerASN\":3195673404690154282,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":552741753,\"multiplier\":1873660276},\"primaryIpv4Prefix\":\"bittoztjdqumqvf\",\"primaryIpv6Prefix\":\"caddtgc\",\"secondaryIpv4Prefix\":\"egtvgwyurbel\",\"secondaryIpv6Prefix\":\"zzr\"}}}") .toObject(ManagementNetworkConfigurationProperties.class); - Assertions.assertEquals("saudoejtighsx", - model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals("yyzivrmitcd", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("bala", + Assertions.assertEquals("rktj", model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("twilyrzoxp", + Assertions.assertEquals("yzmudsqcmhnx", model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("wnk", + Assertions.assertEquals("ehmum", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jew", + Assertions.assertEquals("sstciv", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lmsoodtmve", + Assertions.assertEquals("frrynjcwmhl", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vlgsrgkrfiz", + Assertions.assertEquals("equlrlz", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(401462028, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1800967897, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8498572481806754395L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2048384787, + Assertions.assertEquals(712335954, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1115271553, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(1361452630970477653L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(855145493, model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1708534342, + Assertions.assertEquals(232209529, model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("wlp", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("uqhrlmcskykp", + Assertions.assertEquals("wkslvlized", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("iabvnsrgek", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ofix", - model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("pcfykkpy", + Assertions.assertEquals("qx", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("yfhbmwkh", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("fpcfjf", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals("qttbspvkhgla", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("kgyepe", + Assertions.assertEquals("tujrzxrkn", model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nnidmdiawpzxk", + Assertions.assertEquals("lda", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("dvqgcnbhcbmjkz", + Assertions.assertEquals("ggbnvtxo", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("u", + Assertions.assertEquals("eysf", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("zxcouzf", + Assertions.assertEquals("mnfeub", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ucmqgisnione", + Assertions.assertEquals("zzfopu", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(1997837951, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1957504225, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(547030463156659693L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(1665599980, + Assertions.assertEquals(1734090676, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1881267273, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(3195673404690154282L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(552741753, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2049458072, + Assertions.assertEquals(1873660276, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("mtrlxczn", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkbnbmxl", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("wtyg", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("zusitoqcahfs", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("bittoztjdqumqvf", + model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("caddtgc", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("egtvgwyurbel", + model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("zzr", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagementNetworkConfigurationProperties model = new ManagementNetworkConfigurationProperties() - .withInfrastructureVpnConfiguration( - new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("saudoejtighsx") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("bala", "ovu", "wxhmehjnhjiot", "ffbbcngkegxcypxb")) - .withExportRouteTargets(Arrays.asList("twilyrzoxp", "xql", "r")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("wnk")) - .withImportIpv6RouteTargets(Arrays.asList("jew", "ahwkxjjm")) - .withExportIpv4RouteTargets(Arrays.asList("lmsoodtmve", "dhdyswcrptveaj")) - .withExportIpv6RouteTargets(Arrays.asList("vlgsrgkrfiz")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(401462028) - .withVlanId(1800967897) - .withPeerAsn(8498572481806754395L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2048384787).withMultiplier(1708534342)) - .withPrimaryIpv4Prefix("wlp") - .withPrimaryIpv6Prefix("uqhrlmcskykp") - .withSecondaryIpv4Prefix("ofix") - .withSecondaryIpv6Prefix("pcfykkpy"))) - .withWorkloadVpnConfiguration(new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("fpcfjf") + .withInfrastructureVpnConfiguration(new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId("yyzivrmitcd") .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties().withImportRouteTargets(Arrays.asList("kgyepe")) - .withExportRouteTargets(Arrays.asList("nnidmdiawpzxk", "rntmkctdhu", "sgwqpsqaz")) + .withOptionBProperties(new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("rktj", "eifibfiplhx", "nsmy", "jow")) + .withExportRouteTargets(Arrays.asList("yzmudsqcmhnx", "zbuw", "dmac", "bkvnrpbjrmvg")) .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets( - Arrays.asList("dvqgcnbhcbmjkz", "ibniynts", "jmfmeftvhkm", "ogjrhskbwgm")) - .withImportIpv6RouteTargets(Arrays.asList("u", "cfogxhcxnwjt")) - .withExportIpv4RouteTargets(Arrays.asList("zxcouzf", "ofwakukzk", "tzxsoednlwglihe")) - .withExportIpv6RouteTargets(Arrays.asList("ucmqgisnione", "bzdrdpuenxkgt")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(1997837951) - .withVlanId(1957504225) - .withPeerAsn(547030463156659693L) + .withImportIpv4RouteTargets(Arrays.asList("ehmum", "zdllczdprwnhkgqg")) + .withImportIpv6RouteTargets(Arrays.asList("sstciv")) + .withExportIpv4RouteTargets(Arrays.asList("frrynjcwmhl", "mgnukxrke")) + .withExportIpv6RouteTargets(Arrays.asList("equlrlz", "udgjtfb", "lakkucddwnhcz", "utoucgjt")))) + .withOptionAProperties(new VpnOptionAProperties().withMtu(712335954) + .withVlanId(1115271553) + .withPeerASN(1361452630970477653L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1665599980).withMultiplier(2049458072)) - .withPrimaryIpv4Prefix("mtrlxczn") - .withPrimaryIpv6Prefix("zkbnbmxl") - .withSecondaryIpv4Prefix("wtyg") - .withSecondaryIpv6Prefix("zusitoqcahfs"))); + new BfdConfiguration().withIntervalInMilliSeconds(855145493).withMultiplier(232209529)) + .withPrimaryIpv4Prefix("wkslvlized") + .withPrimaryIpv6Prefix("iabvnsrgek") + .withSecondaryIpv4Prefix("qx") + .withSecondaryIpv6Prefix("yfhbmwkh"))) + .withWorkloadVpnConfiguration( + new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("qttbspvkhgla") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties(new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("tujrzxrkn", "fdrld", "yehi", "ittugyu")) + .withExportRouteTargets(Arrays.asList("lda", "urf", "azcsozjvx")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("ggbnvtxo", "walzyxwhoeamoeo")) + .withImportIpv6RouteTargets(Arrays.asList("eysf", "nimtwuuhaueg")) + .withExportIpv4RouteTargets(Arrays.asList("mnfeub", "zjy", "kwfugiphrrkuu", "nqd")) + .withExportIpv6RouteTargets(Arrays.asList("zzfopu")))) + .withOptionAProperties(new VpnOptionAProperties().withMtu(1734090676) + .withVlanId(1881267273) + .withPeerASN(3195673404690154282L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(552741753).withMultiplier(1873660276)) + .withPrimaryIpv4Prefix("bittoztjdqumqvf") + .withPrimaryIpv6Prefix("caddtgc") + .withSecondaryIpv4Prefix("egtvgwyurbel") + .withSecondaryIpv6Prefix("zzr"))); model = BinaryData.fromObject(model).toObject(ManagementNetworkConfigurationProperties.class); - Assertions.assertEquals("saudoejtighsx", - model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals("yyzivrmitcd", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions.assertEquals("bala", + Assertions.assertEquals("rktj", model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("twilyrzoxp", + Assertions.assertEquals("yzmudsqcmhnx", model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("wnk", + Assertions.assertEquals("ehmum", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("jew", + Assertions.assertEquals("sstciv", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lmsoodtmve", + Assertions.assertEquals("frrynjcwmhl", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vlgsrgkrfiz", + Assertions.assertEquals("equlrlz", model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(401462028, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1800967897, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(8498572481806754395L, - model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(2048384787, + Assertions.assertEquals(712335954, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1115271553, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(1361452630970477653L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(855145493, model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1708534342, + Assertions.assertEquals(232209529, model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("wlp", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("uqhrlmcskykp", + Assertions.assertEquals("wkslvlized", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("iabvnsrgek", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("ofix", - model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("pcfykkpy", + Assertions.assertEquals("qx", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("yfhbmwkh", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals("fpcfjf", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals("qttbspvkhgla", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); - Assertions.assertEquals("kgyepe", + Assertions.assertEquals("tujrzxrkn", model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("nnidmdiawpzxk", + Assertions.assertEquals("lda", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("dvqgcnbhcbmjkz", + Assertions.assertEquals("ggbnvtxo", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("u", + Assertions.assertEquals("eysf", model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("zxcouzf", + Assertions.assertEquals("mnfeub", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ucmqgisnione", + Assertions.assertEquals("zzfopu", model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(1997837951, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1957504225, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(547030463156659693L, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(1665599980, + Assertions.assertEquals(1734090676, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1881267273, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(3195673404690154282L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(552741753, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2049458072, + Assertions.assertEquals(1873660276, model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("mtrlxczn", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("zkbnbmxl", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("wtyg", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("zusitoqcahfs", - model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("bittoztjdqumqvf", + model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("caddtgc", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("egtvgwyurbel", + model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("zzr", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java new file mode 100644 index 000000000000..3a22583d4898 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkPatchConfigurationTests.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ManagementNetworkPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagementNetworkPatchConfiguration model = BinaryData.fromString( + "{\"infrastructureVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"fuwori\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"de\",\"kkmvhzfovanyrva\"],\"exportRouteTargets\":[\"gelg\",\"ewikfyaqandmym\",\"qoq\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"vsfbp\",\"vzopaxmfmvsm\"],\"importIpv6RouteTargets\":[\"xfaxdtnq\",\"fbsatroi\"],\"exportIpv4RouteTargets\":[\"sugmocpcjyc\",\"oelrgttwfl\",\"siuorinikcedpk\",\"riwmmtmqrxrzqv\"],\"exportIpv6RouteTargets\":[\"zyayubtgmbxi\",\"ahr\",\"gpx\",\"ibplnupoyryefqm\"]}},\"optionAProperties\":{\"mtu\":1629219218,\"vlanId\":26783847,\"peerASN\":7002520202698343959,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1384150954,\"multiplier\":880047238},\"primaryIpv4Prefix\":\"egvyieztkutnj\",\"primaryIpv6Prefix\":\"l\",\"secondaryIpv4Prefix\":\"krehyhtmj\",\"secondaryIpv6Prefix\":\"uif\"}},\"workloadVpnConfiguration\":{\"networkToNetworkInterconnectId\":\"xfaryrvj\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"jqwahoyi\",\"axqvjweiwtczkddn\"],\"exportRouteTargets\":[\"bo\",\"qbmdqrxyglaets\",\"flwtjdt\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"fooy\"],\"importIpv6RouteTargets\":[\"xdtzcqipsdudgco\",\"zomehxlantolam\"],\"exportIpv4RouteTargets\":[\"juxkqll\"],\"exportIpv6RouteTargets\":[\"pvwdtgckzdqiq\"]}},\"optionAProperties\":{\"mtu\":845103387,\"vlanId\":1158962310,\"peerASN\":2124204054391715509,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":546992649,\"multiplier\":130456908},\"primaryIpv4Prefix\":\"kznhrfgslglhpr\",\"primaryIpv6Prefix\":\"f\",\"secondaryIpv4Prefix\":\"huioaeoc\",\"secondaryIpv6Prefix\":\"jtfeyvkbdgddkr\"}}}") + .toObject(ManagementNetworkPatchConfiguration.class); + Assertions.assertEquals("fuwori", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.infrastructureVpnConfiguration().peeringOption()); + Assertions.assertEquals("de", + model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("gelg", + model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("vsfbp", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xfaxdtnq", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("sugmocpcjyc", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("zyayubtgmbxi", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(1629219218, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(26783847, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(7002520202698343959L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(1384150954, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(880047238, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("egvyieztkutnj", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("l", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("krehyhtmj", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("uif", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("xfaryrvj", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); + Assertions.assertEquals("jqwahoyi", + model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("bo", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("fooy", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xdtzcqipsdudgco", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("juxkqll", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("pvwdtgckzdqiq", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(845103387, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1158962310, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(2124204054391715509L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(546992649, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(130456908, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("kznhrfgslglhpr", + model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("f", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("huioaeoc", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("jtfeyvkbdgddkr", + model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagementNetworkPatchConfiguration model + = new ManagementNetworkPatchConfiguration() + .withInfrastructureVpnConfiguration( + new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("fuwori") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new VpnOptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("de", "kkmvhzfovanyrva")) + .withExportRouteTargets(Arrays.asList("gelg", "ewikfyaqandmym", "qoq")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("vsfbp", "vzopaxmfmvsm")) + .withImportIpv6RouteTargets(Arrays.asList("xfaxdtnq", "fbsatroi")) + .withExportIpv4RouteTargets( + Arrays.asList("sugmocpcjyc", "oelrgttwfl", "siuorinikcedpk", "riwmmtmqrxrzqv")) + .withExportIpv6RouteTargets( + Arrays.asList("zyayubtgmbxi", "ahr", "gpx", "ibplnupoyryefqm")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(1629219218) + .withVlanId(26783847) + .withPeerASN(7002520202698343959L) + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(1384150954) + .withMultiplier(880047238)) + .withPrimaryIpv4Prefix("egvyieztkutnj") + .withPrimaryIpv6Prefix("l") + .withSecondaryIpv4Prefix("krehyhtmj") + .withSecondaryIpv6Prefix("uif"))) + .withWorkloadVpnConfiguration( + new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("xfaryrvj") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new VpnOptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("jqwahoyi", "axqvjweiwtczkddn")) + .withExportRouteTargets(Arrays.asList("bo", "qbmdqrxyglaets", "flwtjdt")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("fooy")) + .withImportIpv6RouteTargets(Arrays.asList("xdtzcqipsdudgco", "zomehxlantolam")) + .withExportIpv4RouteTargets(Arrays.asList("juxkqll")) + .withExportIpv6RouteTargets(Arrays.asList("pvwdtgckzdqiq")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(845103387) + .withVlanId(1158962310) + .withPeerASN(2124204054391715509L) + .withBfdConfiguration(new BfdPatchConfiguration().withIntervalInMilliSeconds(546992649) + .withMultiplier(130456908)) + .withPrimaryIpv4Prefix("kznhrfgslglhpr") + .withPrimaryIpv6Prefix("f") + .withSecondaryIpv4Prefix("huioaeoc") + .withSecondaryIpv6Prefix("jtfeyvkbdgddkr"))); + model = BinaryData.fromObject(model).toObject(ManagementNetworkPatchConfiguration.class); + Assertions.assertEquals("fuwori", model.infrastructureVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.infrastructureVpnConfiguration().peeringOption()); + Assertions.assertEquals("de", + model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("gelg", + model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("vsfbp", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xfaxdtnq", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("sugmocpcjyc", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("zyayubtgmbxi", + model.infrastructureVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(1629219218, model.infrastructureVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(26783847, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(7002520202698343959L, + model.infrastructureVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(1384150954, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(880047238, + model.infrastructureVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("egvyieztkutnj", + model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("l", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("krehyhtmj", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("uif", + model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("xfaryrvj", model.workloadVpnConfiguration().networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); + Assertions.assertEquals("jqwahoyi", + model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("bo", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("fooy", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xdtzcqipsdudgco", + model.workloadVpnConfiguration().optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("juxkqll", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("pvwdtgckzdqiq", + model.workloadVpnConfiguration().optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(845103387, model.workloadVpnConfiguration().optionAProperties().mtu()); + Assertions.assertEquals(1158962310, model.workloadVpnConfiguration().optionAProperties().vlanId()); + Assertions.assertEquals(2124204054391715509L, model.workloadVpnConfiguration().optionAProperties().peerASN()); + Assertions.assertEquals(546992649, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(130456908, + model.workloadVpnConfiguration().optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("kznhrfgslglhpr", + model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("f", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("huioaeoc", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("jtfeyvkbdgddkr", + model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..b6361561d3c8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv4PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv4PrefixLimitPatchProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":831858134,\"threshold\":1686675649,\"idleTimeExpiry\":1186853311},{\"maximumRoutes\":284018014,\"threshold\":385113507,\"idleTimeExpiry\":1081503217},{\"maximumRoutes\":1215453514,\"threshold\":1157447952,\"idleTimeExpiry\":1669178035}]}") + .toObject(NativeIpv4PrefixLimitPatchProperties.class); + Assertions.assertEquals(831858134, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1686675649, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1186853311, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv4PrefixLimitPatchProperties model + = new NativeIpv4PrefixLimitPatchProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitPatchProperties().withMaximumRoutes(831858134) + .withThreshold(1686675649) + .withIdleTimeExpiry(1186853311), + new PrefixLimitPatchProperties().withMaximumRoutes(284018014) + .withThreshold(385113507) + .withIdleTimeExpiry(1081503217), + new PrefixLimitPatchProperties().withMaximumRoutes(1215453514) + .withThreshold(1157447952) + .withIdleTimeExpiry(1669178035))); + model = BinaryData.fromObject(model).toObject(NativeIpv4PrefixLimitPatchProperties.class); + Assertions.assertEquals(831858134, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1686675649, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1186853311, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..e2425a182850 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv4PrefixLimitPropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv4PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv4PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv4PrefixLimitProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":2018901701,\"threshold\":1327858771,\"idleTimeExpiry\":1965981933},{\"maximumRoutes\":1712208701,\"threshold\":1929728945,\"idleTimeExpiry\":1821325313},{\"maximumRoutes\":1851794786,\"threshold\":1449501031,\"idleTimeExpiry\":885862938}]}") + .toObject(NativeIpv4PrefixLimitProperties.class); + Assertions.assertEquals(2018901701, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1327858771, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1965981933, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv4PrefixLimitProperties model = new NativeIpv4PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(2018901701) + .withThreshold(1327858771) + .withIdleTimeExpiry(1965981933), + new PrefixLimitProperties().withMaximumRoutes(1712208701) + .withThreshold(1929728945) + .withIdleTimeExpiry(1821325313), + new PrefixLimitProperties().withMaximumRoutes(1851794786) + .withThreshold(1449501031) + .withIdleTimeExpiry(885862938))); + model = BinaryData.fromObject(model).toObject(NativeIpv4PrefixLimitProperties.class); + Assertions.assertEquals(2018901701, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1327858771, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1965981933, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..059ac18d63e1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv6PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv6PrefixLimitPatchProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":666562769,\"threshold\":1979690272,\"idleTimeExpiry\":1859868759}]}") + .toObject(NativeIpv6PrefixLimitPatchProperties.class); + Assertions.assertEquals(666562769, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1979690272, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1859868759, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv6PrefixLimitPatchProperties model = new NativeIpv6PrefixLimitPatchProperties() + .withPrefixLimits(Arrays.asList(new PrefixLimitPatchProperties().withMaximumRoutes(666562769) + .withThreshold(1979690272) + .withIdleTimeExpiry(1859868759))); + model = BinaryData.fromObject(model).toObject(NativeIpv6PrefixLimitPatchProperties.class); + Assertions.assertEquals(666562769, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1979690272, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(1859868759, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..197ef0d80fcf --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NativeIpv6PrefixLimitPropertiesTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NativeIpv6PrefixLimitProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NativeIpv6PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NativeIpv6PrefixLimitProperties model = BinaryData.fromString( + "{\"prefixLimits\":[{\"maximumRoutes\":977143635,\"threshold\":815843697,\"idleTimeExpiry\":2114672543},{\"maximumRoutes\":1400364397,\"threshold\":1592088200,\"idleTimeExpiry\":1326617013},{\"maximumRoutes\":193764352,\"threshold\":1701063526,\"idleTimeExpiry\":1908224692}]}") + .toObject(NativeIpv6PrefixLimitProperties.class); + Assertions.assertEquals(977143635, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(815843697, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(2114672543, model.prefixLimits().get(0).idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NativeIpv6PrefixLimitProperties model = new NativeIpv6PrefixLimitProperties().withPrefixLimits(Arrays.asList( + new PrefixLimitProperties().withMaximumRoutes(977143635) + .withThreshold(815843697) + .withIdleTimeExpiry(2114672543), + new PrefixLimitProperties().withMaximumRoutes(1400364397) + .withThreshold(1592088200) + .withIdleTimeExpiry(1326617013), + new PrefixLimitProperties().withMaximumRoutes(193764352) + .withThreshold(1701063526) + .withIdleTimeExpiry(1908224692))); + model = BinaryData.fromObject(model).toObject(NativeIpv6PrefixLimitProperties.class); + Assertions.assertEquals(977143635, model.prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(815843697, model.prefixLimits().get(0).threshold()); + Assertions.assertEquals(2114672543, model.prefixLimits().get(0).idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java new file mode 100644 index 000000000000..f38ec3c36292 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBfdAdministrativeStatusTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus; +import org.junit.jupiter.api.Assertions; + +public final class NeighborAddressBfdAdministrativeStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborAddressBfdAdministrativeStatus model = BinaryData + .fromString( + "{\"neighborAddress\":\"epiaeapfsergd\",\"administrativeState\":\"Enabled\",\"error\":\"nacyheqwb\"}") + .toObject(NeighborAddressBfdAdministrativeStatus.class); + Assertions.assertEquals("epiaeapfsergd", model.neighborAddress()); + Assertions.assertEquals(BfdAdministrativeState.ENABLED, model.administrativeState()); + Assertions.assertEquals("nacyheqwb", model.error()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java new file mode 100644 index 000000000000..15c7224f3af0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressBgpAdministrativeStatusTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BgpAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus; +import org.junit.jupiter.api.Assertions; + +public final class NeighborAddressBgpAdministrativeStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborAddressBgpAdministrativeStatus model = BinaryData + .fromString( + "{\"neighborAddress\":\"uoxsot\",\"administrativeState\":\"Disabled\",\"error\":\"mseobfsxstcyilbv\"}") + .toObject(NeighborAddressBgpAdministrativeStatus.class); + Assertions.assertEquals("uoxsot", model.neighborAddress()); + Assertions.assertEquals(BgpAdministrativeState.DISABLED, model.administrativeState()); + Assertions.assertEquals("mseobfsxstcyilbv", model.error()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java new file mode 100644 index 000000000000..5284319ab7ab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressPatchTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddressPatch; +import org.junit.jupiter.api.Assertions; + +public final class NeighborAddressPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborAddressPatch model = BinaryData.fromString( + "{\"address\":\"xkvvcs\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Disabled\",\"configurationState\":\"PendingCommit\"}") + .toObject(NeighborAddressPatch.class); + Assertions.assertEquals("xkvvcs", model.address()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NeighborAddressPatch model = new NeighborAddressPatch().withAddress("xkvvcs"); + model = BinaryData.fromObject(model).toObject(NeighborAddressPatch.class); + Assertions.assertEquals("xkvvcs", model.address()); + } +} 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 index e801d1bd0216..6514e192d455 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,16 +11,16 @@ public final class NeighborAddressTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NeighborAddress model - = BinaryData.fromString("{\"address\":\"zhzzwvywrg\",\"configurationState\":\"PendingCommit\"}") - .toObject(NeighborAddress.class); - Assertions.assertEquals("zhzzwvywrg", model.address()); + NeighborAddress model = BinaryData.fromString( + "{\"address\":\"geafgfosehxlzsxe\",\"bfdAdministrativeState\":\"Enabled\",\"bgpAdministrativeState\":\"Enabled\",\"configurationState\":\"Provisioned\"}") + .toObject(NeighborAddress.class); + Assertions.assertEquals("geafgfosehxlzsxe", model.address()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborAddress model = new NeighborAddress().withAddress("zhzzwvywrg"); + NeighborAddress model = new NeighborAddress().withAddress("geafgfosehxlzsxe"); model = BinaryData.fromObject(model).toObject(NeighborAddress.class); - Assertions.assertEquals("zhzzwvywrg", model.address()); + Assertions.assertEquals("geafgfosehxlzsxe", model.address()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java new file mode 100644 index 000000000000..148e19be384b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NeighborGroupDestinationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborGroupDestinationPatch model = BinaryData.fromString( + "{\"ipv4Addresses\":[\"vhxqqmqipaydhfnz\",\"c\",\"mtfshksnyzmspa\"],\"ipv6Addresses\":[\"wmbnlslc\",\"fi\",\"d\"]}") + .toObject(NeighborGroupDestinationPatch.class); + Assertions.assertEquals("vhxqqmqipaydhfnz", model.ipv4Addresses().get(0)); + Assertions.assertEquals("wmbnlslc", model.ipv6Addresses().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NeighborGroupDestinationPatch model = new NeighborGroupDestinationPatch() + .withIpv4Addresses(Arrays.asList("vhxqqmqipaydhfnz", "c", "mtfshksnyzmspa")) + .withIpv6Addresses(Arrays.asList("wmbnlslc", "fi", "d")); + model = BinaryData.fromObject(model).toObject(NeighborGroupDestinationPatch.class); + Assertions.assertEquals("vhxqqmqipaydhfnz", model.ipv4Addresses().get(0)); + Assertions.assertEquals("wmbnlslc", model.ipv6Addresses().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java index bf707302f39a..a4d6b2b6aab0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupDestinationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,20 +12,19 @@ public final class NeighborGroupDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NeighborGroupDestination model = BinaryData.fromString( - "{\"ipv4Addresses\":[\"axxijvskwsdgkjgy\",\"cwrase\",\"wefcvoinw\",\"qartwy\"],\"ipv6Addresses\":[\"cladvatdavuqmcb\"]}") - .toObject(NeighborGroupDestination.class); - Assertions.assertEquals("axxijvskwsdgkjgy", model.ipv4Addresses().get(0)); - Assertions.assertEquals("cladvatdavuqmcb", model.ipv6Addresses().get(0)); + NeighborGroupDestination model + = BinaryData.fromString("{\"ipv4Addresses\":[\"ihezomucmq\"],\"ipv6Addresses\":[\"nione\"]}") + .toObject(NeighborGroupDestination.class); + Assertions.assertEquals("ihezomucmq", model.ipv4Addresses().get(0)); + Assertions.assertEquals("nione", model.ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupDestination model = new NeighborGroupDestination() - .withIpv4Addresses(Arrays.asList("axxijvskwsdgkjgy", "cwrase", "wefcvoinw", "qartwy")) - .withIpv6Addresses(Arrays.asList("cladvatdavuqmcb")); + NeighborGroupDestination model = new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("ihezomucmq")) + .withIpv6Addresses(Arrays.asList("nione")); model = BinaryData.fromObject(model).toObject(NeighborGroupDestination.class); - Assertions.assertEquals("axxijvskwsdgkjgy", model.ipv4Addresses().get(0)); - Assertions.assertEquals("cladvatdavuqmcb", model.ipv6Addresses().get(0)); + Assertions.assertEquals("ihezomucmq", model.ipv4Addresses().get(0)); + Assertions.assertEquals("nione", model.ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java index c5be3392a892..317e8c58b2a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -16,30 +17,29 @@ public final class NeighborGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupInner model = BinaryData.fromString( - "{\"properties\":{\"networkTapIds\":[\"kiiwvmtu\"],\"networkTapRuleIds\":[\"ymdjfua\",\"roqvqpilrgu\",\"canlduwzorxs\"],\"provisioningState\":\"Failed\",\"destination\":{\"ipv4Addresses\":[\"lxymxkqvfqe\",\"dxcltuubwyvpj\",\"owcpjqduqgixexky\",\"fbwljavhuerkjdd\"],\"ipv6Addresses\":[\"liegftcvbi\",\"ftksd\",\"gdnk\",\"fgmwd\"]},\"annotation\":\"eb\"},\"location\":\"czldbglzoutbaaqg\",\"tags\":{\"nzjotvmr\":\"ajclyzgsnorbjg\",\"ayfluiyuosnu\":\"khlobvvjbhvhdi\",\"hbuubpy\":\"dtelvhyibdrqrs\"},\"id\":\"owtjo\",\"name\":\"ztfwfqchvcz\",\"type\":\"vjnn\"}") + "{\"properties\":{\"annotation\":\"tighsxjpy\",\"destination\":{\"ipv4Addresses\":[\"qbalahovuuwxhme\",\"jnhj\"],\"ipv6Addresses\":[\"iffbbcn\"]},\"networkTapIds\":[\"gxcypx\",\"bfetwily\"],\"networkTapRuleIds\":[\"xpdxqlfrolqow\",\"kiu\"],\"lastOperation\":{\"details\":\"wnah\"},\"provisioningState\":\"Failed\"},\"location\":\"jmztnlmso\",\"tags\":{\"tveajc\":\"mvecdhdyswcr\",\"srg\":\"xvl\",\"ywlptyuqh\":\"rfizr\",\"fuofixcnpcfykkp\":\"lmcskyk\"},\"id\":\"ycpawm\",\"name\":\"jp\",\"type\":\"dpwrp\"}") .toObject(NeighborGroupInner.class); - Assertions.assertEquals("czldbglzoutbaaqg", model.location()); - Assertions.assertEquals("ajclyzgsnorbjg", model.tags().get("nzjotvmr")); - Assertions.assertEquals("lxymxkqvfqe", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("liegftcvbi", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("eb", model.annotation()); + Assertions.assertEquals("jmztnlmso", model.location()); + Assertions.assertEquals("mvecdhdyswcr", model.tags().get("tveajc")); + Assertions.assertEquals("tighsxjpy", model.properties().annotation()); + Assertions.assertEquals("qbalahovuuwxhme", model.properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("iffbbcn", model.properties().destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupInner model = new NeighborGroupInner().withLocation("czldbglzoutbaaqg") - .withTags( - mapOf("nzjotvmr", "ajclyzgsnorbjg", "ayfluiyuosnu", "khlobvvjbhvhdi", "hbuubpy", "dtelvhyibdrqrs")) - .withDestination(new NeighborGroupDestination() - .withIpv4Addresses(Arrays.asList("lxymxkqvfqe", "dxcltuubwyvpj", "owcpjqduqgixexky", "fbwljavhuerkjdd")) - .withIpv6Addresses(Arrays.asList("liegftcvbi", "ftksd", "gdnk", "fgmwd"))) - .withAnnotation("eb"); + NeighborGroupInner model = new NeighborGroupInner().withLocation("jmztnlmso") + .withTags(mapOf("tveajc", "mvecdhdyswcr", "srg", "xvl", "ywlptyuqh", "rfizr", "fuofixcnpcfykkp", "lmcskyk")) + .withProperties(new NeighborGroupProperties().withAnnotation("tighsxjpy") + .withDestination( + new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("qbalahovuuwxhme", "jnhj")) + .withIpv6Addresses(Arrays.asList("iffbbcn")))); model = BinaryData.fromObject(model).toObject(NeighborGroupInner.class); - Assertions.assertEquals("czldbglzoutbaaqg", model.location()); - Assertions.assertEquals("ajclyzgsnorbjg", model.tags().get("nzjotvmr")); - Assertions.assertEquals("lxymxkqvfqe", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("liegftcvbi", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("eb", model.annotation()); + Assertions.assertEquals("jmztnlmso", model.location()); + Assertions.assertEquals("mvecdhdyswcr", model.tags().get("tveajc")); + Assertions.assertEquals("tighsxjpy", model.properties().annotation()); + Assertions.assertEquals("qbalahovuuwxhme", model.properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("iffbbcn", model.properties().destination().ipv6Addresses().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupListResultTests.java new file mode 100644 index 000000000000..ec829fb8cbb9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NeighborGroupListResult; +import org.junit.jupiter.api.Assertions; + +public final class NeighborGroupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NeighborGroupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"tkvi\",\"destination\":{\"ipv4Addresses\":[\"fliwoynguuzhwvl\",\"dpcmhjh\"],\"ipv6Addresses\":[\"ybkekym\",\"fztsi\",\"sc\"]},\"networkTapIds\":[\"yeiihfymkou\",\"h\"],\"networkTapRuleIds\":[\"euugcigzho\",\"smg\"],\"lastOperation\":{\"details\":\"tdwrqbebjnfve\"},\"provisioningState\":\"Deleting\"},\"location\":\"tvkbiwznht\",\"tags\":{\"zmuhbcak\":\"icudyhizpa\",\"itwhrjsdmmazdnck\":\"nhokh\",\"lhzqpxzbawkikcdg\":\"dbjp\"},\"id\":\"hbssdpjeyo\",\"name\":\"xdede\",\"type\":\"f\"},{\"properties\":{\"annotation\":\"hagxsure\",\"destination\":{\"ipv4Addresses\":[\"shzz\",\"g\",\"ll\",\"xiqqzjkoxdupna\"],\"ipv6Addresses\":[\"rouigdmfivjqte\",\"dqqigdydkghpc\",\"rwqirvtktyhhmvf\"]},\"networkTapIds\":[\"pjajodmkrrwe\"],\"networkTapRuleIds\":[\"vqokql\",\"jqgir\"],\"lastOperation\":{\"details\":\"lyvxchp\"},\"provisioningState\":\"Succeeded\"},\"location\":\"sf\",\"tags\":{\"tvzuzhasup\":\"hwwskn\",\"zqazvb\":\"lppdpgz\",\"sjqhenigbeqngu\":\"arkptgongruatsyi\"},\"id\":\"aby\",\"name\":\"deayscseydzje\",\"type\":\"exmnv\"}],\"nextLink\":\"muwrx\"}") + .toObject(NeighborGroupListResult.class); + Assertions.assertEquals("tvkbiwznht", model.value().get(0).location()); + Assertions.assertEquals("icudyhizpa", model.value().get(0).tags().get("zmuhbcak")); + Assertions.assertEquals("tkvi", model.value().get(0).properties().annotation()); + Assertions.assertEquals("fliwoynguuzhwvl", + model.value().get(0).properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("ybkekym", model.value().get(0).properties().destination().ipv6Addresses().get(0)); + Assertions.assertEquals("muwrx", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java index 2206453d1f61..3148a17e047c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchPropertiesTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -14,22 +14,22 @@ public final class NeighborGroupPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupPatchProperties model = BinaryData.fromString( - "{\"destination\":{\"ipv4Addresses\":[\"zgpmnma\",\"eddqilwgdfpfqfpc\"],\"ipv6Addresses\":[\"clg\"]},\"annotation\":\"vwerfwxbsmtb\"}") + "{\"annotation\":\"lc\",\"destination\":{\"ipv4Addresses\":[\"olntfx\",\"crqmipfjwfoygi\",\"mshxxba\",\"zabulnvgsk\"],\"ipv6Addresses\":[\"xjdzjs\"]}}") .toObject(NeighborGroupPatchProperties.class); - Assertions.assertEquals("vwerfwxbsmtb", model.annotation()); - Assertions.assertEquals("zgpmnma", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("clg", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("lc", model.annotation()); + Assertions.assertEquals("olntfx", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("xjdzjs", model.destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupPatchProperties model = new NeighborGroupPatchProperties().withAnnotation("vwerfwxbsmtb") - .withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("zgpmnma", "eddqilwgdfpfqfpc")) - .withIpv6Addresses(Arrays.asList("clg"))); + NeighborGroupPatchProperties model = new NeighborGroupPatchProperties().withAnnotation("lc") + .withDestination(new NeighborGroupDestinationPatch() + .withIpv4Addresses(Arrays.asList("olntfx", "crqmipfjwfoygi", "mshxxba", "zabulnvgsk")) + .withIpv6Addresses(Arrays.asList("xjdzjs"))); model = BinaryData.fromObject(model).toObject(NeighborGroupPatchProperties.class); - Assertions.assertEquals("vwerfwxbsmtb", model.annotation()); - Assertions.assertEquals("zgpmnma", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("clg", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("lc", model.annotation()); + Assertions.assertEquals("olntfx", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("xjdzjs", model.destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java index 4c58ecd358fd..3350049b98af 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestinationPatch; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -16,25 +17,26 @@ public final class NeighborGroupPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupPatch model = BinaryData.fromString( - "{\"properties\":{\"destination\":{\"ipv4Addresses\":[\"bjlquv\"],\"ipv6Addresses\":[\"cjumv\",\"simi\",\"yoi\",\"l\"]},\"annotation\":\"iqwnnraclibbfq\"},\"tags\":{\"hautw\":\"kladydg\"}}") + "{\"tags\":{\"puenx\":\"dr\"},\"properties\":{\"annotation\":\"lzlmtrlxcznnh\",\"destination\":{\"ipv4Addresses\":[\"bmxlxm\",\"tygeqzus\"],\"ipv6Addresses\":[\"qcahfsgbjmlree\",\"rfwss\"]}}}") .toObject(NeighborGroupPatch.class); - Assertions.assertEquals("kladydg", model.tags().get("hautw")); - Assertions.assertEquals("bjlquv", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("cjumv", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("iqwnnraclibbfq", model.annotation()); + Assertions.assertEquals("dr", model.tags().get("puenx")); + Assertions.assertEquals("lzlmtrlxcznnh", model.properties().annotation()); + Assertions.assertEquals("bmxlxm", model.properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("qcahfsgbjmlree", model.properties().destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupPatch model = new NeighborGroupPatch().withTags(mapOf("hautw", "kladydg")) - .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("bjlquv")) - .withIpv6Addresses(Arrays.asList("cjumv", "simi", "yoi", "l"))) - .withAnnotation("iqwnnraclibbfq"); + NeighborGroupPatch model = new NeighborGroupPatch().withTags(mapOf("puenx", "dr")) + .withProperties(new NeighborGroupPatchProperties().withAnnotation("lzlmtrlxcznnh") + .withDestination( + new NeighborGroupDestinationPatch().withIpv4Addresses(Arrays.asList("bmxlxm", "tygeqzus")) + .withIpv6Addresses(Arrays.asList("qcahfsgbjmlree", "rfwss")))); model = BinaryData.fromObject(model).toObject(NeighborGroupPatch.class); - Assertions.assertEquals("kladydg", model.tags().get("hautw")); - Assertions.assertEquals("bjlquv", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("cjumv", model.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("iqwnnraclibbfq", model.annotation()); + Assertions.assertEquals("dr", model.tags().get("puenx")); + Assertions.assertEquals("lzlmtrlxcznnh", model.properties().annotation()); + Assertions.assertEquals("bmxlxm", model.properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("qcahfsgbjmlree", model.properties().destination().ipv6Addresses().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.java deleted file mode 100644 index 7ca467b5e41b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPatchablePropertiesTests.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.NeighborGroupDestination; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatchableProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NeighborGroupPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NeighborGroupPatchableProperties model = BinaryData.fromString( - "{\"destination\":{\"ipv4Addresses\":[\"krie\",\"bgnixxoww\",\"kyfwnwpiwxeiicr\"],\"ipv6Addresses\":[\"pk\"]}}") - .toObject(NeighborGroupPatchableProperties.class); - Assertions.assertEquals("krie", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("pk", model.destination().ipv6Addresses().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeighborGroupPatchableProperties model = new NeighborGroupPatchableProperties().withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("krie", "bgnixxoww", "kyfwnwpiwxeiicr")) - .withIpv6Addresses(Arrays.asList("pk"))); - model = BinaryData.fromObject(model).toObject(NeighborGroupPatchableProperties.class); - Assertions.assertEquals("krie", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("pk", model.destination().ipv6Addresses().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java index 42a2a43fe8bd..ea6e41bc4306 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupPropertiesTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -14,21 +14,22 @@ public final class NeighborGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NeighborGroupProperties model = BinaryData.fromString( - "{\"networkTapIds\":[\"gfyvrtpqpe\",\"hzcgkrepdqhqyhwq\",\"e\"],\"networkTapRuleIds\":[\"qabckmzeoxin\",\"greohtwhlpuzjp\",\"eezn\"],\"provisioningState\":\"Accepted\",\"destination\":{\"ipv4Addresses\":[\"bfaxyxzlbc\"],\"ipv6Addresses\":[\"msexroqr\"]},\"annotation\":\"ktxfvonfe\"}") + "{\"annotation\":\"pcf\",\"destination\":{\"ipv4Addresses\":[\"zlgzawkgyepey\",\"mnnidmdia\",\"pzxkzrntmkct\"],\"ipv6Addresses\":[\"osgwqpsqazihqo\"]},\"networkTapIds\":[\"gcnbhcbmjk\",\"ti\",\"n\"],\"networkTapRuleIds\":[\"tsxjmfmeftvhkmoo\",\"jrhskbwgmjgrul\",\"fogxhcxnw\",\"tpfdzxcouzfwofwa\"],\"lastOperation\":{\"details\":\"zkdtzxsoed\"},\"provisioningState\":\"Canceled\"}") .toObject(NeighborGroupProperties.class); - Assertions.assertEquals("ktxfvonfe", model.annotation()); - Assertions.assertEquals("bfaxyxzlbc", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("msexroqr", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("pcf", model.annotation()); + Assertions.assertEquals("zlgzawkgyepey", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("osgwqpsqazihqo", model.destination().ipv6Addresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NeighborGroupProperties model = new NeighborGroupProperties().withAnnotation("ktxfvonfe") - .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("bfaxyxzlbc")) - .withIpv6Addresses(Arrays.asList("msexroqr"))); + NeighborGroupProperties model = new NeighborGroupProperties().withAnnotation("pcf") + .withDestination(new NeighborGroupDestination() + .withIpv4Addresses(Arrays.asList("zlgzawkgyepey", "mnnidmdia", "pzxkzrntmkct")) + .withIpv6Addresses(Arrays.asList("osgwqpsqazihqo"))); model = BinaryData.fromObject(model).toObject(NeighborGroupProperties.class); - Assertions.assertEquals("ktxfvonfe", model.annotation()); - Assertions.assertEquals("bfaxyxzlbc", model.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("msexroqr", model.destination().ipv6Addresses().get(0)); + Assertions.assertEquals("pcf", model.annotation()); + Assertions.assertEquals("zlgzawkgyepey", model.destination().ipv4Addresses().get(0)); + Assertions.assertEquals("osgwqpsqazihqo", model.destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java index 11bc9491e1d3..7b78d0326492 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -25,31 +26,30 @@ public final class NeighborGroupsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkTapIds\":[\"ygkxrlfojlclp\",\"mveybodhrv\"],\"networkTapRuleIds\":[\"u\",\"mwb\"],\"provisioningState\":\"Succeeded\",\"destination\":{\"ipv4Addresses\":[\"gpdxtsaujtco\"],\"ipv6Addresses\":[\"bolqoxuptsl\",\"ivmlkwkzli\",\"vamtyk\",\"szde\"]},\"annotation\":\"xcsq\"},\"location\":\"do\",\"tags\":{\"eohpl\":\"kdpc\",\"edaxkuyorfjidqo\":\"gcnbvmhvqp\",\"vfyihuzsbpwn\":\"aweog\",\"zgkooagrlwpame\":\"fjcypazwiimd\"},\"id\":\"itwqadewhu\",\"name\":\"xkyxiatfamrna\",\"type\":\"fllxc\"}"; + = "{\"properties\":{\"annotation\":\"bsnxmfooi\",\"destination\":{\"ipv4Addresses\":[\"rfvq\",\"cu\",\"gkmqcbrewtfuxkt\"],\"ipv6Addresses\":[\"ikcgittfm\",\"pihtepasjeb\",\"invfcdsijsinybn\",\"lx\"]},\"networkTapIds\":[\"xujzox\",\"akqtkrjucazwed\"],\"networkTapRuleIds\":[\"ulxgcemxo\",\"n\"],\"lastOperation\":{\"details\":\"q\"},\"provisioningState\":\"Succeeded\"},\"location\":\"nxgohmmg\",\"tags\":{\"fpqifs\":\"yfgz\",\"sohwn\":\"zfgxwfxjiqp\",\"hpppnksqiwl\":\"ayooghj\",\"eohoygowdzizzu\":\"egjto\"},\"id\":\"d\",\"name\":\"rcppqvovsirtas\",\"type\":\"piplpexhhjjatlep\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NeighborGroup response = manager.neighborGroups() - .define("qmbinpxmiwt") - .withRegion("tohgpzwxyv") - .withExistingResourceGroup("fz") - .withTags(mapOf("xpu", "bhi", "wnfhmjusuqnku", "dd")) - .withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("ipssv", "o", "ijcqcjozz", "kug")) - .withIpv6Addresses(Arrays.asList("qbtokvocuzxl"))) - .withAnnotation("pwarhw") + .define("ptsppgtplo") + .withRegion("tphnazpgv") + .withExistingResourceGroup("xpuokk") + .withProperties(new NeighborGroupProperties().withAnnotation("lpwaulkwuy") + .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("wnwnjdrnfgtmupbl")) + .withIpv6Addresses(Arrays.asList("qvz", "ikxufuwcajyezlk", "iveftugiwsvlfp", "bpnrgnxwrfu")))) + .withTags(mapOf("lmq", "b", "u", "edbqrlbyhzyf", "cevbkk", "qkrzvdj", "g", "qfjwgphhpw")) .create(); - Assertions.assertEquals("do", response.location()); - Assertions.assertEquals("kdpc", response.tags().get("eohpl")); - Assertions.assertEquals("gpdxtsaujtco", response.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("bolqoxuptsl", response.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("xcsq", response.annotation()); + Assertions.assertEquals("nxgohmmg", response.location()); + Assertions.assertEquals("yfgz", response.tags().get("fpqifs")); + Assertions.assertEquals("bsnxmfooi", response.properties().annotation()); + Assertions.assertEquals("rfvq", response.properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("ikcgittfm", response.properties().destination().ipv6Addresses().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java index b0f74a8f32c1..462ee2f322ab 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupWithResponseMockTests.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,23 +21,23 @@ public final class NeighborGroupsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkTapIds\":[\"fmcoxbktuaj\"],\"networkTapRuleIds\":[\"pvvd\"],\"provisioningState\":\"Deleting\",\"destination\":{\"ipv4Addresses\":[\"mnobbai\",\"cfbfy\",\"zaisfofg\"],\"ipv6Addresses\":[\"kmgifm\",\"z\",\"u\",\"dnhhc\"]},\"annotation\":\"slptbdponhblqivc\"},\"location\":\"qfpzjz\",\"tags\":{\"mruawqesqsqmiekx\":\"cwtwtrchk\",\"qchf\":\"p\",\"cu\":\"tykkvjjlba\"},\"id\":\"zyqokbgum\",\"name\":\"ejxxpx\",\"type\":\"izchmb\"}"; + = "{\"properties\":{\"annotation\":\"lizd\",\"destination\":{\"ipv4Addresses\":[\"mzgbogdjwuy\"],\"ipv6Addresses\":[\"pd\",\"uotk\",\"kbp\"]},\"networkTapIds\":[\"pbnkcwauylkbdsk\",\"pyfrtlukafq\"],\"networkTapRuleIds\":[\"empahyuxxeike\",\"npw\",\"nhqafuvvys\"],\"lastOperation\":{\"details\":\"kxgfmesxje\"},\"provisioningState\":\"Updating\"},\"location\":\"nvckxtanlvoorv\",\"tags\":{\"tps\":\"ncqcu\",\"egxlzd\":\"gqlnolspvxp\",\"smnwsffia\":\"atptzkmfvdrkcw\"},\"id\":\"fd\",\"name\":\"r\",\"type\":\"z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NeighborGroup response = manager.neighborGroups() - .getByResourceGroupWithResponse("iuj", "icwmlfzl", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("clrmmudvow", "bscidkwznw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qfpzjz", response.location()); - Assertions.assertEquals("cwtwtrchk", response.tags().get("mruawqesqsqmiekx")); - Assertions.assertEquals("mnobbai", response.destination().ipv4Addresses().get(0)); - Assertions.assertEquals("kmgifm", response.destination().ipv6Addresses().get(0)); - Assertions.assertEquals("slptbdponhblqivc", response.annotation()); + Assertions.assertEquals("nvckxtanlvoorv", response.location()); + Assertions.assertEquals("ncqcu", response.tags().get("tps")); + Assertions.assertEquals("lizd", response.properties().annotation()); + Assertions.assertEquals("mzgbogdjwuy", response.properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("pd", response.properties().destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java index 970c39fbc837..17a5b25375d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,22 +22,24 @@ public final class NeighborGroupsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapIds\":[\"jkngzfs\",\"laybhozlsb\",\"fnhbvcntpoe\",\"ytrsljzmzui\"],\"networkTapRuleIds\":[\"gsxzn\",\"p\"],\"provisioningState\":\"Accepted\",\"destination\":{\"ipv4Addresses\":[\"lbbnjld\"],\"ipv6Addresses\":[\"omanefwlenit\"]},\"annotation\":\"yahfoyfz\"},\"location\":\"dyaepre\",\"tags\":{\"vqbeqpucnus\":\"ukfalwceechca\",\"hicrjriy\":\"yl\",\"ofsnq\":\"fbydrlqll\",\"gseiqb\":\"cybrhxgiknrl\"},\"id\":\"oqjfeamzkuxdgpks\",\"name\":\"otbunvnjqldr\",\"type\":\"qvcugusqlxlx\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"kivvpyznjwmd\",\"destination\":{\"ipv4Addresses\":[\"nyjbzzwsesqytkt\",\"of\",\"xorhsxcsoaxcme\",\"kpxt\"],\"ipv6Addresses\":[\"nkubwkd\"]},\"networkTapIds\":[\"lnbyiowetwwjv\",\"ycygcvgebf\"],\"networkTapRuleIds\":[\"yan\",\"ecvttkgopdjqnsic\",\"cqtec\",\"exscxhzh\"],\"lastOperation\":{\"details\":\"yp\"},\"provisioningState\":\"Accepted\"},\"location\":\"ycfamuikisppygo\",\"tags\":{\"yerpusozaoutjl\":\"sirhhbogxwngpy\",\"tnokdoq\":\"wbnwdkgbzjoyy\"},\"id\":\"kzeowizvjejzxkf\",\"name\":\"zqwkxxbo\",\"type\":\"uvkkcowgnwhldc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.neighborGroups().listByResourceGroup("zgi", com.azure.core.util.Context.NONE); + = manager.neighborGroups().listByResourceGroup("irxxkmozkdqzh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dyaepre", response.iterator().next().location()); - Assertions.assertEquals("ukfalwceechca", response.iterator().next().tags().get("vqbeqpucnus")); - Assertions.assertEquals("lbbnjld", response.iterator().next().destination().ipv4Addresses().get(0)); - Assertions.assertEquals("omanefwlenit", response.iterator().next().destination().ipv6Addresses().get(0)); - Assertions.assertEquals("yahfoyfz", response.iterator().next().annotation()); + Assertions.assertEquals("ycfamuikisppygo", response.iterator().next().location()); + Assertions.assertEquals("sirhhbogxwngpy", response.iterator().next().tags().get("yerpusozaoutjl")); + Assertions.assertEquals("kivvpyznjwmd", response.iterator().next().properties().annotation()); + Assertions.assertEquals("nyjbzzwsesqytkt", + response.iterator().next().properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("nkubwkd", + response.iterator().next().properties().destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java index ee396fe13758..a42822e49e27 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,21 +22,23 @@ public final class NeighborGroupsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapIds\":[\"hfwlnvqacbyfisb\",\"nlmpuyypaggpaih\"],\"networkTapRuleIds\":[\"yzwloqrmgd\"],\"provisioningState\":\"Failed\",\"destination\":{\"ipv4Addresses\":[\"lxtywukhj\",\"spllitxrrgkw\",\"yoy\",\"qoivxcodw\"],\"ipv6Addresses\":[\"ytcachhsizfuew\",\"fwfiikqcdnzsfi\",\"hgneo\"]},\"annotation\":\"mcrxlyzoaho\"},\"location\":\"fakrxjjwnbrmdw\",\"tags\":{\"nistcjhatc\":\"nlsyia\",\"anapfaoiz\":\"pphcstmryc\",\"mzc\":\"inlpxngzzxqbgqn\",\"pucv\":\"bxzjkpi\"},\"id\":\"dozw\",\"name\":\"sk\",\"type\":\"e\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"wc\",\"destination\":{\"ipv4Addresses\":[\"mdynmtnlcvlm\",\"vhedrbz\",\"bhy\",\"gwxwc\"],\"ipv6Addresses\":[\"dlxdlht\",\"l\"]},\"networkTapIds\":[\"awkyxownoypqu\"],\"networkTapRuleIds\":[\"iajicrsdgtjxlop\"],\"lastOperation\":{\"details\":\"axt\"},\"provisioningState\":\"Deleting\"},\"location\":\"zehijlw\",\"tags\":{\"m\":\"abzjpgh\"},\"id\":\"pceqaklsfxl\",\"name\":\"xi\",\"type\":\"ymfqmvnhsfjxtusb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.neighborGroups().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("fakrxjjwnbrmdw", response.iterator().next().location()); - Assertions.assertEquals("nlsyia", response.iterator().next().tags().get("nistcjhatc")); - Assertions.assertEquals("lxtywukhj", response.iterator().next().destination().ipv4Addresses().get(0)); - Assertions.assertEquals("ytcachhsizfuew", response.iterator().next().destination().ipv6Addresses().get(0)); - Assertions.assertEquals("mcrxlyzoaho", response.iterator().next().annotation()); + Assertions.assertEquals("zehijlw", response.iterator().next().location()); + Assertions.assertEquals("abzjpgh", response.iterator().next().tags().get("m")); + Assertions.assertEquals("wc", response.iterator().next().properties().annotation()); + Assertions.assertEquals("mdynmtnlcvlm", + response.iterator().next().properties().destination().ipv4Addresses().get(0)); + Assertions.assertEquals("dlxdlht", + response.iterator().next().properties().destination().ipv6Addresses().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.java deleted file mode 100644 index 5cf0e2290565..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListResultTests.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.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NeighborGroupsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NeighborGroupsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkTapIds\":[\"hci\"],\"networkTapRuleIds\":[\"dv\"],\"provisioningState\":\"Deleting\",\"destination\":{\"ipv4Addresses\":[\"qhs\"],\"ipv6Addresses\":[\"fpwpqbyejuwyqwd\",\"igmghginztx\",\"ujkhnjcmrnkfmkh\"]},\"annotation\":\"twmlmhjnqtqeah\"},\"location\":\"dvragpokddxejhh\",\"tags\":{\"tbkewkqynspg\":\"uavt\",\"qokmyrljial\":\"voffbkkwvdxae\"},\"id\":\"bn\",\"name\":\"brqlpbcjtrpz\",\"type\":\"yudivbxnhsqeaeo\"},{\"properties\":{\"networkTapIds\":[\"lwgdhuruz\"],\"networkTapRuleIds\":[\"arogatmolji\"],\"provisioningState\":\"Updating\",\"destination\":{\"ipv4Addresses\":[\"mzvfkneerz\",\"trknsjulu\"],\"ipv6Addresses\":[\"bnhrxlelfjhkeiz\",\"pihtdmiwjekpt\",\"caydbjzcqymlcfnz\",\"mhsurlgwqkpmm\"]},\"annotation\":\"stauolawi\"},\"location\":\"momsgvvj\",\"tags\":{\"q\":\"lrlohewjjmajnkdf\",\"kzfzqxjosho\":\"onswae\",\"znlw\":\"totryegpkhxrme\",\"ze\":\"bfokxkhu\"},\"id\":\"ufgjblcdr\",\"name\":\"yfcemftz\",\"type\":\"yykyalu\"}],\"nextLink\":\"kd\"}") - .toObject(NeighborGroupsListResult.class); - Assertions.assertEquals("dvragpokddxejhh", model.value().get(0).location()); - Assertions.assertEquals("uavt", model.value().get(0).tags().get("tbkewkqynspg")); - Assertions.assertEquals("qhs", model.value().get(0).destination().ipv4Addresses().get(0)); - Assertions.assertEquals("fpwpqbyejuwyqwd", model.value().get(0).destination().ipv6Addresses().get(0)); - Assertions.assertEquals("twmlmhjnqtqeah", model.value().get(0).annotation()); - Assertions.assertEquals("kd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeighborGroupsListResult model - = new NeighborGroupsListResult() - .withValue(Arrays.asList( - new NeighborGroupInner().withLocation("dvragpokddxejhh") - .withTags(mapOf("tbkewkqynspg", "uavt", "qokmyrljial", "voffbkkwvdxae")) - .withDestination(new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("qhs")) - .withIpv6Addresses(Arrays.asList("fpwpqbyejuwyqwd", "igmghginztx", "ujkhnjcmrnkfmkh"))) - .withAnnotation("twmlmhjnqtqeah"), - new NeighborGroupInner().withLocation("momsgvvj") - .withTags(mapOf("q", "lrlohewjjmajnkdf", "kzfzqxjosho", "onswae", "znlw", "totryegpkhxrme", - "ze", "bfokxkhu")) - .withDestination( - new NeighborGroupDestination().withIpv4Addresses(Arrays.asList("mzvfkneerz", "trknsjulu")) - .withIpv6Addresses(Arrays.asList("bnhrxlelfjhkeiz", "pihtdmiwjekpt", "caydbjzcqymlcfnz", - "mhsurlgwqkpmm"))) - .withAnnotation("stauolawi"))) - .withNextLink("kd"); - model = BinaryData.fromObject(model).toObject(NeighborGroupsListResult.class); - Assertions.assertEquals("dvragpokddxejhh", model.value().get(0).location()); - Assertions.assertEquals("uavt", model.value().get(0).tags().get("tbkewkqynspg")); - Assertions.assertEquals("qhs", model.value().get(0).destination().ipv4Addresses().get(0)); - Assertions.assertEquals("fpwpqbyejuwyqwd", model.value().get(0).destination().ipv6Addresses().get(0)); - Assertions.assertEquals("twmlmhjnqtqeah", model.value().get(0).annotation()); - Assertions.assertEquals("kd", model.nextLink()); - } - - // Use "Map.of" if available - @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/NetworkDeviceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java index fd527b05ff9c..c7abf9c54467 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.NetworkDeviceProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,32 +15,31 @@ public final class NetworkDeviceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkDeviceInner model = BinaryData.fromString( - "{\"properties\":{\"version\":\"ffofwan\",\"networkDeviceSku\":\"k\",\"networkDeviceRole\":\"TS\",\"networkRackId\":\"w\",\"managementIpv4Address\":\"cgwdfriwgybjp\",\"managementIpv6Address\":\"ok\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"hostName\":\"dgbyfgwewqkjvxp\",\"serialNumber\":\"pxsoohu\",\"annotation\":\"lcsklt\"},\"location\":\"uugggzlfbgrd\",\"tags\":{\"mdylperp\":\"bsr\",\"cmfpfbodet\":\"lttjzgcz\",\"muqkevzgjypanhx\":\"esrgvtshuvftwai\",\"wot\":\"pdxxzetwwz\"},\"id\":\"xl\",\"name\":\"fhglhrfo\",\"type\":\"qwec\"}") + "{\"properties\":{\"annotation\":\"afcnlrtb\",\"hostName\":\"jzzca\",\"serialNumber\":\"ijolbuauktwieope\",\"version\":\"lxqdwr\",\"networkDeviceSku\":\"yil\",\"networkDeviceRole\":\"TS\",\"networkRackId\":\"kgxyxyauxre\",\"managementIpv4Address\":\"obmc\",\"managementIpv6Address\":\"tmwytkujsqycm\",\"rwDeviceConfig\":\"xfabl\",\"lastOperation\":{\"details\":\"wbmwhrialiwr\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\"},\"location\":\"rbp\",\"tags\":{\"ticuhqvumsp\":\"sbbi\",\"f\":\"fsfeqbbe\",\"wi\":\"uqfpyyxmzrmtm\"},\"id\":\"uweyyjshcyb\",\"name\":\"fuppoxprc\",\"type\":\"vo\"}") .toObject(NetworkDeviceInner.class); - Assertions.assertEquals("uugggzlfbgrd", model.location()); - Assertions.assertEquals("bsr", model.tags().get("mdylperp")); - Assertions.assertEquals("k", model.networkDeviceSku()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.hostname()); - Assertions.assertEquals("pxsoohu", model.serialNumber()); - Assertions.assertEquals("lcsklt", model.annotation()); + Assertions.assertEquals("rbp", model.location()); + Assertions.assertEquals("sbbi", model.tags().get("ticuhqvumsp")); + Assertions.assertEquals("afcnlrtb", model.properties().annotation()); + Assertions.assertEquals("jzzca", model.properties().hostName()); + Assertions.assertEquals("ijolbuauktwieope", model.properties().serialNumber()); + Assertions.assertEquals("yil", model.properties().networkDeviceSku()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkDeviceInner model = new NetworkDeviceInner().withLocation("uugggzlfbgrd") - .withTags(mapOf("mdylperp", "bsr", "cmfpfbodet", "lttjzgcz", "muqkevzgjypanhx", "esrgvtshuvftwai", "wot", - "pdxxzetwwz")) - .withNetworkDeviceSku("k") - .withHostname("dgbyfgwewqkjvxp") - .withSerialNumber("pxsoohu") - .withAnnotation("lcsklt"); + NetworkDeviceInner model = new NetworkDeviceInner().withLocation("rbp") + .withTags(mapOf("ticuhqvumsp", "sbbi", "f", "fsfeqbbe", "wi", "uqfpyyxmzrmtm")) + .withProperties(new NetworkDeviceProperties().withAnnotation("afcnlrtb") + .withHostName("jzzca") + .withSerialNumber("ijolbuauktwieope") + .withNetworkDeviceSku("yil")); model = BinaryData.fromObject(model).toObject(NetworkDeviceInner.class); - Assertions.assertEquals("uugggzlfbgrd", model.location()); - Assertions.assertEquals("bsr", model.tags().get("mdylperp")); - Assertions.assertEquals("k", model.networkDeviceSku()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.hostname()); - Assertions.assertEquals("pxsoohu", model.serialNumber()); - Assertions.assertEquals("lcsklt", model.annotation()); + Assertions.assertEquals("rbp", model.location()); + Assertions.assertEquals("sbbi", model.tags().get("ticuhqvumsp")); + Assertions.assertEquals("afcnlrtb", model.properties().annotation()); + Assertions.assertEquals("jzzca", model.properties().hostName()); + Assertions.assertEquals("ijolbuauktwieope", model.properties().serialNumber()); + Assertions.assertEquals("yil", model.properties().networkDeviceSku()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceListResultTests.java new file mode 100644 index 000000000000..f3a9f13591a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceListResult; +import org.junit.jupiter.api.Assertions; + +public final class NetworkDeviceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkDeviceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"m\",\"hostName\":\"hnysvlpyeu\",\"serialNumber\":\"kppdi\",\"version\":\"bo\",\"networkDeviceSku\":\"vhh\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"gatxgrznmginmtsd\",\"managementIpv4Address\":\"chwkib\",\"managementIpv6Address\":\"jymncjcagai\",\"rwDeviceConfig\":\"cqzoofjnqjsve\",\"lastOperation\":{\"details\":\"htleberpyljek\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\"},\"location\":\"xowkdnj\",\"tags\":{\"cpnowaw\":\"krhwieh\"},\"id\":\"noehrguqlhfwa\",\"name\":\"bjzm\",\"type\":\"yrguyfazbk\"}],\"nextLink\":\"bygvthrmx\"}") + .toObject(NetworkDeviceListResult.class); + Assertions.assertEquals("xowkdnj", model.value().get(0).location()); + Assertions.assertEquals("krhwieh", model.value().get(0).tags().get("cpnowaw")); + Assertions.assertEquals("m", model.value().get(0).properties().annotation()); + Assertions.assertEquals("hnysvlpyeu", model.value().get(0).properties().hostName()); + Assertions.assertEquals("kppdi", model.value().get(0).properties().serialNumber()); + Assertions.assertEquals("vhh", model.value().get(0).properties().networkDeviceSku()); + Assertions.assertEquals("bygvthrmx", model.nextLink()); + } +} 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 index 749eca7362ca..f81deaaed154 100644 --- 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 @@ -1,33 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties; +import com.azure.resourcemanager.managednetworkfabric.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\":\"iutg\",\"serialNumber\":\"mkahpqha\",\"annotation\":\"ntacih\"}") + = BinaryData.fromString("{\"annotation\":\"utibhlen\",\"hostName\":\"rvrk\",\"serialNumber\":\"abdu\"}") .toObject(NetworkDevicePatchParametersProperties.class); - Assertions.assertEquals("ntacih", model.annotation()); - Assertions.assertEquals("iutg", model.hostname()); - Assertions.assertEquals("mkahpqha", model.serialNumber()); + Assertions.assertEquals("utibhlen", model.annotation()); + Assertions.assertEquals("rvrk", model.hostName()); + Assertions.assertEquals("abdu", model.serialNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkDevicePatchParametersProperties model - = new NetworkDevicePatchParametersProperties().withAnnotation("ntacih") - .withHostname("iutg") - .withSerialNumber("mkahpqha"); + = new NetworkDevicePatchParametersProperties().withAnnotation("utibhlen") + .withHostName("rvrk") + .withSerialNumber("abdu"); model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParametersProperties.class); - Assertions.assertEquals("ntacih", model.annotation()); - Assertions.assertEquals("iutg", model.hostname()); - Assertions.assertEquals("mkahpqha", model.serialNumber()); + Assertions.assertEquals("utibhlen", model.annotation()); + Assertions.assertEquals("rvrk", model.hostName()); + Assertions.assertEquals("abdu", 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 index d24df9fc9ae0..209421a4df68 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParametersProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,26 +15,26 @@ public final class NetworkDevicePatchParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkDevicePatchParameters model = BinaryData.fromString( - "{\"properties\":{\"hostName\":\"zwzlp\",\"serialNumber\":\"tzuykykipfsdye\",\"annotation\":\"noc\"},\"tags\":{\"qejg\":\"zacfpztgazw\",\"gkqzkcyzmffngdyf\":\"aokctgkp\",\"qvhoej\":\"ixrhl\"}}") + "{\"tags\":{\"okfpmijpdvz\":\"nrkjgpjeuxsph\"},\"properties\":{\"annotation\":\"hwb\",\"hostName\":\"ufvcgnrgl\",\"serialNumber\":\"rwyambhbafebzxfk\"}}") .toObject(NetworkDevicePatchParameters.class); - Assertions.assertEquals("zacfpztgazw", model.tags().get("qejg")); - Assertions.assertEquals("zwzlp", model.hostname()); - Assertions.assertEquals("tzuykykipfsdye", model.serialNumber()); - Assertions.assertEquals("noc", model.annotation()); + Assertions.assertEquals("nrkjgpjeuxsph", model.tags().get("okfpmijpdvz")); + Assertions.assertEquals("hwb", model.properties().annotation()); + Assertions.assertEquals("ufvcgnrgl", model.properties().hostName()); + Assertions.assertEquals("rwyambhbafebzxfk", model.properties().serialNumber()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkDevicePatchParameters model = new NetworkDevicePatchParameters() - .withTags(mapOf("qejg", "zacfpztgazw", "gkqzkcyzmffngdyf", "aokctgkp", "qvhoej", "ixrhl")) - .withHostname("zwzlp") - .withSerialNumber("tzuykykipfsdye") - .withAnnotation("noc"); + NetworkDevicePatchParameters model + = new NetworkDevicePatchParameters().withTags(mapOf("okfpmijpdvz", "nrkjgpjeuxsph")) + .withProperties(new NetworkDevicePatchParametersProperties().withAnnotation("hwb") + .withHostName("ufvcgnrgl") + .withSerialNumber("rwyambhbafebzxfk")); model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParameters.class); - Assertions.assertEquals("zacfpztgazw", model.tags().get("qejg")); - Assertions.assertEquals("zwzlp", model.hostname()); - Assertions.assertEquals("tzuykykipfsdye", model.serialNumber()); - Assertions.assertEquals("noc", model.annotation()); + Assertions.assertEquals("nrkjgpjeuxsph", model.tags().get("okfpmijpdvz")); + Assertions.assertEquals("hwb", model.properties().annotation()); + Assertions.assertEquals("ufvcgnrgl", model.properties().hostName()); + Assertions.assertEquals("rwyambhbafebzxfk", model.properties().serialNumber()); } // Use "Map.of" if available 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 dd6d98da3399..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.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.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\":\"upjo\",\"serialNumber\":\"ozsaye\"}") - .toObject(NetworkDevicePatchableProperties.class); - Assertions.assertEquals("upjo", model.hostname()); - Assertions.assertEquals("ozsaye", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicePatchableProperties model - = new NetworkDevicePatchableProperties().withHostname("upjo").withSerialNumber("ozsaye"); - model = BinaryData.fromObject(model).toObject(NetworkDevicePatchableProperties.class); - Assertions.assertEquals("upjo", model.hostname()); - Assertions.assertEquals("ozsaye", 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 index 492ed2895521..858bdd5ea596 100644 --- 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 @@ -1,35 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.NetworkDeviceProperties; 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\":\"nhpcselqx\",\"networkDeviceSku\":\"ppqib\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"vzrlrmlcc\",\"managementIpv4Address\":\"tjsczivfq\",\"managementIpv6Address\":\"nasd\",\"configurationState\":\"Rejected\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"hostName\":\"uscplhyvdg\",\"serialNumber\":\"yzkxitds\",\"annotation\":\"zsvko\"}") + "{\"annotation\":\"jxdiikmoxrezsv\",\"hostName\":\"lrxikj\",\"serialNumber\":\"oywlunpipcwyb\",\"version\":\"fncn\",\"networkDeviceSku\":\"tpf\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"bwfwhxorpwaltzwu\",\"managementIpv4Address\":\"xojfcc\",\"managementIpv6Address\":\"h\",\"rwDeviceConfig\":\"hthvazjpwex\",\"lastOperation\":{\"details\":\"zp\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\"}") .toObject(NetworkDeviceProperties.class); - Assertions.assertEquals("zsvko", model.annotation()); - Assertions.assertEquals("ppqib", model.networkDeviceSku()); - Assertions.assertEquals("uscplhyvdg", model.hostname()); - Assertions.assertEquals("yzkxitds", model.serialNumber()); + Assertions.assertEquals("jxdiikmoxrezsv", model.annotation()); + Assertions.assertEquals("lrxikj", model.hostName()); + Assertions.assertEquals("oywlunpipcwyb", model.serialNumber()); + Assertions.assertEquals("tpf", model.networkDeviceSku()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkDeviceProperties model = new NetworkDeviceProperties().withAnnotation("zsvko") - .withNetworkDeviceSku("ppqib") - .withHostname("uscplhyvdg") - .withSerialNumber("yzkxitds"); + NetworkDeviceProperties model = new NetworkDeviceProperties().withAnnotation("jxdiikmoxrezsv") + .withHostName("lrxikj") + .withSerialNumber("oywlunpipcwyb") + .withNetworkDeviceSku("tpf"); model = BinaryData.fromObject(model).toObject(NetworkDeviceProperties.class); - Assertions.assertEquals("zsvko", model.annotation()); - Assertions.assertEquals("ppqib", model.networkDeviceSku()); - Assertions.assertEquals("uscplhyvdg", model.hostname()); - Assertions.assertEquals("yzkxitds", model.serialNumber()); + Assertions.assertEquals("jxdiikmoxrezsv", model.annotation()); + Assertions.assertEquals("lrxikj", model.hostName()); + Assertions.assertEquals("oywlunpipcwyb", model.serialNumber()); + Assertions.assertEquals("tpf", model.networkDeviceSku()); } } 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 index 8f1ef3573a98..4223f6085ce0 100644 --- 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 @@ -1,91 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -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\":\"qnhttwdowrczfj\",\"manufacturer\":\"nuxxrkkm\",\"supportedVersions\":[{\"version\":\"lwe\",\"vendorOsVersion\":\"dcifrhjulrsulwz\",\"vendorFirmwareVersion\":\"lusnawmhhgzotfr\",\"isDefault\":\"False\"},{\"version\":\"koekvzwxx\",\"vendorOsVersion\":\"highctxbxm\",\"vendorFirmwareVersion\":\"pcqydeykvsk\",\"isDefault\":\"False\"},{\"version\":\"frjeizikgqaboohx\",\"vendorOsVersion\":\"sgyc\",\"vendorFirmwareVersion\":\"xrmdvewuyqaeohpj\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"ToR\",\"TS\"],\"interfaces\":[{\"identifier\":\"aurghooxa\",\"interfaceType\":\"bkhxj\",\"supportedConnectorTypes\":[{\"connectorType\":\"zlqxrkdknk\",\"maxSpeedInMbps\":1052717434}]},{\"identifier\":\"tmbozomtzamicbig\",\"interfaceType\":\"dgzsez\",\"supportedConnectorTypes\":[{\"connectorType\":\"euairaabmdlqjb\",\"maxSpeedInMbps\":476574314}]},{\"identifier\":\"ixlhupm\",\"interfaceType\":\"ihzbdnpxpk\",\"supportedConnectorTypes\":[{\"connectorType\":\"eyxel\",\"maxSpeedInMbps\":886562524}]},{\"identifier\":\"hflrufssjyghsfx\",\"interfaceType\":\"bh\",\"supportedConnectorTypes\":[{\"connectorType\":\"mqfmefgvqcpd\",\"maxSpeedInMbps\":911131826},{\"connectorType\":\"uxweyslandkd\",\"maxSpeedInMbps\":27796894}]}],\"provisioningState\":\"Succeeded\"},\"id\":\"hghcgawnrrnqu\",\"name\":\"xsotir\",\"type\":\"imseobf\"}") + "{\"properties\":{\"model\":\"n\",\"manufacturer\":\"m\",\"supportedVersions\":[{\"version\":\"rdlhvdvmiphbe\",\"vendorOsVersion\":\"qjzmhkdcl\",\"vendorFirmwareVersion\":\"roczfmuner\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"CE\"],\"interfaces\":[{\"identifier\":\"zezbzu\",\"interfaceType\":\"dlevzskejcgw\",\"supportedConnectorTypes\":[{\"connectorType\":\"kstyecupyuijpard\",\"maxSpeedInMbps\":1521819302},{\"connectorType\":\"c\",\"maxSpeedInMbps\":125497840},{\"connectorType\":\"pzdqw\",\"maxSpeedInMbps\":897664975}]}],\"provisioningState\":\"Updating\"},\"id\":\"okxizekuvfrjwuc\",\"name\":\"o\",\"type\":\"zvajbvbnkrdem\"}") .toObject(NetworkDeviceSkuInner.class); - Assertions.assertEquals("qnhttwdowrczfj", model.model()); - Assertions.assertEquals("nuxxrkkm", model.manufacturer()); - Assertions.assertEquals("lwe", model.supportedVersions().get(0).version()); - Assertions.assertEquals("dcifrhjulrsulwz", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("lusnawmhhgzotfr", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TOR, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("aurghooxa", model.interfaces().get(0).identifier()); - Assertions.assertEquals("bkhxj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("zlqxrkdknk", - model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1052717434, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkuInner model = new NetworkDeviceSkuInner().withModel("qnhttwdowrczfj") - .withManufacturer("nuxxrkkm") - .withSupportedVersions(Arrays.asList( - new SupportedVersionProperties().withVersion("lwe") - .withVendorOsVersion("dcifrhjulrsulwz") - .withVendorFirmwareVersion("lusnawmhhgzotfr") - .withIsDefault(BooleanEnumProperty.FALSE), - new SupportedVersionProperties().withVersion("koekvzwxx") - .withVendorOsVersion("highctxbxm") - .withVendorFirmwareVersion("pcqydeykvsk") - .withIsDefault(BooleanEnumProperty.FALSE), - new SupportedVersionProperties().withVersion("frjeizikgqaboohx") - .withVendorOsVersion("sgyc") - .withVendorFirmwareVersion("xrmdvewuyqaeohpj") - .withIsDefault(BooleanEnumProperty.FALSE))) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.TOR, NetworkDeviceRoleName.TS)) - .withInterfaces(Arrays.asList(new DeviceInterfaceProperties().withIdentifier("aurghooxa") - .withInterfaceType("bkhxj") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("zlqxrkdknk").withMaxSpeedInMbps(1052717434))), - new DeviceInterfaceProperties().withIdentifier("tmbozomtzamicbig") - .withInterfaceType("dgzsez") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties().withConnectorType("euairaabmdlqjb") - .withMaxSpeedInMbps(476574314))), - new DeviceInterfaceProperties().withIdentifier("ixlhupm") - .withInterfaceType("ihzbdnpxpk") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("eyxel").withMaxSpeedInMbps(886562524))), - new DeviceInterfaceProperties().withIdentifier("hflrufssjyghsfx") - .withInterfaceType("bh") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("mqfmefgvqcpd") - .withMaxSpeedInMbps(911131826), - new SupportedConnectorProperties().withConnectorType("uxweyslandkd") - .withMaxSpeedInMbps(27796894))))); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkuInner.class); - Assertions.assertEquals("qnhttwdowrczfj", model.model()); - Assertions.assertEquals("nuxxrkkm", model.manufacturer()); - Assertions.assertEquals("lwe", model.supportedVersions().get(0).version()); - Assertions.assertEquals("dcifrhjulrsulwz", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("lusnawmhhgzotfr", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TOR, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("aurghooxa", model.interfaces().get(0).identifier()); - Assertions.assertEquals("bkhxj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("zlqxrkdknk", - model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1052717434, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); + Assertions.assertEquals("n", model.properties().model()); + Assertions.assertEquals("m", model.properties().manufacturer()); + Assertions.assertEquals("rdlhvdvmiphbe", model.properties().supportedVersions().get(0).version()); + Assertions.assertEquals("qjzmhkdcl", model.properties().supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("roczfmuner", model.properties().supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.properties().supportedVersions().get(0).isDefault()); + Assertions.assertEquals(NetworkDeviceRoleName.CE, model.properties().supportedRoleTypes().get(0)); + Assertions.assertEquals("zezbzu", model.properties().interfaces().get(0).identifier()); + Assertions.assertEquals("dlevzskejcgw", model.properties().interfaces().get(0).interfaceType()); + Assertions.assertEquals("kstyecupyuijpard", + model.properties().interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); + Assertions.assertEquals(1521819302, + model.properties().interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuListResultTests.java new file mode 100644 index 000000000000..34feef989f8c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuListResultTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkDeviceSkuListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; +import org.junit.jupiter.api.Assertions; + +public final class NetworkDeviceSkuListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkDeviceSkuListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"model\":\"xzlh\",\"manufacturer\":\"ix\",\"supportedVersions\":[{\"version\":\"ulz\",\"vendorOsVersion\":\"mhpfywvy\",\"vendorFirmwareVersion\":\"qpzfzxsoxin\",\"isDefault\":\"False\"},{\"version\":\"zkdrocqsxy\",\"vendorOsVersion\":\"qtcmiwdwisv\",\"vendorFirmwareVersion\":\"eylajamcajyhft\",\"isDefault\":\"True\"},{\"version\":\"ryklleynqa\",\"vendorOsVersion\":\"kig\",\"vendorFirmwareVersion\":\"clwa\",\"isDefault\":\"True\"},{\"version\":\"bhgzphetxdq\",\"vendorOsVersion\":\"yctajqz\",\"vendorFirmwareVersion\":\"alec\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"NPB\"],\"interfaces\":[{\"identifier\":\"egyxsbfpzvoik\",\"interfaceType\":\"twczf\",\"supportedConnectorTypes\":[{},{},{}]}],\"provisioningState\":\"Failed\"},\"id\":\"cxpblalhhezpfk\",\"name\":\"s\",\"type\":\"aidqzsaaoqdsgpto\"}],\"nextLink\":\"jq\"}") + .toObject(NetworkDeviceSkuListResult.class); + Assertions.assertEquals("xzlh", model.value().get(0).properties().model()); + Assertions.assertEquals("ix", model.value().get(0).properties().manufacturer()); + Assertions.assertEquals("ulz", model.value().get(0).properties().supportedVersions().get(0).version()); + Assertions.assertEquals("mhpfywvy", + model.value().get(0).properties().supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("qpzfzxsoxin", + model.value().get(0).properties().supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + model.value().get(0).properties().supportedVersions().get(0).isDefault()); + Assertions.assertEquals(NetworkDeviceRoleName.NPB, + model.value().get(0).properties().supportedRoleTypes().get(0)); + Assertions.assertEquals("egyxsbfpzvoik", model.value().get(0).properties().interfaces().get(0).identifier()); + Assertions.assertEquals("twczf", model.value().get(0).properties().interfaces().get(0).interfaceType()); + Assertions.assertEquals("jq", model.nextLink()); + } +} 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 index 771427fb72e4..db2c10b7c1e3 100644 --- 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 @@ -1,93 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkuProperties; 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\":\"xstcyilbvzm\",\"manufacturer\":\"cjzlquzexokjxebj\",\"supportedVersions\":[{\"version\":\"n\",\"vendorOsVersion\":\"bwmvogljsvl\",\"vendorFirmwareVersion\":\"idnwceha\",\"isDefault\":\"True\"},{\"version\":\"yzltgiomqo\",\"vendorOsVersion\":\"epiaeapfsergd\",\"vendorFirmwareVersion\":\"eqn\",\"isDefault\":\"True\"},{\"version\":\"eqwbpqqncjubkhj\",\"vendorOsVersion\":\"fymcwmb\",\"vendorFirmwareVersion\":\"yvqyvliqiips\",\"isDefault\":\"True\"},{\"version\":\"vsi\",\"vendorOsVersion\":\"eswhd\",\"vendorFirmwareVersion\":\"ydisnuepywyjl\",\"isDefault\":\"True\"}],\"supportedRoleTypes\":[\"TS\",\"TS\"],\"interfaces\":[{\"identifier\":\"i\",\"interfaceType\":\"cqibzj\",\"supportedConnectorTypes\":[{\"connectorType\":\"ebiphryvcjwqwoq\",\"maxSpeedInMbps\":1703055806},{\"connectorType\":\"jhdhz\",\"maxSpeedInMbps\":22711679},{\"connectorType\":\"ijh\",\"maxSpeedInMbps\":480540278}]},{\"identifier\":\"dkkagvwukhsusmm\",\"interfaceType\":\"fmz\",\"supportedConnectorTypes\":[{\"connectorType\":\"zzhnijmriprlkd\",\"maxSpeedInMbps\":261947956}]},{\"identifier\":\"tlrcxivcbkutpu\",\"interfaceType\":\"twjfluxynbp\",\"supportedConnectorTypes\":[{\"connectorType\":\"ywauyqnjckhm\",\"maxSpeedInMbps\":769053900}]}],\"provisioningState\":\"Canceled\"}") + "{\"model\":\"idackzidgzwdyd\",\"manufacturer\":\"isvpztdivykpxkqe\",\"supportedVersions\":[{\"version\":\"fojiunrlsh\",\"vendorOsVersion\":\"knsykdtoiboan\",\"vendorFirmwareVersion\":\"rcoanvxuldx\",\"isDefault\":\"True\"},{\"version\":\"bnlblfxlupibaqzi\",\"vendorOsVersion\":\"zpzwegh\",\"vendorFirmwareVersion\":\"wbogvgfklqiy\",\"isDefault\":\"False\"},{\"version\":\"qe\",\"vendorOsVersion\":\"b\",\"vendorFirmwareVersion\":\"dstrkzxsgtz\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"TS\"],\"interfaces\":[{\"identifier\":\"vpimyndnoxa\",\"interfaceType\":\"rqaqotn\",\"supportedConnectorTypes\":[{\"connectorType\":\"lousdvrgptqm\",\"maxSpeedInMbps\":1247182916},{\"connectorType\":\"drpizfulgyctsdb\",\"maxSpeedInMbps\":1491724736}]},{\"identifier\":\"ujdsooxrqwo\",\"interfaceType\":\"rbtigap\",\"supportedConnectorTypes\":[{\"connectorType\":\"ikeej\",\"maxSpeedInMbps\":1887429499},{\"connectorType\":\"htwmmkfqbriqulww\",\"maxSpeedInMbps\":1782585254},{\"connectorType\":\"eqkvyhzokpoyu\",\"maxSpeedInMbps\":1075225751},{\"connectorType\":\"nsnaajphmp\",\"maxSpeedInMbps\":195362685}]},{\"identifier\":\"glpwsa\",\"interfaceType\":\"xjsumx\",\"supportedConnectorTypes\":[{\"connectorType\":\"oio\",\"maxSpeedInMbps\":1670264718},{\"connectorType\":\"fqzwqdnxkeed\",\"maxSpeedInMbps\":1168617323},{\"connectorType\":\"yw\",\"maxSpeedInMbps\":1535571219},{\"connectorType\":\"kvemyzdpczaqpqi\",\"maxSpeedInMbps\":374417871}]},{\"identifier\":\"ptrwtxzuisamo\",\"interfaceType\":\"tni\",\"supportedConnectorTypes\":[{\"connectorType\":\"oqsqjghr\",\"maxSpeedInMbps\":1398592951},{\"connectorType\":\"plwsttxsrgxfqp\",\"maxSpeedInMbps\":264253394},{\"connectorType\":\"eovxgzwhsxyru\",\"maxSpeedInMbps\":1605742292},{\"connectorType\":\"kesliky\",\"maxSpeedInMbps\":699381711}]}],\"provisioningState\":\"Failed\"}") .toObject(NetworkDeviceSkuProperties.class); - Assertions.assertEquals("xstcyilbvzm", model.model()); - Assertions.assertEquals("cjzlquzexokjxebj", model.manufacturer()); - Assertions.assertEquals("n", model.supportedVersions().get(0).version()); - Assertions.assertEquals("bwmvogljsvl", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("idnwceha", model.supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals("idackzidgzwdyd", model.model()); + Assertions.assertEquals("isvpztdivykpxkqe", model.manufacturer()); + Assertions.assertEquals("fojiunrlsh", model.supportedVersions().get(0).version()); + Assertions.assertEquals("knsykdtoiboan", model.supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("rcoanvxuldx", model.supportedVersions().get(0).vendorFirmwareVersion()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.supportedVersions().get(0).isDefault()); Assertions.assertEquals(NetworkDeviceRoleName.TS, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("i", model.interfaces().get(0).identifier()); - Assertions.assertEquals("cqibzj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("ebiphryvcjwqwoq", + Assertions.assertEquals("vpimyndnoxa", model.interfaces().get(0).identifier()); + Assertions.assertEquals("rqaqotn", model.interfaces().get(0).interfaceType()); + Assertions.assertEquals("lousdvrgptqm", model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1703055806, - model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkuProperties model = new NetworkDeviceSkuProperties().withModel("xstcyilbvzm") - .withManufacturer("cjzlquzexokjxebj") - .withSupportedVersions(Arrays.asList( - new SupportedVersionProperties().withVersion("n") - .withVendorOsVersion("bwmvogljsvl") - .withVendorFirmwareVersion("idnwceha") - .withIsDefault(BooleanEnumProperty.TRUE), - new SupportedVersionProperties().withVersion("yzltgiomqo") - .withVendorOsVersion("epiaeapfsergd") - .withVendorFirmwareVersion("eqn") - .withIsDefault(BooleanEnumProperty.TRUE), - new SupportedVersionProperties().withVersion("eqwbpqqncjubkhj") - .withVendorOsVersion("fymcwmb") - .withVendorFirmwareVersion("yvqyvliqiips") - .withIsDefault(BooleanEnumProperty.TRUE), - new SupportedVersionProperties().withVersion("vsi") - .withVendorOsVersion("eswhd") - .withVendorFirmwareVersion("ydisnuepywyjl") - .withIsDefault(BooleanEnumProperty.TRUE))) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.TS, NetworkDeviceRoleName.TS)) - .withInterfaces(Arrays.asList( - new DeviceInterfaceProperties().withIdentifier("i") - .withInterfaceType("cqibzj") - .withSupportedConnectorTypes(Arrays.asList( - new SupportedConnectorProperties().withConnectorType("ebiphryvcjwqwoq") - .withMaxSpeedInMbps(1703055806), - new SupportedConnectorProperties().withConnectorType("jhdhz").withMaxSpeedInMbps(22711679), - new SupportedConnectorProperties().withConnectorType("ijh").withMaxSpeedInMbps(480540278))), - new DeviceInterfaceProperties().withIdentifier("dkkagvwukhsusmm") - .withInterfaceType("fmz") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties().withConnectorType("zzhnijmriprlkd") - .withMaxSpeedInMbps(261947956))), - new DeviceInterfaceProperties().withIdentifier("tlrcxivcbkutpu") - .withInterfaceType("twjfluxynbp") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties().withConnectorType("ywauyqnjckhm") - .withMaxSpeedInMbps(769053900))))); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkuProperties.class); - Assertions.assertEquals("xstcyilbvzm", model.model()); - Assertions.assertEquals("cjzlquzexokjxebj", model.manufacturer()); - Assertions.assertEquals("n", model.supportedVersions().get(0).version()); - Assertions.assertEquals("bwmvogljsvl", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("idnwceha", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("i", model.interfaces().get(0).identifier()); - Assertions.assertEquals("cqibzj", model.interfaces().get(0).interfaceType()); - Assertions.assertEquals("ebiphryvcjwqwoq", - model.interfaces().get(0).supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(1703055806, + Assertions.assertEquals(1247182916, model.interfaces().get(0).supportedConnectorTypes().get(0).maxSpeedInMbps()); } } 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 index d0dca1e99117..0bc572ab3aad 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSku; @@ -23,26 +23,27 @@ public final class NetworkDeviceSkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"model\":\"homyd\",\"manufacturer\":\"tuqbvf\",\"supportedVersions\":[{\"version\":\"hirqvvke\",\"vendorOsVersion\":\"dg\",\"vendorFirmwareVersion\":\"oktssgvqxerxrmhr\",\"isDefault\":\"True\"},{\"version\":\"b\",\"vendorOsVersion\":\"lvihylrxsi\",\"vendorFirmwareVersion\":\"syiumtitlqy\",\"isDefault\":\"True\"},{\"version\":\"rn\",\"vendorOsVersion\":\"qpkayqivbigdrqg\",\"vendorFirmwareVersion\":\"tboyztgnmu\",\"isDefault\":\"True\"},{\"version\":\"pcfmgr\",\"vendorOsVersion\":\"gwhzbbdwrje\",\"vendorFirmwareVersion\":\"ofeiiewibdtplj\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"NPB\"],\"interfaces\":[{\"identifier\":\"xcdkhxjwtkftg\",\"interfaceType\":\"juepmewsj\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"lb\",\"interfaceType\":\"hgvtepvrunudmakk\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"axk\",\"interfaceType\":\"kwohdig\",\"supportedConnectorTypes\":[{},{}]},{\"identifier\":\"cftsamod\",\"interfaceType\":\"baktvxer\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Deleting\"},\"id\":\"nnbegr\",\"name\":\"feonmto\",\"type\":\"xgd\"}"; + = "{\"properties\":{\"model\":\"pbainsihdzxeufjy\",\"manufacturer\":\"zm\",\"supportedVersions\":[{\"version\":\"ppibvwqjcphof\",\"vendorOsVersion\":\"qfvmvwplxmu\",\"vendorFirmwareVersion\":\"tnneolghgtej\",\"isDefault\":\"True\"},{\"version\":\"syc\",\"vendorOsVersion\":\"jrqdty\",\"vendorFirmwareVersion\":\"aocj\",\"isDefault\":\"False\"},{\"version\":\"nkic\",\"vendorOsVersion\":\"rwciynjcvew\",\"vendorFirmwareVersion\":\"jrnaktj\",\"isDefault\":\"False\"},{\"version\":\"lah\",\"vendorOsVersion\":\"qjchhrr\",\"vendorFirmwareVersion\":\"cztrqnuahh\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"Management\",\"TS\",\"ToR\"],\"interfaces\":[{\"identifier\":\"shiszivryc\",\"interfaceType\":\"lwzjorvsgm\",\"supportedConnectorTypes\":[{},{},{}]},{\"identifier\":\"esbj\",\"interfaceType\":\"yocybrlwdmpsdfs\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"tnhyyli\",\"interfaceType\":\"qpqumexnpo\",\"supportedConnectorTypes\":[{},{},{},{}]}],\"provisioningState\":\"Accepted\"},\"id\":\"fhltwlzlmpiprlc\",\"name\":\"q\",\"type\":\"wmn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkDeviceSku response - = manager.networkDeviceSkus().getWithResponse("prkiyfoz", com.azure.core.util.Context.NONE).getValue(); + = manager.networkDeviceSkus().getWithResponse("biroxamnvrcq", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("homyd", response.model()); - Assertions.assertEquals("tuqbvf", response.manufacturer()); - Assertions.assertEquals("hirqvvke", response.supportedVersions().get(0).version()); - Assertions.assertEquals("dg", response.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("oktssgvqxerxrmhr", response.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.NPB, response.supportedRoleTypes().get(0)); - Assertions.assertEquals("xcdkhxjwtkftg", response.interfaces().get(0).identifier()); - Assertions.assertEquals("juepmewsj", response.interfaces().get(0).interfaceType()); + Assertions.assertEquals("pbainsihdzxeufjy", response.properties().model()); + Assertions.assertEquals("zm", response.properties().manufacturer()); + Assertions.assertEquals("ppibvwqjcphof", response.properties().supportedVersions().get(0).version()); + Assertions.assertEquals("qfvmvwplxmu", response.properties().supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("tnneolghgtej", + response.properties().supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.properties().supportedVersions().get(0).isDefault()); + Assertions.assertEquals(NetworkDeviceRoleName.MANAGEMENT, response.properties().supportedRoleTypes().get(0)); + Assertions.assertEquals("shiszivryc", response.properties().interfaces().get(0).identifier()); + Assertions.assertEquals("lwzjorvsgm", response.properties().interfaces().get(0).interfaceType()); } } 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 index 93fbf421479f..a201602f49a0 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSku; @@ -24,29 +24,29 @@ public final class NetworkDeviceSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"model\":\"fmazhkqqsjk\",\"manufacturer\":\"q\",\"supportedVersions\":[{\"version\":\"gpmdmwiwevv\",\"vendorOsVersion\":\"wghhbqqhdldar\",\"vendorFirmwareVersion\":\"wimtcceeeuquu\",\"isDefault\":\"True\"},{\"version\":\"cujwxvb\",\"vendorOsVersion\":\"rgknhfwlajwda\",\"vendorFirmwareVersion\":\"djbjg\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"Management\",\"CE\",\"TS\",\"NPB\"],\"interfaces\":[{\"identifier\":\"tkbmtrs\",\"interfaceType\":\"lviaigarma\",\"supportedConnectorTypes\":[{},{},{},{}]},{\"identifier\":\"cnev\",\"interfaceType\":\"cwbqy\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Accepted\"},\"id\":\"giynqryo\",\"name\":\"sweofvsxauphzefi\",\"type\":\"eyydx\"}]}"; + = "{\"value\":[{\"properties\":{\"model\":\"yh\",\"manufacturer\":\"ybmkmxusm\",\"supportedVersions\":[{\"version\":\"e\",\"vendorOsVersion\":\"pbnjckowtuniumy\",\"vendorFirmwareVersion\":\"n\",\"isDefault\":\"False\"},{\"version\":\"bwnmvhbzypm\",\"vendorOsVersion\":\"rgg\",\"vendorFirmwareVersion\":\"ouzo\",\"isDefault\":\"True\"},{\"version\":\"lwyqsxeqtltlmcz\",\"vendorOsVersion\":\"ouane\",\"vendorFirmwareVersion\":\"pgqztakovsl\",\"isDefault\":\"False\"},{\"version\":\"dmtfcstucm\",\"vendorOsVersion\":\"sdsnuqqg\",\"vendorFirmwareVersion\":\"itiut\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"NPB\",\"TS\"],\"interfaces\":[{\"identifier\":\"qpasrilet\",\"interfaceType\":\"lbhkij\",\"supportedConnectorTypes\":[{}]}],\"provisioningState\":\"Deleting\"},\"id\":\"wxrqiwxeppu\",\"name\":\"kizoakzvjy\",\"type\":\"obevfbmxzobpghs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("fmazhkqqsjk", response.iterator().next().model()); - Assertions.assertEquals("q", response.iterator().next().manufacturer()); - Assertions.assertEquals("gpmdmwiwevv", response.iterator().next().supportedVersions().get(0).version()); - Assertions.assertEquals("wghhbqqhdldar", - response.iterator().next().supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("wimtcceeeuquu", - response.iterator().next().supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - response.iterator().next().supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.MANAGEMENT, - response.iterator().next().supportedRoleTypes().get(0)); - Assertions.assertEquals("tkbmtrs", response.iterator().next().interfaces().get(0).identifier()); - Assertions.assertEquals("lviaigarma", response.iterator().next().interfaces().get(0).interfaceType()); + Assertions.assertEquals("yh", response.iterator().next().properties().model()); + Assertions.assertEquals("ybmkmxusm", response.iterator().next().properties().manufacturer()); + Assertions.assertEquals("e", response.iterator().next().properties().supportedVersions().get(0).version()); + Assertions.assertEquals("pbnjckowtuniumy", + response.iterator().next().properties().supportedVersions().get(0).vendorOsVersion()); + Assertions.assertEquals("n", + response.iterator().next().properties().supportedVersions().get(0).vendorFirmwareVersion()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.iterator().next().properties().supportedVersions().get(0).isDefault()); + Assertions.assertEquals(NetworkDeviceRoleName.NPB, + response.iterator().next().properties().supportedRoleTypes().get(0)); + Assertions.assertEquals("qpasrilet", response.iterator().next().properties().interfaces().get(0).identifier()); + Assertions.assertEquals("lbhkij", response.iterator().next().properties().interfaces().get(0).interfaceType()); } } 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 bdce74dbd622..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.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.fluent.models.NetworkDeviceSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkusListResult; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -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\":\"mtmesrfsv\",\"manufacturer\":\"nkzpatqtdiswxsp\",\"supportedVersions\":[{\"version\":\"jazbbgspftesu\",\"vendorOsVersion\":\"pvpvd\",\"vendorFirmwareVersion\":\"ytcovqs\",\"isDefault\":\"False\"}],\"supportedRoleTypes\":[\"TS\"],\"interfaces\":[{\"identifier\":\"zfxnxmlbmuos\",\"interfaceType\":\"jmdihdcyyyzlw\",\"supportedConnectorTypes\":[{},{}]}],\"provisioningState\":\"Deleting\"},\"id\":\"ufzrfgmdqgnnbzrt\",\"name\":\"tedzu\",\"type\":\"bjtvgjsxmtyjj\"}],\"nextLink\":\"vdpwwobtdphti\"}") - .toObject(NetworkDeviceSkusListResult.class); - Assertions.assertEquals("mtmesrfsv", model.value().get(0).model()); - Assertions.assertEquals("nkzpatqtdiswxsp", model.value().get(0).manufacturer()); - Assertions.assertEquals("jazbbgspftesu", model.value().get(0).supportedVersions().get(0).version()); - Assertions.assertEquals("pvpvd", model.value().get(0).supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("ytcovqs", model.value().get(0).supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.value().get(0).supportedRoleTypes().get(0)); - Assertions.assertEquals("zfxnxmlbmuos", model.value().get(0).interfaces().get(0).identifier()); - Assertions.assertEquals("jmdihdcyyyzlw", model.value().get(0).interfaces().get(0).interfaceType()); - Assertions.assertEquals("vdpwwobtdphti", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkusListResult model = new NetworkDeviceSkusListResult() - .withValue(Arrays.asList(new NetworkDeviceSkuInner().withModel("mtmesrfsv") - .withManufacturer("nkzpatqtdiswxsp") - .withSupportedVersions(Arrays.asList(new SupportedVersionProperties().withVersion("jazbbgspftesu") - .withVendorOsVersion("pvpvd") - .withVendorFirmwareVersion("ytcovqs") - .withIsDefault(BooleanEnumProperty.FALSE))) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.TS)) - .withInterfaces(Arrays.asList(new DeviceInterfaceProperties().withIdentifier("zfxnxmlbmuos") - .withInterfaceType("jmdihdcyyyzlw") - .withSupportedConnectorTypes( - Arrays.asList(new SupportedConnectorProperties(), new SupportedConnectorProperties())))))) - .withNextLink("vdpwwobtdphti"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkusListResult.class); - Assertions.assertEquals("mtmesrfsv", model.value().get(0).model()); - Assertions.assertEquals("nkzpatqtdiswxsp", model.value().get(0).manufacturer()); - Assertions.assertEquals("jazbbgspftesu", model.value().get(0).supportedVersions().get(0).version()); - Assertions.assertEquals("pvpvd", model.value().get(0).supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("ytcovqs", model.value().get(0).supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).supportedVersions().get(0).isDefault()); - Assertions.assertEquals(NetworkDeviceRoleName.TS, model.value().get(0).supportedRoleTypes().get(0)); - Assertions.assertEquals("zfxnxmlbmuos", model.value().get(0).interfaces().get(0).identifier()); - Assertions.assertEquals("jmdihdcyyyzlw", model.value().get(0).interfaces().get(0).interfaceType()); - Assertions.assertEquals("vdpwwobtdphti", 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 index 41f6bbc60aa6..8edb56b42097 100644 --- 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 @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -23,32 +24,32 @@ public final class NetworkDevicesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"version\":\"gl\",\"networkDeviceSku\":\"sfgb\",\"networkDeviceRole\":\"ToR\",\"networkRackId\":\"azlycx\",\"managementIpv4Address\":\"brukhqbuoyr\",\"managementIpv6Address\":\"kgqdmvvvjm\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"hostName\":\"sveamsea\",\"serialNumber\":\"uvhxiohglmufzuuy\",\"annotation\":\"haeem\"},\"location\":\"osdpxtsdyw\",\"tags\":{\"mixaqgfpuhhzwr\":\"fvwgwphwxiav\",\"lixa\":\"jumlkjsvkbt\",\"jmsngmluyr\":\"phkgminhecjgdj\"},\"id\":\"kpismmrmrj\",\"name\":\"jthizsabcylz\",\"type\":\"ietumzenkrdr\"}"; + = "{\"properties\":{\"annotation\":\"pz\",\"hostName\":\"jupqlu\",\"serialNumber\":\"xkzdnotg\",\"version\":\"wisqfif\",\"networkDeviceSku\":\"tqvypki\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"ezbceimscoty\",\"managementIpv4Address\":\"ehllwq\",\"managementIpv6Address\":\"aihescjvzlgcliaj\",\"rwDeviceConfig\":\"xvih\",\"lastOperation\":{\"details\":\"p\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"location\":\"ohsymgkirfzvtz\",\"tags\":{\"sekzsp\":\"ilipmuu\",\"brsmfwjc\":\"fhwpkpejfszwrqms\",\"r\":\"zfajptjh\"},\"id\":\"wrakappafj\",\"name\":\"dc\",\"type\":\"qja\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkDevice response = manager.networkDevices() - .define("ihatajdt") - .withRegion("bhgjajkvwkocx") - .withExistingResourceGroup("kxsqkuzabrs") - .withTags(mapOf("bgvlpg", "zllvna")) - .withNetworkDeviceSku("jyiehkxgfuzqqnz") - .withHostname("acrktjoygyns") - .withSerialNumber("gzbbnuglquarbruv") - .withAnnotation("eyxwrmupzpe") + .define("wzlwellhmppf") + .withRegion("msg") + .withExistingResourceGroup("onyizqdwvgmkz") + .withProperties(new NetworkDeviceProperties().withAnnotation("rfuzedud") + .withHostName("gdvwat") + .withSerialNumber("vjvumimb") + .withNetworkDeviceSku("xnoazarivczezee")) + .withTags(mapOf("mjckctybhsg", "smrgjfy", "xjev", "iumktslmeyon", "tynqbhhfhi", "awxrg")) .create(); - Assertions.assertEquals("osdpxtsdyw", response.location()); - Assertions.assertEquals("fvwgwphwxiav", response.tags().get("mixaqgfpuhhzwr")); - Assertions.assertEquals("sfgb", response.networkDeviceSku()); - Assertions.assertEquals("sveamsea", response.hostname()); - Assertions.assertEquals("uvhxiohglmufzuuy", response.serialNumber()); - Assertions.assertEquals("haeem", response.annotation()); + Assertions.assertEquals("ohsymgkirfzvtz", response.location()); + Assertions.assertEquals("ilipmuu", response.tags().get("sekzsp")); + Assertions.assertEquals("pz", response.properties().annotation()); + Assertions.assertEquals("jupqlu", response.properties().hostName()); + Assertions.assertEquals("xkzdnotg", response.properties().serialNumber()); + Assertions.assertEquals("tqvypki", response.properties().networkDeviceSku()); } // Use "Map.of" if available 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 index 840693a383c1..ded0812f0d26 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,24 +21,24 @@ public final class NetworkDevicesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"version\":\"wmwt\",\"networkDeviceSku\":\"rscfcn\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"cullmfwfpoeow\",\"managementIpv4Address\":\"zzwncs\",\"managementIpv6Address\":\"fxvchmubyguqh\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"hostName\":\"rpryyircbajxjr\",\"serialNumber\":\"yrkb\",\"annotation\":\"tx\"},\"location\":\"n\",\"tags\":{\"kevday\":\"mbxo\"},\"id\":\"x\",\"name\":\"kxiymzgrg\",\"type\":\"jalrjwaezp\"}"; + = "{\"properties\":{\"annotation\":\"euyxhcwubt\",\"hostName\":\"oachoji\",\"serialNumber\":\"laqqfrgiplxr\",\"version\":\"bsbkvfk\",\"networkDeviceSku\":\"bbpoijs\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"tjituufknars\",\"managementIpv4Address\":\"nktpjinzosx\",\"managementIpv6Address\":\"mvnnjwnwoxvez\",\"rwDeviceConfig\":\"qchxowpp\",\"lastOperation\":{\"details\":\"qactoq\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"location\":\"gnvuolv\",\"tags\":{\"eq\":\"nlbkizebbrwl\"},\"id\":\"isoiqgetzgwywy\",\"name\":\"bwuamo\",\"type\":\"opqqiyjrehe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkDevice response = manager.networkDevices() - .getByResourceGroupWithResponse("gtiivzkd", "exccwldgfq", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("lkpajio", "ybyilhdbb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("n", response.location()); - Assertions.assertEquals("mbxo", response.tags().get("kevday")); - Assertions.assertEquals("rscfcn", response.networkDeviceSku()); - Assertions.assertEquals("rpryyircbajxjr", response.hostname()); - Assertions.assertEquals("yrkb", response.serialNumber()); - Assertions.assertEquals("tx", response.annotation()); + Assertions.assertEquals("gnvuolv", response.location()); + Assertions.assertEquals("nlbkizebbrwl", response.tags().get("eq")); + Assertions.assertEquals("euyxhcwubt", response.properties().annotation()); + Assertions.assertEquals("oachoji", response.properties().hostName()); + Assertions.assertEquals("laqqfrgiplxr", response.properties().serialNumber()); + Assertions.assertEquals("bbpoijs", response.properties().networkDeviceSku()); } } 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 index e66400e0832b..20ce249196bd 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,23 +22,23 @@ public final class NetworkDevicesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"mtcepzimfcfs\",\"networkDeviceSku\":\"wexpasckpgbmly\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"lxgcmxt\",\"managementIpv4Address\":\"jtqvqctm\",\"managementIpv6Address\":\"dkxzxol\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"hostName\":\"ddpxqrxiperrp\",\"serialNumber\":\"mfvmjjfzizxlbiqq\",\"annotation\":\"arxknfvbsym\"},\"location\":\"bahdbtjm\",\"tags\":{\"bizrxhuq\":\"onrk\",\"cxgqtquirgopgza\":\"vpanloqov\",\"uoqhqrcsksxqfhl\":\"ucujtjuzvyjxuxch\"},\"id\":\"vuvda\",\"name\":\"vyjcdpncvfyeqyod\",\"type\":\"ijcsapqhipajs\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"gro\",\"hostName\":\"xsqdzyyalrx\",\"serialNumber\":\"gq\",\"version\":\"fwuplfjkbax\",\"networkDeviceSku\":\"seimuipggt\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"fh\",\"managementIpv4Address\":\"pldzipheife\",\"managementIpv6Address\":\"nxcl\",\"rwDeviceConfig\":\"amvritjjhqv\",\"lastOperation\":{\"details\":\"gn\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\"},\"location\":\"afcnfi\",\"tags\":{\"kdwyjdvy\":\"ck\",\"wjgyngoudclridql\":\"xb\",\"hchgjonrhdi\":\"nxbdisjeovgc\"},\"id\":\"zvpdjytmeoui\",\"name\":\"vkcnqonjbbhw\",\"type\":\"fllzykzpjjdslpby\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkDevices().listByResourceGroup("ybsps", com.azure.core.util.Context.NONE); + = manager.networkDevices().listByResourceGroup("chengmxpjkuq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bahdbtjm", response.iterator().next().location()); - Assertions.assertEquals("onrk", response.iterator().next().tags().get("bizrxhuq")); - Assertions.assertEquals("wexpasckpgbmly", response.iterator().next().networkDeviceSku()); - Assertions.assertEquals("ddpxqrxiperrp", response.iterator().next().hostname()); - Assertions.assertEquals("mfvmjjfzizxlbiqq", response.iterator().next().serialNumber()); - Assertions.assertEquals("arxknfvbsym", response.iterator().next().annotation()); + Assertions.assertEquals("afcnfi", response.iterator().next().location()); + Assertions.assertEquals("ck", response.iterator().next().tags().get("kdwyjdvy")); + Assertions.assertEquals("gro", response.iterator().next().properties().annotation()); + Assertions.assertEquals("xsqdzyyalrx", response.iterator().next().properties().hostName()); + Assertions.assertEquals("gq", response.iterator().next().properties().serialNumber()); + Assertions.assertEquals("seimuipggt", response.iterator().next().properties().networkDeviceSku()); } } 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 index 3058da68bc88..4403b61b86ab 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,22 +22,22 @@ public final class NetworkDevicesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"vnmevl\",\"networkDeviceSku\":\"cuwrfgpjfv\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"eodvlmdzgvcykz\",\"managementIpv4Address\":\"gctygbbmu\",\"managementIpv6Address\":\"jvvcrsmwojm\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"hostName\":\"utqnkeqjftvlt\",\"serialNumber\":\"pec\",\"annotation\":\"kbzltnowpajfhx\"},\"location\":\"ubbzadzglmuuzps\",\"tags\":{\"rerk\":\"ypxmuldh\",\"fjxkbywsbuqfm\":\"p\"},\"id\":\"bdjkmnxsggnow\",\"name\":\"hyvdbrdvsv\",\"type\":\"hbtyc\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"sgbpjj\",\"hostName\":\"lbkaknivw\",\"serialNumber\":\"ddnddctkjcq\",\"version\":\"dirttq\",\"networkDeviceSku\":\"sbabqtjchxsf\",\"networkDeviceRole\":\"NPB\",\"networkRackId\":\"eiyem\",\"managementIpv4Address\":\"pszekdqqwcspf\",\"managementIpv6Address\":\"nd\",\"rwDeviceConfig\":\"m\",\"lastOperation\":{\"details\":\"lqgsdqnqqzqd\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\"},\"location\":\"oynya\",\"tags\":{\"uzmv\":\"ph\",\"mfkctpaiwh\":\"iltl\",\"xduwimwn\":\"jw\"},\"id\":\"vjdywpfxi\",\"name\":\"jfk\",\"type\":\"njtksw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkDevices().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ubbzadzglmuuzps", response.iterator().next().location()); - Assertions.assertEquals("ypxmuldh", response.iterator().next().tags().get("rerk")); - Assertions.assertEquals("cuwrfgpjfv", response.iterator().next().networkDeviceSku()); - Assertions.assertEquals("utqnkeqjftvlt", response.iterator().next().hostname()); - Assertions.assertEquals("pec", response.iterator().next().serialNumber()); - Assertions.assertEquals("kbzltnowpajfhx", response.iterator().next().annotation()); + Assertions.assertEquals("oynya", response.iterator().next().location()); + Assertions.assertEquals("ph", response.iterator().next().tags().get("uzmv")); + Assertions.assertEquals("sgbpjj", response.iterator().next().properties().annotation()); + Assertions.assertEquals("lbkaknivw", response.iterator().next().properties().hostName()); + Assertions.assertEquals("ddnddctkjcq", response.iterator().next().properties().serialNumber()); + Assertions.assertEquals("sbabqtjchxsf", response.iterator().next().properties().networkDeviceSku()); } } 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 2d2e10b2c9a3..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -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\":\"mip\",\"networkDeviceSku\":\"liqmvlbhikeaq\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"pomxpu\",\"managementIpv4Address\":\"tsdfjyieso\",\"managementIpv6Address\":\"iqbuou\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"hostName\":\"ofjsbgbwwzvdaj\",\"serialNumber\":\"nncfmaciqgjjrlhi\",\"annotation\":\"wixvtbouguxtndop\"},\"location\":\"ttbas\",\"tags\":{\"lndbeaqbkixv\":\"ap\",\"spugzfeuzjljmph\":\"lwynpbbfqvzfj\"},\"id\":\"ky\",\"name\":\"zolgjzmicuydocc\",\"type\":\"xshanzb\"},{\"properties\":{\"version\":\"adh\",\"networkDeviceSku\":\"tecaa\",\"networkDeviceRole\":\"CE\",\"networkRackId\":\"hzniucbda\",\"managementIpv4Address\":\"b\",\"managementIpv6Address\":\"injdllwktlepo\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"hostName\":\"jgcq\",\"serialNumber\":\"lynkgfcfdruw\",\"annotation\":\"kxx\"},\"location\":\"lhuulriqb\",\"tags\":{\"sxebrslttfyhcdjw\":\"vjgb\",\"agttpufpb\":\"uoard\"},\"id\":\"g\",\"name\":\"rholhujbfwxi\",\"type\":\"lkysolsyjp\"},{\"properties\":{\"version\":\"slwhdmcvhtbb\",\"networkDeviceSku\":\"hfvhuwzbxpcqz\",\"networkDeviceRole\":\"Management\",\"networkRackId\":\"tjecohm\",\"managementIpv4Address\":\"vlrrskapbxwieexu\",\"managementIpv6Address\":\"derltfokyksyim\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"hostName\":\"xzznnui\",\"serialNumber\":\"rsejegprkj\",\"annotation\":\"wrjmwv\"},\"location\":\"tu\",\"tags\":{\"jgxieqfkyfh\":\"ximwgxqldeko\",\"pbyynvskpajbm\":\"wvjaq\"},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"},{\"properties\":{\"version\":\"iscr\",\"networkDeviceSku\":\"lgftrqrejdaa\",\"networkDeviceRole\":\"NPB\",\"networkRackId\":\"m\",\"managementIpv4Address\":\"ahlfxlmuifmuadj\",\"managementIpv6Address\":\"snc\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\",\"hostName\":\"gczetybnxg\",\"serialNumber\":\"lcgctjchfjv\",\"annotation\":\"wjzebecuvlb\"},\"location\":\"vwcljkx\",\"tags\":{\"psyxjije\":\"rwoxzg\",\"qwjxi\":\"pdvrbkerdkdkga\",\"ygzqpjoisfmn\":\"dfkcef\",\"ntwhymxymulwiv\":\"ybdjnxumentq\"},\"id\":\"towlhlsycoyb\",\"name\":\"jasqubf\",\"type\":\"j\"}],\"nextLink\":\"whjq\"}") - .toObject(NetworkDevicesListResult.class); - Assertions.assertEquals("ttbas", model.value().get(0).location()); - Assertions.assertEquals("ap", model.value().get(0).tags().get("lndbeaqbkixv")); - Assertions.assertEquals("liqmvlbhikeaq", model.value().get(0).networkDeviceSku()); - Assertions.assertEquals("ofjsbgbwwzvdaj", model.value().get(0).hostname()); - Assertions.assertEquals("nncfmaciqgjjrlhi", model.value().get(0).serialNumber()); - Assertions.assertEquals("wixvtbouguxtndop", model.value().get(0).annotation()); - Assertions.assertEquals("whjq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicesListResult model = new NetworkDevicesListResult().withValue(Arrays.asList( - new NetworkDeviceInner().withLocation("ttbas") - .withTags(mapOf("lndbeaqbkixv", "ap", "spugzfeuzjljmph", "lwynpbbfqvzfj")) - .withNetworkDeviceSku("liqmvlbhikeaq") - .withHostname("ofjsbgbwwzvdaj") - .withSerialNumber("nncfmaciqgjjrlhi") - .withAnnotation("wixvtbouguxtndop"), - new NetworkDeviceInner().withLocation("lhuulriqb") - .withTags(mapOf("sxebrslttfyhcdjw", "vjgb", "agttpufpb", "uoard")) - .withNetworkDeviceSku("tecaa") - .withHostname("jgcq") - .withSerialNumber("lynkgfcfdruw") - .withAnnotation("kxx"), - new NetworkDeviceInner().withLocation("tu") - .withTags(mapOf("jgxieqfkyfh", "ximwgxqldeko", "pbyynvskpajbm", "wvjaq")) - .withNetworkDeviceSku("hfvhuwzbxpcqz") - .withHostname("xzznnui") - .withSerialNumber("rsejegprkj") - .withAnnotation("wrjmwv"), - new NetworkDeviceInner().withLocation("vwcljkx") - .withTags(mapOf("psyxjije", "rwoxzg", "qwjxi", "pdvrbkerdkdkga", "ygzqpjoisfmn", "dfkcef", - "ntwhymxymulwiv", "ybdjnxumentq")) - .withNetworkDeviceSku("lgftrqrejdaa") - .withHostname("gczetybnxg") - .withSerialNumber("lcgctjchfjv") - .withAnnotation("wjzebecuvlb"))) - .withNextLink("whjq"); - model = BinaryData.fromObject(model).toObject(NetworkDevicesListResult.class); - Assertions.assertEquals("ttbas", model.value().get(0).location()); - Assertions.assertEquals("ap", model.value().get(0).tags().get("lndbeaqbkixv")); - Assertions.assertEquals("liqmvlbhikeaq", model.value().get(0).networkDeviceSku()); - Assertions.assertEquals("ofjsbgbwwzvdaj", model.value().get(0).hostname()); - Assertions.assertEquals("nncfmaciqgjjrlhi", model.value().get(0).serialNumber()); - Assertions.assertEquals("wixvtbouguxtndop", model.value().get(0).annotation()); - Assertions.assertEquals("whjq", model.nextLink()); - } - - // Use "Map.of" if available - @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/NetworkFabricLockRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricLockRequestTests.java new file mode 100644 index 000000000000..a32acf033dac --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricLockRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockRequest; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricLockType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkFabricLockRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkFabricLockRequest model = BinaryData.fromString("{\"lockType\":\"Configuration\",\"action\":\"Lock\"}") + .toObject(NetworkFabricLockRequest.class); + Assertions.assertEquals(NetworkFabricLockType.CONFIGURATION, model.lockType()); + Assertions.assertEquals(NetworkFabricLockAction.LOCK, model.action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkFabricLockRequest model + = new NetworkFabricLockRequest().withLockType(NetworkFabricLockType.CONFIGURATION) + .withAction(NetworkFabricLockAction.LOCK); + model = BinaryData.fromObject(model).toObject(NetworkFabricLockRequest.class); + Assertions.assertEquals(NetworkFabricLockType.CONFIGURATION, model.lockType()); + Assertions.assertEquals(NetworkFabricLockAction.LOCK, model.action()); + } +} 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 index 05a9a1aa62c1..97b7ed2ba7ca 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,9 @@ public final class NetworkFabricSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkFabricSkuInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":976682569,\"maximumServerCount\":1008393103,\"supportedVersions\":[\"jtaqhsmqazpdg\"],\"details\":\"jhxsht\",\"provisioningState\":\"Accepted\"},\"id\":\"c\",\"name\":\"qulpt\",\"type\":\"bvcpxtzhi\"}") + "{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1261200172,\"maximumServerCount\":2088682801,\"supportedVersions\":[\"mnoiicsudy\",\"brjjtalxrdsjr\",\"oluqwgusxxhdo\"],\"details\":\"jwyblvtbdmvsb\",\"provisioningState\":\"Accepted\"},\"id\":\"elqpvekmk\",\"name\":\"jfb\",\"type\":\"tlo\"}") .toObject(NetworkFabricSkuInner.class); - Assertions.assertEquals(976682569, model.maxComputeRacks()); - Assertions.assertEquals(1008393103, model.maximumServerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkuInner model - = new NetworkFabricSkuInner().withMaxComputeRacks(976682569).withMaximumServerCount(1008393103); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkuInner.class); - Assertions.assertEquals(976682569, model.maxComputeRacks()); - Assertions.assertEquals(1008393103, model.maximumServerCount()); + Assertions.assertEquals(1261200172, model.properties().maxComputeRacks()); + Assertions.assertEquals(2088682801, model.properties().maximumServerCount()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuListResultTests.java new file mode 100644 index 000000000000..9f93c239d993 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkFabricSkuListResult; +import org.junit.jupiter.api.Assertions; + +public final class NetworkFabricSkuListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkFabricSkuListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1724787003,\"maximumServerCount\":219517272,\"supportedVersions\":[\"qtnhjrfd\",\"fdvbbaexxjfwtg\"],\"details\":\"kkauigvmuafmc\",\"provisioningState\":\"Canceled\"},\"id\":\"yuepsvpltidajjvy\",\"name\":\"eocfkumcfjxok\",\"type\":\"elsy\"},{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":2031521502,\"maximumServerCount\":103958056,\"supportedVersions\":[\"gjjekrkn\",\"drugjqyc\"],\"details\":\"txkrdtulcrcjdk\",\"provisioningState\":\"Failed\"},\"id\":\"subm\",\"name\":\"oonsvobchkxfp\",\"type\":\"hdyslbklglm\"}],\"nextLink\":\"kkwayqshwyqxri\"}") + .toObject(NetworkFabricSkuListResult.class); + Assertions.assertEquals(1724787003, model.value().get(0).properties().maxComputeRacks()); + Assertions.assertEquals(219517272, model.value().get(0).properties().maximumServerCount()); + Assertions.assertEquals("kkwayqshwyqxri", model.nextLink()); + } +} 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 index c0bf9d5fa067..ca8631134f98 100644 --- 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 @@ -1,29 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuProperties; +import com.azure.resourcemanager.managednetworkfabric.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\":\"SingleRack\",\"maxComputeRacks\":949341879,\"maximumServerCount\":1510349768,\"supportedVersions\":[\"jbl\",\"rnsihqhudsmus\",\"aawja\"],\"details\":\"wj\",\"provisioningState\":\"Succeeded\"}") + "{\"type\":\"SingleRack\",\"maxComputeRacks\":14256256,\"maximumServerCount\":724903942,\"supportedVersions\":[\"u\"],\"details\":\"uxcjkcoqwczsyiq\",\"provisioningState\":\"Failed\"}") .toObject(NetworkFabricSkuProperties.class); - Assertions.assertEquals(949341879, model.maxComputeRacks()); - Assertions.assertEquals(1510349768, model.maximumServerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkuProperties model - = new NetworkFabricSkuProperties().withMaxComputeRacks(949341879).withMaximumServerCount(1510349768); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkuProperties.class); - Assertions.assertEquals(949341879, model.maxComputeRacks()); - Assertions.assertEquals(1510349768, model.maximumServerCount()); + Assertions.assertEquals(14256256, model.maxComputeRacks()); + Assertions.assertEquals(724903942, model.maximumServerCount()); } } 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 index 6b1f71da0b8c..3c771b8e7b8a 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,19 +21,20 @@ public final class NetworkFabricSkusGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":1500695591,\"maximumServerCount\":1431108277,\"supportedVersions\":[\"dotmpumzuhood\",\"tqhpvarumvu\"],\"details\":\"yu\",\"provisioningState\":\"Updating\"},\"id\":\"qqllavzlhjgm\",\"name\":\"odbl\",\"type\":\"pqr\"}"; + = "{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":47786696,\"maximumServerCount\":941794366,\"supportedVersions\":[\"qxqiqa\",\"fugqfcoraj\",\"bglkffgyf\"],\"details\":\"jsece\",\"provisioningState\":\"Succeeded\"},\"id\":\"hmbzcu\",\"name\":\"xfyzq\",\"type\":\"suxmlsu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NetworkFabricSku response - = manager.networkFabricSkus().getWithResponse("dlrkvitzk", com.azure.core.util.Context.NONE).getValue(); + NetworkFabricSku response = manager.networkFabricSkus() + .getWithResponse("mszcwwvbxvibiv", com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals(1500695591, response.maxComputeRacks()); - Assertions.assertEquals(1431108277, response.maximumServerCount()); + Assertions.assertEquals(47786696, response.properties().maxComputeRacks()); + Assertions.assertEquals(941794366, response.properties().maximumServerCount()); } } 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 index 79f248b0d6ae..03d557c7f7c0 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,18 +22,18 @@ public final class NetworkFabricSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"SingleRack\",\"maxComputeRacks\":1716501322,\"maximumServerCount\":685018698,\"supportedVersions\":[\"cubwh\",\"myibx\"],\"details\":\"eg\",\"provisioningState\":\"Succeeded\"},\"id\":\"xkxtcxbbjbeyqoh\",\"name\":\"iawpjfkrarerdl\",\"type\":\"bvtpxow\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"MultiRack\",\"maxComputeRacks\":1765973033,\"maximumServerCount\":1687706105,\"supportedVersions\":[\"klly\",\"dsormbvir\"],\"details\":\"eyumwl\",\"provisioningState\":\"Deleting\"},\"id\":\"decf\",\"name\":\"jhizwqzbs\",\"type\":\"wjypioszczswhd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals(1716501322, response.iterator().next().maxComputeRacks()); - Assertions.assertEquals(685018698, response.iterator().next().maximumServerCount()); + Assertions.assertEquals(1765973033, response.iterator().next().properties().maxComputeRacks()); + Assertions.assertEquals(1687706105, response.iterator().next().properties().maximumServerCount()); } } 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 646547b9807c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.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.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\":\"SingleRack\",\"maxComputeRacks\":1161341993,\"maximumServerCount\":404849195,\"supportedVersions\":[\"qban\",\"sjtgirnbgmgmddo\"],\"details\":\"mynltwmpftmfoeaj\",\"provisioningState\":\"Updating\"},\"id\":\"xwet\",\"name\":\"mfd\",\"type\":\"rvlkpzwbhnrec\"}],\"nextLink\":\"d\"}") - .toObject(NetworkFabricSkusListResult.class); - Assertions.assertEquals(1161341993, model.value().get(0).maxComputeRacks()); - Assertions.assertEquals(404849195, model.value().get(0).maximumServerCount()); - Assertions.assertEquals("d", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkusListResult model = new NetworkFabricSkusListResult() - .withValue(Arrays - .asList(new NetworkFabricSkuInner().withMaxComputeRacks(1161341993).withMaximumServerCount(404849195))) - .withNextLink("d"); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkusListResult.class); - Assertions.assertEquals(1161341993, model.value().get(0).maxComputeRacks()); - Assertions.assertEquals(404849195, model.value().get(0).maximumServerCount()); - Assertions.assertEquals("d", model.nextLink()); - } -} 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 index 8d9a11692af7..7530f4e1c486 100644 --- 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 @@ -1,26 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.NetworkInterfaceProperties; 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\":\"chqohtfxcpupuk\",\"connectedTo\":\"mjzpwdlvwtiwsm\",\"interfaceType\":\"Data\",\"ipv4Address\":\"nhqnampp\",\"ipv6Address\":\"tassaekewna\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\",\"annotation\":\"aj\"},\"id\":\"yizyddcvxodk\",\"name\":\"vfsxx\",\"type\":\"ydesqlvgec\"}") + "{\"properties\":{\"annotation\":\"fdfp\",\"physicalIdentifier\":\"ncwmhjob\",\"connectedTo\":\"fpriz\",\"interfaceType\":\"Management\",\"ipv4Address\":\"yftcvbzwgwhg\",\"ipv6Address\":\"soauoorssatfyb\",\"description\":\"ufdmxuq\",\"additionalDescription\":\"qna\",\"lastOperation\":{\"details\":\"uxvzfqayopbtsi\"},\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"xmndztgsqjayqmar\",\"name\":\"neibpgbrhbjdq\",\"type\":\"nh\"}") .toObject(NetworkInterfaceInner.class); - Assertions.assertEquals("aj", model.annotation()); + Assertions.assertEquals("fdfp", model.properties().annotation()); + Assertions.assertEquals("ufdmxuq", model.properties().description()); + Assertions.assertEquals("qna", model.properties().additionalDescription()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfaceInner model = new NetworkInterfaceInner().withAnnotation("aj"); + NetworkInterfaceInner model + = new NetworkInterfaceInner().withProperties(new NetworkInterfaceProperties().withAnnotation("fdfp") + .withDescription("ufdmxuq") + .withAdditionalDescription("qna")); model = BinaryData.fromObject(model).toObject(NetworkInterfaceInner.class); - Assertions.assertEquals("aj", model.annotation()); + Assertions.assertEquals("fdfp", model.properties().annotation()); + Assertions.assertEquals("ufdmxuq", model.properties().description()); + Assertions.assertEquals("qna", model.properties().additionalDescription()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceListResultTests.java new file mode 100644 index 000000000000..b9d0b99d411b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkInterfaceListResult; +import org.junit.jupiter.api.Assertions; + +public final class NetworkInterfaceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkInterfaceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"afxcz\",\"physicalIdentifier\":\"cckwrtwle\",\"connectedTo\":\"veszrtlhpdhw\",\"interfaceType\":\"Management\",\"ipv4Address\":\"aczcnjfmbbfnvjxi\",\"ipv6Address\":\"ovnkrtiklsmnihql\",\"description\":\"qksyiibhyxwbgbu\",\"additionalDescription\":\"vqdorbccqcd\",\"lastOperation\":{\"details\":\"ojvlirknucosaw\"},\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"id\":\"zl\",\"name\":\"pya\",\"type\":\"xihzqjjts\"}],\"nextLink\":\"ydqfttkacy\"}") + .toObject(NetworkInterfaceListResult.class); + Assertions.assertEquals("afxcz", model.value().get(0).properties().annotation()); + Assertions.assertEquals("qksyiibhyxwbgbu", model.value().get(0).properties().description()); + Assertions.assertEquals("vqdorbccqcd", model.value().get(0).properties().additionalDescription()); + Assertions.assertEquals("ydqfttkacy", model.nextLink()); + } +} 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 index 8208381ef42c..71b5e0dbab9a 100644 --- 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 @@ -1,25 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfacePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.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\":\"imyfpqdo\"}").toObject(NetworkInterfacePatchProperties.class); - Assertions.assertEquals("imyfpqdo", model.annotation()); + NetworkInterfacePatchProperties model = BinaryData + .fromString("{\"annotation\":\"izwxvs\",\"description\":\"sgfy\",\"additionalDescription\":\"ky\"}") + .toObject(NetworkInterfacePatchProperties.class); + Assertions.assertEquals("izwxvs", model.annotation()); + Assertions.assertEquals("sgfy", model.description()); + Assertions.assertEquals("ky", model.additionalDescription()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfacePatchProperties model = new NetworkInterfacePatchProperties().withAnnotation("imyfpqdo"); + NetworkInterfacePatchProperties model = new NetworkInterfacePatchProperties().withAnnotation("izwxvs") + .withDescription("sgfy") + .withAdditionalDescription("ky"); model = BinaryData.fromObject(model).toObject(NetworkInterfacePatchProperties.class); - Assertions.assertEquals("imyfpqdo", model.annotation()); + Assertions.assertEquals("izwxvs", model.annotation()); + Assertions.assertEquals("sgfy", model.description()); + Assertions.assertEquals("ky", model.additionalDescription()); } } 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 index a775573d4dcb..5c97feb32190 100644 --- 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 @@ -1,25 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatchProperties; 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\":\"ducdaaktujktz\"}}") + NetworkInterfacePatch model = BinaryData.fromString( + "{\"properties\":{\"annotation\":\"bzkuastaxklpr\",\"description\":\"l\",\"additionalDescription\":\"l\"}}") .toObject(NetworkInterfacePatch.class); - Assertions.assertEquals("ducdaaktujktz", model.annotation()); + Assertions.assertEquals("bzkuastaxklpr", model.properties().annotation()); + Assertions.assertEquals("l", model.properties().description()); + Assertions.assertEquals("l", model.properties().additionalDescription()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfacePatch model = new NetworkInterfacePatch().withAnnotation("ducdaaktujktz"); + NetworkInterfacePatch model = new NetworkInterfacePatch() + .withProperties(new NetworkInterfacePatchProperties().withAnnotation("bzkuastaxklpr") + .withDescription("l") + .withAdditionalDescription("l")); model = BinaryData.fromObject(model).toObject(NetworkInterfacePatch.class); - Assertions.assertEquals("ducdaaktujktz", model.annotation()); + Assertions.assertEquals("bzkuastaxklpr", model.properties().annotation()); + Assertions.assertEquals("l", model.properties().description()); + Assertions.assertEquals("l", model.properties().additionalDescription()); } } 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 index 4038133857b8..ed0e29efc01e 100644 --- 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 @@ -1,26 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceProperties; +import com.azure.resourcemanager.managednetworkfabric.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\":\"goljtzxnmxs\",\"connectedTo\":\"bygoo\",\"interfaceType\":\"Management\",\"ipv4Address\":\"pjxvazyjf\",\"ipv6Address\":\"saodj\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Disabled\",\"annotation\":\"ibfasgmatr\"}") + "{\"annotation\":\"motpuwnnoh\",\"physicalIdentifier\":\"zngocfrjuypwyiul\",\"connectedTo\":\"nos\",\"interfaceType\":\"Data\",\"ipv4Address\":\"haxttpf\",\"ipv6Address\":\"wgsghqucumldd\",\"description\":\"qm\",\"additionalDescription\":\"feothxu\",\"lastOperation\":{\"details\":\"grjdlj\"},\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"}") .toObject(NetworkInterfaceProperties.class); - Assertions.assertEquals("ibfasgmatr", model.annotation()); + Assertions.assertEquals("motpuwnnoh", model.annotation()); + Assertions.assertEquals("qm", model.description()); + Assertions.assertEquals("feothxu", model.additionalDescription()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterfaceProperties model = new NetworkInterfaceProperties().withAnnotation("ibfasgmatr"); + NetworkInterfaceProperties model = new NetworkInterfaceProperties().withAnnotation("motpuwnnoh") + .withDescription("qm") + .withAdditionalDescription("feothxu"); model = BinaryData.fromObject(model).toObject(NetworkInterfaceProperties.class); - Assertions.assertEquals("ibfasgmatr", model.annotation()); + Assertions.assertEquals("motpuwnnoh", model.annotation()); + Assertions.assertEquals("qm", model.description()); + Assertions.assertEquals("feothxu", model.additionalDescription()); } } 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 index ed574c14dfbb..28cdddb66e75 100644 --- 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 @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaceProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -21,21 +22,25 @@ public final class NetworkInterfacesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"physicalIdentifier\":\"ljjhcsgzooefzsdt\",\"connectedTo\":\"qkaqdvwojvx\",\"interfaceType\":\"Data\",\"ipv4Address\":\"rqxrqghotingzick\",\"ipv6Address\":\"gawyhpwmd\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"annotation\":\"lvyhvvpuqyrpubbk\"},\"id\":\"idcfwoolku\",\"name\":\"zowgmmixf\",\"type\":\"aupgblna\"}"; + = "{\"properties\":{\"annotation\":\"gjimlcbmhsfgax\",\"physicalIdentifier\":\"aejy\",\"connectedTo\":\"szxnzjxvdnf\",\"interfaceType\":\"Management\",\"ipv4Address\":\"tulwgpdzlf\",\"ipv6Address\":\"iqwgmxynwa\",\"description\":\"n\",\"additionalDescription\":\"phwaedpu\",\"lastOperation\":{\"details\":\"tuhidjws\"},\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"ny\",\"name\":\"wadvfqrvt\",\"type\":\"mncwjdmjdph\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkInterface response = manager.networkInterfaces() - .define("esswbrnbox") - .withExistingNetworkDevice("qonxvnmcyze", "uvwa") - .withAnnotation("dqr") + .define("kwh") + .withExistingNetworkDevice("zxqr", "sngltlbsnlfplxjr") + .withProperties(new NetworkInterfaceProperties().withAnnotation("rhwuujymyjvkoyjg") + .withDescription("uyygdoi") + .withAdditionalDescription("fcnxrbyvbd")) .create(); - Assertions.assertEquals("lvyhvvpuqyrpubbk", response.annotation()); + Assertions.assertEquals("gjimlcbmhsfgax", response.properties().annotation()); + Assertions.assertEquals("n", response.properties().description()); + Assertions.assertEquals("phwaedpu", response.properties().additionalDescription()); } } 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 index 0d813a29cea8..7a474604d60c 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,19 +21,21 @@ public final class NetworkInterfacesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"physicalIdentifier\":\"ebqq\",\"connectedTo\":\"et\",\"interfaceType\":\"Management\",\"ipv4Address\":\"lczf\",\"ipv6Address\":\"fyyraiaiidkewq\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"dddo\"},\"id\":\"ljhnxf\",\"name\":\"ffngfpilloirm\",\"type\":\"xdbktuqnbcjknrq\"}"; + = "{\"properties\":{\"annotation\":\"cvdzytsd\",\"physicalIdentifier\":\"bkorpu\",\"connectedTo\":\"rppnjzbuvmfsfr\",\"interfaceType\":\"Management\",\"ipv4Address\":\"fnzwyppnularnupp\",\"ipv6Address\":\"jfep\",\"description\":\"zuzxo\",\"additionalDescription\":\"nlhjeuewa\",\"lastOperation\":{\"details\":\"kvruryyq\"},\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"id\":\"okhijghpvjqpxki\",\"name\":\"datbwyar\",\"type\":\"thb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkInterface response = manager.networkInterfaces() - .getWithResponse("es", "exawxo", "bdctj", com.azure.core.util.Context.NONE) + .getWithResponse("frzqwytgggidr", "dykjchzcz", "cpqkpgbssjqj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dddo", response.annotation()); + Assertions.assertEquals("cvdzytsd", response.properties().annotation()); + Assertions.assertEquals("zuzxo", response.properties().description()); + Assertions.assertEquals("nlhjeuewa", response.properties().additionalDescription()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java index d67d47ab8cb2..465996e0a920 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,18 +22,20 @@ public final class NetworkInterfacesListByNetworkDeviceMockTests { @Test public void testListByNetworkDevice() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"oyoioxdwffwyzqke\",\"connectedTo\":\"urreuecokyduqz\",\"interfaceType\":\"Management\",\"ipv4Address\":\"lbqv\",\"ipv6Address\":\"tekxnvkdvcgowrdt\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"annotation\":\"dlbbc\"},\"id\":\"amkyrkwsthpiv\",\"name\":\"cffxhvnodqqzjbf\",\"type\":\"roswnfq\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"nxtpzdgyilwu\",\"physicalIdentifier\":\"l\",\"connectedTo\":\"lnbxoucsddplgjfh\",\"interfaceType\":\"Data\",\"ipv4Address\":\"oke\",\"ipv6Address\":\"madyoctmdauoscc\",\"description\":\"bestntoeteufg\",\"additionalDescription\":\"bzftsbpefrfugthc\",\"lastOperation\":{\"details\":\"oxhoiogpbogpbwef\"},\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\"},\"id\":\"jpkbrvmzu\",\"name\":\"qkrq\",\"type\":\"qjtza\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.networkInterfaces() - .listByNetworkDevice("znwwtkuytwii", "inlic", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.networkInterfaces().listByNetworkDevice("blh", "fqw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dlbbc", response.iterator().next().annotation()); + Assertions.assertEquals("nxtpzdgyilwu", response.iterator().next().properties().annotation()); + Assertions.assertEquals("bestntoeteufg", response.iterator().next().properties().description()); + Assertions.assertEquals("bzftsbpefrfugthc", response.iterator().next().properties().additionalDescription()); } } 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 61c72e5104ea..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.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.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\":\"nwyytfv\",\"connectedTo\":\"tfjikffffgkuh\",\"interfaceType\":\"Data\",\"ipv4Address\":\"vuldbkkejjk\",\"ipv6Address\":\"gawgazmxjqi\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"annotation\":\"bcmlza\"},\"id\":\"zbhur\",\"name\":\"olk\",\"type\":\"lirh\"},{\"properties\":{\"physicalIdentifier\":\"ojusuzgfjzcva\",\"connectedTo\":\"oialahfxwccokdx\",\"interfaceType\":\"Management\",\"ipv4Address\":\"kczynuhhoqeqsh\",\"ipv6Address\":\"ljqkxyrqolnthbb\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"wdrnzkj\"},\"id\":\"fceyjn\",\"name\":\"jmlfuyfjbp\",\"type\":\"iddhlrufzc\"},{\"properties\":{\"physicalIdentifier\":\"jmqrfuiocuselq\",\"connectedTo\":\"sazrhxuddqmdtff\",\"interfaceType\":\"Management\",\"ipv4Address\":\"rkkhmwdmdlgy\",\"ipv6Address\":\"xokwtjawhvagnqfq\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\",\"annotation\":\"yolcaymjchtvsnv\"},\"id\":\"qdnzyza\",\"name\":\"atuwqkokbc\",\"type\":\"othymgobl\"},{\"properties\":{\"physicalIdentifier\":\"snwgwimaa\",\"connectedTo\":\"akhtmhobcyanrfvq\",\"interfaceType\":\"Data\",\"ipv4Address\":\"gvoogxkfna\",\"ipv6Address\":\"qymhcctopuow\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"annotation\":\"yhquhc\"},\"id\":\"gx\",\"name\":\"hajpxecxqnwhsc\",\"type\":\"zawmvgxsmp\"}],\"nextLink\":\"pwirfljfewxqouo\"}") - .toObject(NetworkInterfacesList.class); - Assertions.assertEquals("bcmlza", model.value().get(0).annotation()); - Assertions.assertEquals("pwirfljfewxqouo", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfacesList model - = new NetworkInterfacesList().withValue(Arrays.asList(new NetworkInterfaceInner().withAnnotation("bcmlza"), - new NetworkInterfaceInner().withAnnotation("wdrnzkj"), - new NetworkInterfaceInner().withAnnotation("yolcaymjchtvsnv"), - new NetworkInterfaceInner().withAnnotation("yhquhc"))).withNextLink("pwirfljfewxqouo"); - model = BinaryData.fromObject(model).toObject(NetworkInterfacesList.class); - Assertions.assertEquals("bcmlza", model.value().get(0).annotation()); - Assertions.assertEquals("pwirfljfewxqouo", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java new file mode 100644 index 000000000000..2cd33099062c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorInnerTests.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkMonitorInner; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorInner model = BinaryData.fromString( + "{\"properties\":{\"annotation\":\"ctoxoipmqne\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"vidsssfzsgzgu\",\"stationName\":\"ejomeqgxhwi\",\"stationIp\":\"so\",\"stationPort\":799270063,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1563786965,\"probeInterval\":490646937,\"probeCount\":1190821107},\"stationNetwork\":\"tuxirppbii\",\"monitoredNetworks\":[\"y\",\"kvui\",\"wonkrnizdxywabki\"],\"exportPolicy\":\"Pre-Policy\",\"monitoredAddressFamilies\":[\"ipv4Unicast\",\"ipv4Unicast\",\"All\",\"All\"]},\"lastOperation\":{\"details\":\"qyjukkajn\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"pffemiw\",\"tags\":{\"dgzfoiqzsuspa\":\"awbabhzbfcdikqnx\",\"slqeronz\":\"w\",\"xf\":\"af\"},\"id\":\"uwdbvytqav\",\"name\":\"uymkdeuqxlvzpfd\",\"type\":\"axgbiwpgop\"}") + .toObject(NetworkMonitorInner.class); + Assertions.assertEquals("pffemiw", model.location()); + Assertions.assertEquals("awbabhzbfcdikqnx", model.tags().get("dgzfoiqzsuspa")); + Assertions.assertEquals("ctoxoipmqne", model.properties().annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("vidsssfzsgzgu", model.properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("ejomeqgxhwi", model.properties().bmpConfiguration().stationName()); + Assertions.assertEquals("so", model.properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(799270063, model.properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, + model.properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1563786965, + model.properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(490646937, + model.properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1190821107, + model.properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("tuxirppbii", model.properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("y", model.properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV4UNICAST, + model.properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorInner model = new NetworkMonitorInner().withLocation("pffemiw") + .withTags(mapOf("dgzfoiqzsuspa", "awbabhzbfcdikqnx", "slqeronz", "w", "xf", "af")) + .withProperties(new NetworkMonitorProperties().withAnnotation("ctoxoipmqne") + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.DISABLED) + .withScopeResourceId("vidsssfzsgzgu") + .withStationName("ejomeqgxhwi") + .withStationIp("so") + .withStationPort(799270063) + .withStationConnectionMode(StationConnectionMode.ACTIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(1563786965) + .withProbeInterval(490646937) + .withProbeCount(1190821107)) + .withStationNetwork("tuxirppbii") + .withMonitoredNetworks(Arrays.asList("y", "kvui", "wonkrnizdxywabki")) + .withExportPolicy(BmpExportPolicy.PRE_POLICY) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST, BmpMonitoredAddressFamily.IPV4UNICAST, + BmpMonitoredAddressFamily.ALL, BmpMonitoredAddressFamily.ALL)))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorInner.class); + Assertions.assertEquals("pffemiw", model.location()); + Assertions.assertEquals("awbabhzbfcdikqnx", model.tags().get("dgzfoiqzsuspa")); + Assertions.assertEquals("ctoxoipmqne", model.properties().annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("vidsssfzsgzgu", model.properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("ejomeqgxhwi", model.properties().bmpConfiguration().stationName()); + Assertions.assertEquals("so", model.properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(799270063, model.properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, + model.properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1563786965, + model.properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(490646937, + model.properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1190821107, + model.properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("tuxirppbii", model.properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("y", model.properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, model.properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV4UNICAST, + model.properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + // Use "Map.of" if available + @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/NetworkMonitorListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorListResultTests.java new file mode 100644 index 000000000000..c9faca1365c3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorListResultTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkMonitorListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"lzjsbkpcutzazi\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"nseaimbdqraokd\",\"stationName\":\"luobbva\",\"stationIp\":\"wzknyujxysv\",\"stationPort\":243934051,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":437048038,\"probeInterval\":1293862121,\"probeCount\":1225403823},\"stationNetwork\":\"flleirmtxf\",\"monitoredNetworks\":[\"ildcgbfo\",\"z\",\"bpgcryvidbz\",\"ylbvj\"],\"exportPolicy\":\"All\",\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"ipv4Unicast\",\"vpnIpv6\",\"ipv6Unicast\"]},\"lastOperation\":{\"details\":\"ecgprz\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"kzb\",\"tags\":{\"usyrux\":\"aathxoyxuuco\"},\"id\":\"zhh\",\"name\":\"hrvmgsbpgmncr\",\"type\":\"tpiforomppz\"},{\"properties\":{\"annotation\":\"uq\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"lfcmpuaiugoceqtl\",\"stationName\":\"p\",\"stationIp\":\"m\",\"stationPort\":1277466388,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1717037246,\"probeInterval\":646870782,\"probeCount\":1999900607},\"stationNetwork\":\"kgixhqjqhgqwbb\",\"monitoredNetworks\":[\"twfgoclalvemn\",\"zugabkyy\",\"syweohlmtsnvon\",\"bftswcd\"],\"exportPolicy\":\"Post-Policy\",\"monitoredAddressFamilies\":[\"ipv4Unicast\",\"ipv4Unicast\",\"ipv4Unicast\",\"vpnIpv6\"]},\"lastOperation\":{\"details\":\"ccaflgzwkopxdkbt\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"location\":\"xnikfzrxxf\",\"tags\":{\"xajtbcqjkbkjcurx\":\"vqzjnnuwwvjzr\",\"bdz\":\"jwyzrieitqmlzuw\",\"f\":\"ajxkmpe\",\"eszunb\":\"lgeehbdjgplnlxr\"},\"id\":\"afm\",\"name\":\"ubukqmierzrnob\",\"type\":\"vequzytapgzdhz\"}],\"nextLink\":\"ecdsysxnkuhvhn\"}") + .toObject(NetworkMonitorListResult.class); + Assertions.assertEquals("kzb", model.value().get(0).location()); + Assertions.assertEquals("aathxoyxuuco", model.value().get(0).tags().get("usyrux")); + Assertions.assertEquals("lzjsbkpcutzazi", model.value().get(0).properties().annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + model.value().get(0).properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("nseaimbdqraokd", + model.value().get(0).properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("luobbva", model.value().get(0).properties().bmpConfiguration().stationName()); + Assertions.assertEquals("wzknyujxysv", model.value().get(0).properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(243934051, model.value().get(0).properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + model.value().get(0).properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(437048038, + model.value().get(0).properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1293862121, + model.value().get(0).properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1225403823, + model.value().get(0).properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("flleirmtxf", model.value().get(0).properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("ildcgbfo", + model.value().get(0).properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, + model.value().get(0).properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.value().get(0).properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + Assertions.assertEquals("ecdsysxnkuhvhn", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java new file mode 100644 index 000000000000..5aac1ec5153c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchPropertiesTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorPatchProperties model = BinaryData.fromString( + "{\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"asfzhzzcarc\",\"stationName\":\"oxyipdthjfvnh\",\"stationIp\":\"g\",\"stationPort\":569122593,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":791881517,\"probeInterval\":389349543,\"probeCount\":2029524059},\"stationNetwork\":\"fssjgbfbbachxx\",\"monitoredNetworks\":[\"unfnbphceeivkbux\"],\"exportPolicy\":\"All\",\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"All\",\"vpnIpv6\",\"vpnIpv4\"]}}") + .toObject(NetworkMonitorPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("asfzhzzcarc", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("oxyipdthjfvnh", model.bmpConfiguration().stationName()); + Assertions.assertEquals("g", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(569122593, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(791881517, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(389349543, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(2029524059, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("fssjgbfbbachxx", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("unfnbphceeivkbux", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorPatchProperties model = new NetworkMonitorPatchProperties().withBmpConfiguration( + new BmpConfigurationPatchProperties().withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("asfzhzzcarc") + .withStationName("oxyipdthjfvnh") + .withStationIp("g") + .withStationPort(569122593) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties(new StationConnectionPatchProperties().withKeepaliveIdleTime(791881517) + .withProbeInterval(389349543) + .withProbeCount(2029524059)) + .withStationNetwork("fssjgbfbbachxx") + .withMonitoredNetworks(Arrays.asList("unfnbphceeivkbux")) + .withExportPolicy(BmpExportPolicy.ALL) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.IPV6UNICAST, BmpMonitoredAddressFamily.ALL, + BmpMonitoredAddressFamily.VPN_IPV6, BmpMonitoredAddressFamily.VPN_IPV4))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorPatchProperties.class); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("asfzhzzcarc", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("oxyipdthjfvnh", model.bmpConfiguration().stationName()); + Assertions.assertEquals("g", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(569122593, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(791881517, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(389349543, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(2029524059, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("fssjgbfbbachxx", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("unfnbphceeivkbux", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java new file mode 100644 index 000000000000..9749112eaf48 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPatchTests.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorPatch model = BinaryData.fromString( + "{\"tags\":{\"i\":\"pbdr\",\"nhvdtuoam\":\"jxnnnoz\",\"yzfeoctrz\":\"obqehspshti\",\"wckzeb\":\"wn\"},\"properties\":{\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"gyy\",\"stationName\":\"xqzlmlnxr\",\"stationIp\":\"tkuhskegdkvvi\",\"stationPort\":1306788078,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1681361008,\"probeInterval\":180908634,\"probeCount\":996782175},\"stationNetwork\":\"mupbus\",\"monitoredNetworks\":[\"gozwplxzgzumno\",\"iixkkbygbgiqkw\",\"shy\",\"bnhtty\"],\"exportPolicy\":\"Post-Policy\",\"monitoredAddressFamilies\":[\"ipv4Unicast\",\"ipv4Unicast\",\"ipv6Unicast\"]}}}") + .toObject(NetworkMonitorPatch.class); + Assertions.assertEquals("pbdr", model.tags().get("i")); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("gyy", model.properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("xqzlmlnxr", model.properties().bmpConfiguration().stationName()); + Assertions.assertEquals("tkuhskegdkvvi", model.properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(1306788078, model.properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + model.properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1681361008, + model.properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(180908634, + model.properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(996782175, + model.properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("mupbus", model.properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("gozwplxzgzumno", model.properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, model.properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV4UNICAST, + model.properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorPatch model = new NetworkMonitorPatch() + .withTags(mapOf("i", "pbdr", "nhvdtuoam", "jxnnnoz", "yzfeoctrz", "obqehspshti", "wckzeb", "wn")) + .withProperties(new NetworkMonitorPatchProperties().withBmpConfiguration( + new BmpConfigurationPatchProperties().withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("gyy") + .withStationName("xqzlmlnxr") + .withStationIp("tkuhskegdkvvi") + .withStationPort(1306788078) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties( + new StationConnectionPatchProperties().withKeepaliveIdleTime(1681361008) + .withProbeInterval(180908634) + .withProbeCount(996782175)) + .withStationNetwork("mupbus") + .withMonitoredNetworks(Arrays.asList("gozwplxzgzumno", "iixkkbygbgiqkw", "shy", "bnhtty")) + .withExportPolicy(BmpExportPolicy.POST_POLICY) + .withMonitoredAddressFamilies(Arrays.asList(BmpMonitoredAddressFamily.IPV4UNICAST, + BmpMonitoredAddressFamily.IPV4UNICAST, BmpMonitoredAddressFamily.IPV6UNICAST)))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorPatch.class); + Assertions.assertEquals("pbdr", model.tags().get("i")); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("gyy", model.properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("xqzlmlnxr", model.properties().bmpConfiguration().stationName()); + Assertions.assertEquals("tkuhskegdkvvi", model.properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(1306788078, model.properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + model.properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1681361008, + model.properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(180908634, + model.properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(996782175, + model.properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("mupbus", model.properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("gozwplxzgzumno", model.properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, model.properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV4UNICAST, + model.properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + // Use "Map.of" if available + @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/NetworkMonitorPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPropertiesTests.java new file mode 100644 index 000000000000..f593ed4e8191 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorPropertiesTests.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkMonitorPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkMonitorProperties model = BinaryData.fromString( + "{\"annotation\":\"ktthbmrrmtrx\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"vrjzwawpewaj\",\"stationName\":\"sdjuzmuijtickzo\",\"stationIp\":\"u\",\"stationPort\":212663339,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":739940751,\"probeInterval\":388556352,\"probeCount\":1628070560},\"stationNetwork\":\"kopqlrzhtocj\",\"monitoredNetworks\":[\"pexuvat\"],\"exportPolicy\":\"All\",\"monitoredAddressFamilies\":[\"ipv6Unicast\",\"vpnIpv6\",\"vpnIpv6\",\"All\"]},\"lastOperation\":{\"details\":\"jcmimbmswskbbb\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"}") + .toObject(NetworkMonitorProperties.class); + Assertions.assertEquals("ktthbmrrmtrx", model.annotation()); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("vrjzwawpewaj", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("sdjuzmuijtickzo", model.bmpConfiguration().stationName()); + Assertions.assertEquals("u", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(212663339, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(739940751, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(388556352, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1628070560, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("kopqlrzhtocj", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("pexuvat", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkMonitorProperties model + = new NetworkMonitorProperties().withAnnotation("ktthbmrrmtrx") + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("vrjzwawpewaj") + .withStationName("sdjuzmuijtickzo") + .withStationIp("u") + .withStationPort(212663339) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(739940751) + .withProbeInterval(388556352) + .withProbeCount(1628070560)) + .withStationNetwork("kopqlrzhtocj") + .withMonitoredNetworks(Arrays.asList("pexuvat")) + .withExportPolicy(BmpExportPolicy.ALL) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.IPV6UNICAST, BmpMonitoredAddressFamily.VPN_IPV6, + BmpMonitoredAddressFamily.VPN_IPV6, BmpMonitoredAddressFamily.ALL))); + model = BinaryData.fromObject(model).toObject(NetworkMonitorProperties.class); + Assertions.assertEquals("ktthbmrrmtrx", model.annotation()); + Assertions.assertEquals(StationConfigurationState.ENABLED, + model.bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("vrjzwawpewaj", model.bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("sdjuzmuijtickzo", model.bmpConfiguration().stationName()); + Assertions.assertEquals("u", model.bmpConfiguration().stationIp()); + Assertions.assertEquals(212663339, model.bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, model.bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(739940751, model.bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(388556352, model.bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(1628070560, model.bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("kopqlrzhtocj", model.bmpConfiguration().stationNetwork()); + Assertions.assertEquals("pexuvat", model.bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.ALL, model.bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + model.bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java new file mode 100644 index 000000000000..f0f130e113c3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsCreateMockTests.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitorProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +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 reactor.core.publisher.Mono; + +public final class NetworkMonitorsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"annotation\":\"qcqfouh\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"xbgochpxps\",\"stationName\":\"wwsioozrugbdkxl\",\"stationIp\":\"kuvlzkzjjtapv\",\"stationPort\":1139010439,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":1204458431,\"probeInterval\":1439330008,\"probeCount\":189706772},\"stationNetwork\":\"sozpkvylvtytw\",\"monitoredNetworks\":[\"pmpywwy\"],\"exportPolicy\":\"Post-Policy\",\"monitoredAddressFamilies\":[\"ipv6Unicast\"]},\"lastOperation\":{\"details\":\"doecdq\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"chdxjrrby\",\"tags\":{\"oimojcm\":\"kqpsquouppzgdtuh\",\"vorzhzfoc\":\"ycdx\",\"lwifbdwy\":\"fyltornvbhuy\"},\"id\":\"vcy\",\"name\":\"bbvkthre\",\"type\":\"zvejqzyu\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + FilesharesManager manager = FilesharesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkMonitor response = manager.networkMonitors() + .define("gkrnxrjmilogcn") + .withRegion("hovuvrsczwc") + .withExistingResourceGroup("kznyaittbmobrxhw") + .withProperties(new NetworkMonitorProperties().withAnnotation("gqib") + .withBmpConfiguration(new BmpConfigurationProperties() + .withStationConfigurationState(StationConfigurationState.ENABLED) + .withScopeResourceId("txhztufwyrsfjjs") + .withStationName("us") + .withStationIp("uydeyhknttkdrble") + .withStationPort(262522556) + .withStationConnectionMode(StationConnectionMode.PASSIVE) + .withStationConnectionProperties(new StationConnectionProperties().withKeepaliveIdleTime(1389856721) + .withProbeInterval(445330711) + .withProbeCount(1928457261)) + .withStationNetwork("ijikjfjibuwhbp") + .withMonitoredNetworks(Arrays.asList("jpifxtg")) + .withExportPolicy(BmpExportPolicy.ALL) + .withMonitoredAddressFamilies( + Arrays.asList(BmpMonitoredAddressFamily.VPN_IPV4, BmpMonitoredAddressFamily.ALL, + BmpMonitoredAddressFamily.VPN_IPV6, BmpMonitoredAddressFamily.ALL)))) + .withTags(mapOf("gdkbdozsspfw", "cohywfvyriawfww", "buqmkmwdo", "fcortoxsthjyyir", "otdioxgs", "nvyilho")) + .create(); + + Assertions.assertEquals("chdxjrrby", response.location()); + Assertions.assertEquals("kqpsquouppzgdtuh", response.tags().get("oimojcm")); + Assertions.assertEquals("qcqfouh", response.properties().annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + response.properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("xbgochpxps", response.properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("wwsioozrugbdkxl", response.properties().bmpConfiguration().stationName()); + Assertions.assertEquals("kuvlzkzjjtapv", response.properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(1139010439, response.properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, + response.properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(1204458431, + response.properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(1439330008, + response.properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(189706772, + response.properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("sozpkvylvtytw", response.properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("pmpywwy", response.properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, response.properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + response.properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } + + // Use "Map.of" if available + @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/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..4c191277abb7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"annotation\":\"lsnch\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"mlhkhiktecs\",\"stationName\":\"cqweydaa\",\"stationIp\":\"ttmfcx\",\"stationPort\":92125169,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":94807251,\"probeInterval\":815622050,\"probeCount\":494860197},\"stationNetwork\":\"qiwl\",\"monitoredNetworks\":[\"tsyjzdasgk\",\"zpr\",\"qomuzohnpkof\"],\"exportPolicy\":\"Post-Policy\",\"monitoredAddressFamilies\":[\"All\"]},\"lastOperation\":{\"details\":\"mffyvowlam\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"e\",\"tags\":{\"hjxdnkgztfgcuz\":\"unmgdpxeiv\",\"eiidfpwbybmxf\":\"brehdtqggzahngnr\"},\"id\":\"z\",\"name\":\"golfensibqi\",\"type\":\"bpyjzvye\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + FilesharesManager manager = FilesharesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkMonitor response = manager.networkMonitors() + .getByResourceGroupWithResponse("ypkhnr", "mgnvcusvidkzbd", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("e", response.location()); + Assertions.assertEquals("unmgdpxeiv", response.tags().get("hjxdnkgztfgcuz")); + Assertions.assertEquals("lsnch", response.properties().annotation()); + Assertions.assertEquals(StationConfigurationState.ENABLED, + response.properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("mlhkhiktecs", response.properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("cqweydaa", response.properties().bmpConfiguration().stationName()); + Assertions.assertEquals("ttmfcx", response.properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(92125169, response.properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + response.properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(94807251, + response.properties().bmpConfiguration().stationConnectionProperties().keepaliveIdleTime()); + Assertions.assertEquals(815622050, + response.properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(494860197, + response.properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("qiwl", response.properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("tsyjzdasgk", response.properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.POST_POLICY, response.properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.ALL, + response.properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java new file mode 100644 index 000000000000..75f0a4940dc1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListByResourceGroupMockTests.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"annotation\":\"zczvvwrougalyw\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Disabled\",\"scopeResourceId\":\"bobheyxe\",\"stationName\":\"sktvkwbprkfvvxii\",\"stationIp\":\"jamztvnm\",\"stationPort\":1080670228,\"stationConnectionMode\":\"Passive\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":902432352,\"probeInterval\":1568530743,\"probeCount\":404922644},\"stationNetwork\":\"fuhmhksgo\",\"monitoredNetworks\":[\"egtn\",\"hnotrgyy\",\"eag\"],\"exportPolicy\":\"Pre-Policy\",\"monitoredAddressFamilies\":[\"vpnIpv4\",\"ipv4Unicast\",\"All\"]},\"lastOperation\":{\"details\":\"sduf\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\"},\"location\":\"y\",\"tags\":{\"purnpkkbxk\":\"zubdtzsachmh\",\"b\":\"cfiosra\"},\"id\":\"hdxnlu\",\"name\":\"cwuafbh\",\"type\":\"oaqfpqfpkr\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + FilesharesManager manager = FilesharesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.networkMonitors().listByResourceGroup("lfs", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("y", response.iterator().next().location()); + Assertions.assertEquals("zubdtzsachmh", response.iterator().next().tags().get("purnpkkbxk")); + Assertions.assertEquals("zczvvwrougalyw", response.iterator().next().properties().annotation()); + Assertions.assertEquals(StationConfigurationState.DISABLED, + response.iterator().next().properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("bobheyxe", + response.iterator().next().properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("sktvkwbprkfvvxii", + response.iterator().next().properties().bmpConfiguration().stationName()); + Assertions.assertEquals("jamztvnm", response.iterator().next().properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(1080670228, response.iterator().next().properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.PASSIVE, + response.iterator().next().properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(902432352, + response.iterator() + .next() + .properties() + .bmpConfiguration() + .stationConnectionProperties() + .keepaliveIdleTime()); + Assertions.assertEquals(1568530743, + response.iterator().next().properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(404922644, + response.iterator().next().properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("fuhmhksgo", + response.iterator().next().properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("egtn", + response.iterator().next().properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + response.iterator().next().properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.VPN_IPV4, + response.iterator().next().properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java new file mode 100644 index 000000000000..4946227dcbfa --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkMonitorsListMockTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpExportPolicy; +import com.azure.resourcemanager.managednetworkfabric.models.BmpMonitoredAddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkMonitor; +import com.azure.resourcemanager.managednetworkfabric.models.StationConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionMode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkMonitorsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"annotation\":\"bkvqogzawfoqdnxu\",\"bmpConfiguration\":{\"stationConfigurationState\":\"Enabled\",\"scopeResourceId\":\"vscyutqwsy\",\"stationName\":\"cwrluqaqn\",\"stationIp\":\"g\",\"stationPort\":224560170,\"stationConnectionMode\":\"Active\",\"stationConnectionProperties\":{\"keepaliveIdleTime\":673085350,\"probeInterval\":1400800674,\"probeCount\":307273458},\"stationNetwork\":\"ifvpsmvk\",\"monitoredNetworks\":[\"wmsnplqfivxfq\"],\"exportPolicy\":\"Pre-Policy\",\"monitoredAddressFamilies\":[\"ipv6Unicast\"]},\"lastOperation\":{\"details\":\"kp\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\"},\"location\":\"oeyl\",\"tags\":{\"rqcqhwfskmkd\":\"aogvmqza\",\"txcmcccotqocn\":\"pkdpnjldwcxjvexl\",\"l\":\"yypvhdulds\"},\"id\":\"zzbr\",\"name\":\"fke\",\"type\":\"lkpvaagrdf\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + FilesharesManager manager = FilesharesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.networkMonitors().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("oeyl", response.iterator().next().location()); + Assertions.assertEquals("aogvmqza", response.iterator().next().tags().get("rqcqhwfskmkd")); + Assertions.assertEquals("bkvqogzawfoqdnxu", response.iterator().next().properties().annotation()); + Assertions.assertEquals(StationConfigurationState.ENABLED, + response.iterator().next().properties().bmpConfiguration().stationConfigurationState()); + Assertions.assertEquals("vscyutqwsy", + response.iterator().next().properties().bmpConfiguration().scopeResourceId()); + Assertions.assertEquals("cwrluqaqn", response.iterator().next().properties().bmpConfiguration().stationName()); + Assertions.assertEquals("g", response.iterator().next().properties().bmpConfiguration().stationIp()); + Assertions.assertEquals(224560170, response.iterator().next().properties().bmpConfiguration().stationPort()); + Assertions.assertEquals(StationConnectionMode.ACTIVE, + response.iterator().next().properties().bmpConfiguration().stationConnectionMode()); + Assertions.assertEquals(673085350, + response.iterator() + .next() + .properties() + .bmpConfiguration() + .stationConnectionProperties() + .keepaliveIdleTime()); + Assertions.assertEquals(1400800674, + response.iterator().next().properties().bmpConfiguration().stationConnectionProperties().probeInterval()); + Assertions.assertEquals(307273458, + response.iterator().next().properties().bmpConfiguration().stationConnectionProperties().probeCount()); + Assertions.assertEquals("ifvpsmvk", + response.iterator().next().properties().bmpConfiguration().stationNetwork()); + Assertions.assertEquals("wmsnplqfivxfq", + response.iterator().next().properties().bmpConfiguration().monitoredNetworks().get(0)); + Assertions.assertEquals(BmpExportPolicy.PRE_POLICY, + response.iterator().next().properties().bmpConfiguration().exportPolicy()); + Assertions.assertEquals(BmpMonitoredAddressFamily.IPV6UNICAST, + response.iterator().next().properties().bmpConfiguration().monitoredAddressFamilies().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java index a80fa3f8e5ea..aedd295e0957 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerInnerTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,22 +15,22 @@ public final class NetworkPacketBrokerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkPacketBrokerInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"khglaqjsg\",\"networkDeviceIds\":[\"tujrzxrkn\",\"fdrld\",\"yehi\",\"ittugyu\"],\"sourceInterfaceIds\":[\"lda\",\"urf\",\"azcsozjvx\"],\"networkTapIds\":[\"iggbnv\",\"xofwalzy\",\"whoea\"],\"neighborGroupIds\":[\"obdoey\"],\"provisioningState\":\"Canceled\"},\"location\":\"imtwuuhau\",\"tags\":{\"zjy\":\"kwmnfeub\",\"nqd\":\"kwfugiphrrkuu\",\"opueo\":\"rhzz\"},\"id\":\"usvwluj\",\"name\":\"pwnibittozt\",\"type\":\"dqumqvfm\"}") + "{\"properties\":{\"networkFabricId\":\"hfxrt\",\"networkDeviceIds\":[\"msennqfabqcama\",\"ectcxsfmbzdx\",\"synbkdn\",\"yufxuzmsvzyq\"],\"sourceInterfaceIds\":[\"nxhjtlxfikjk\",\"ara\",\"wwuasnjeglht\",\"xbozpcjcnwjz\"],\"networkTapIds\":[\"lxrnwvdsvo\"],\"neighborGroupIds\":[\"awws\",\"sorgf\",\"jxsawooau\"],\"lastOperation\":{\"details\":\"xfqk\"},\"provisioningState\":\"Accepted\"},\"location\":\"d\",\"tags\":{\"nzdaiovr\":\"ybmrnotoc\",\"laypdtyzv\":\"hrpqphkvyyzadcrx\"},\"id\":\"lf\",\"name\":\"ohuriwhjdfrwp\",\"type\":\"shrmnkcclpctuog\"}") .toObject(NetworkPacketBrokerInner.class); - Assertions.assertEquals("imtwuuhau", model.location()); - Assertions.assertEquals("kwmnfeub", model.tags().get("zjy")); - Assertions.assertEquals("khglaqjsg", model.networkFabricId()); + Assertions.assertEquals("d", model.location()); + Assertions.assertEquals("ybmrnotoc", model.tags().get("nzdaiovr")); + Assertions.assertEquals("hfxrt", model.properties().networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkPacketBrokerInner model = new NetworkPacketBrokerInner().withLocation("imtwuuhau") - .withTags(mapOf("zjy", "kwmnfeub", "nqd", "kwfugiphrrkuu", "opueo", "rhzz")) - .withNetworkFabricId("khglaqjsg"); + NetworkPacketBrokerInner model = new NetworkPacketBrokerInner().withLocation("d") + .withTags(mapOf("nzdaiovr", "ybmrnotoc", "laypdtyzv", "hrpqphkvyyzadcrx")) + .withProperties(new NetworkPacketBrokerProperties().withNetworkFabricId("hfxrt")); model = BinaryData.fromObject(model).toObject(NetworkPacketBrokerInner.class); - Assertions.assertEquals("imtwuuhau", model.location()); - Assertions.assertEquals("kwmnfeub", model.tags().get("zjy")); - Assertions.assertEquals("khglaqjsg", model.networkFabricId()); + Assertions.assertEquals("d", model.location()); + Assertions.assertEquals("ybmrnotoc", model.tags().get("nzdaiovr")); + Assertions.assertEquals("hfxrt", model.properties().networkFabricId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerListResultTests.java new file mode 100644 index 000000000000..ea592a51a90e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkPacketBrokerListResult; +import org.junit.jupiter.api.Assertions; + +public final class NetworkPacketBrokerListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkPacketBrokerListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"networkFabricId\":\"npfydrfb\",\"networkDeviceIds\":[\"y\",\"byxmkhmqyncgaull\"],\"sourceInterfaceIds\":[\"yygjqpulmw\",\"gm\"],\"networkTapIds\":[\"miwxzfvv\",\"ucqfgufjnbxwbm\",\"dukinhlxh\",\"dekekzouyveww\"],\"neighborGroupIds\":[\"dwcgldo\"],\"lastOperation\":{\"details\":\"a\"},\"provisioningState\":\"Canceled\"},\"location\":\"h\",\"tags\":{\"tdqtdnnckkplj\":\"e\"},\"id\":\"shvvfkdx\",\"name\":\"cyijj\",\"type\":\"mhijzrqnjxmvvs\"},{\"properties\":{\"networkFabricId\":\"uy\",\"networkDeviceIds\":[\"wg\",\"uhhqldrdymnswxie\",\"qwqnghxnimvy\"],\"sourceInterfaceIds\":[\"xgunnqgypu\",\"tnylqu\",\"vqmvyumgmmu\"],\"networkTapIds\":[\"nznwgsqufmjx\",\"yoseqcazisvbr\"],\"neighborGroupIds\":[\"yj\",\"gawepkwonrzp\",\"h\",\"rdtbgblxbuibrvj\"],\"lastOperation\":{\"details\":\"flvsmfjihv\"},\"provisioningState\":\"Deleting\"},\"location\":\"rttjfuqmm\",\"tags\":{\"stwygu\":\"wfeqbavd\",\"lvxgwzz\":\"mw\"},\"id\":\"wdtlcjgpvc\",\"name\":\"zvzrbvgwxhlx\",\"type\":\"mxvmdrwynbgovazo\"},{\"properties\":{\"networkFabricId\":\"mdvhhplkhwwdkatv\",\"networkDeviceIds\":[\"gk\",\"swzeyxry\",\"armhpwbuklv\"],\"sourceInterfaceIds\":[\"asgtl\",\"hqpoilosja\",\"mcezevftmhllpok\"],\"networkTapIds\":[\"hztmsm\",\"wtpcflcezswwvw\",\"f\",\"djtvbf\"],\"neighborGroupIds\":[\"ruptsyqcjnq\",\"wxdowum\"],\"lastOperation\":{\"details\":\"krcdi\"},\"provisioningState\":\"Canceled\"},\"location\":\"qddnhfknebwed\",\"tags\":{\"smkaqldqab\":\"yzcwy\",\"bbigcfd\":\"wvpaqbqx\",\"bmjyyrqaedwovoc\":\"ofxn\"},\"id\":\"tjgo\",\"name\":\"ayokrwfmihw\",\"type\":\"adhed\"}],\"nextLink\":\"o\"}") + .toObject(NetworkPacketBrokerListResult.class); + Assertions.assertEquals("h", model.value().get(0).location()); + Assertions.assertEquals("e", model.value().get(0).tags().get("tdqtdnnckkplj")); + Assertions.assertEquals("npfydrfb", model.value().get(0).properties().networkFabricId()); + Assertions.assertEquals("o", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java index a82e7898f13d..521ffce8ba73 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,16 +13,18 @@ public final class NetworkPacketBrokerPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkPacketBrokerPatch model = BinaryData.fromString("{\"tags\":{\"vxfaqufqizj\":\"cweakfec\"}}") - .toObject(NetworkPacketBrokerPatch.class); - Assertions.assertEquals("cweakfec", model.tags().get("vxfaqufqizj")); + NetworkPacketBrokerPatch model + = BinaryData.fromString("{\"tags\":{\"qsrupaylcv\":\"luobdxwhqdcclc\",\"fjxlpiy\":\"bzmfxlry\"}}") + .toObject(NetworkPacketBrokerPatch.class); + Assertions.assertEquals("luobdxwhqdcclc", model.tags().get("qsrupaylcv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkPacketBrokerPatch model = new NetworkPacketBrokerPatch().withTags(mapOf("vxfaqufqizj", "cweakfec")); + NetworkPacketBrokerPatch model + = new NetworkPacketBrokerPatch().withTags(mapOf("qsrupaylcv", "luobdxwhqdcclc", "fjxlpiy", "bzmfxlry")); model = BinaryData.fromObject(model).toObject(NetworkPacketBrokerPatch.class); - Assertions.assertEquals("cweakfec", model.tags().get("vxfaqufqizj")); + Assertions.assertEquals("luobdxwhqdcclc", model.tags().get("qsrupaylcv")); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java index 31d5abbdc2a1..99564f961595 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokerPropertiesTests.java @@ -1,26 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; import org.junit.jupiter.api.Assertions; public final class NetworkPacketBrokerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkPacketBrokerProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"caddtgc\",\"networkDeviceIds\":[\"gtvgwyu\",\"be\",\"fnzzryizwbxg\"],\"sourceInterfaceIds\":[\"xlayunomir\",\"p\",\"abenqlamwmg\",\"way\"],\"networkTapIds\":[\"nbcpjstbhemhcucs\",\"snxfbxu\",\"eapdrbzyv\"],\"neighborGroupIds\":[\"adulpodkaxp\",\"obkzhmhjdqltdel\",\"qrojadhfztlray\",\"rkgzkyhudbkuw\"],\"provisioningState\":\"Succeeded\"}") + "{\"networkFabricId\":\"scxjfsgmosp\",\"networkDeviceIds\":[\"nxs\",\"cowscuyfqlam\"],\"sourceInterfaceIds\":[\"hsujk\",\"fu\",\"pn\"],\"networkTapIds\":[\"wnik\",\"kcajgrbrctsvgo\",\"cq\",\"azmzlpcx\"],\"neighborGroupIds\":[\"hxxrqicf\",\"f\",\"wjdth\",\"vpyeyoafinmpnqu\"],\"lastOperation\":{\"details\":\"jr\"},\"provisioningState\":\"Deleting\"}") .toObject(NetworkPacketBrokerProperties.class); - Assertions.assertEquals("caddtgc", model.networkFabricId()); + Assertions.assertEquals("scxjfsgmosp", model.networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkPacketBrokerProperties model = new NetworkPacketBrokerProperties().withNetworkFabricId("caddtgc"); + NetworkPacketBrokerProperties model = new NetworkPacketBrokerProperties().withNetworkFabricId("scxjfsgmosp"); model = BinaryData.fromObject(model).toObject(NetworkPacketBrokerProperties.class); - Assertions.assertEquals("caddtgc", model.networkFabricId()); + Assertions.assertEquals("scxjfsgmosp", model.networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java index 42301f6b4209..2f4d324ba4ed 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -23,26 +24,26 @@ public final class NetworkPacketBrokersCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"skuqgneorqtr\",\"networkDeviceIds\":[\"ikqvaagnzb\",\"qqbjcdaucs\",\"mzvgj\",\"nuwcquepanqdmm\"],\"sourceInterfaceIds\":[\"p\",\"tblmxblcbwvsqp\",\"avlcbb\"],\"networkTapIds\":[\"pcgirsfil\",\"usyzcnxjvipeh\",\"lbburbx\",\"vgjipbnnghsjxwjn\"],\"neighborGroupIds\":[\"xenhpyixibrsaeu\"],\"provisioningState\":\"Succeeded\"},\"location\":\"blyygfticu\",\"tags\":{\"aotrbnvoepht\":\"swqmteuyqtzo\",\"l\":\"oqoafdvxrlrsrfrx\"},\"id\":\"djpspipkpcvhqa\",\"name\":\"jcasncgq\",\"type\":\"ixuqvat\"}"; + = "{\"properties\":{\"networkFabricId\":\"in\",\"networkDeviceIds\":[\"iztgddah\",\"mvkkjtdhmigkwa\",\"exgien\"],\"sourceInterfaceIds\":[\"ijqygo\",\"shd\",\"ehxv\",\"ifdsafgkysymhu\"],\"networkTapIds\":[\"mllbpegcetezaap\"],\"neighborGroupIds\":[\"rbttzsqey\"],\"lastOperation\":{\"details\":\"h\"},\"provisioningState\":\"Succeeded\"},\"location\":\"xxszpaiecu\",\"tags\":{\"giixu\":\"ofshf\",\"ywoefkpuuu\":\"veekhsmulv\"},\"id\":\"iuwhcyckekm\",\"name\":\"fipygt\",\"type\":\"oycpotmaosongtbh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkPacketBroker response = manager.networkPacketBrokers() - .define("yhoemsdnmmpv") - .withRegion("ultybww") - .withExistingResourceGroup("iglehylbnayyps") - .withNetworkFabricId("pvfgukrx") - .withTags(mapOf("n", "smkjalorxeegiczr")) + .define("ahgsibldxyaqdaa") + .withRegion("kfenmiflky") + .withExistingResourceGroup("rdikdbq") + .withProperties(new NetworkPacketBrokerProperties().withNetworkFabricId("nzaxzfhhhgyxkgnr")) + .withTags(mapOf("tablilyoomgse", "lolnxhsupilh", "kluqf", "isydhardx", "ierxu", "fglftlqa")) .create(); - Assertions.assertEquals("blyygfticu", response.location()); - Assertions.assertEquals("swqmteuyqtzo", response.tags().get("aotrbnvoepht")); - Assertions.assertEquals("skuqgneorqtr", response.networkFabricId()); + Assertions.assertEquals("xxszpaiecu", response.location()); + Assertions.assertEquals("ofshf", response.tags().get("giixu")); + Assertions.assertEquals("in", response.properties().networkFabricId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java index dc47dcec8728..bcdc57db30bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupWithResponseMockTests.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,21 +21,21 @@ public final class NetworkPacketBrokersGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"pgaxpydemccqdss\",\"networkDeviceIds\":[\"ersd\",\"dhnhs\"],\"sourceInterfaceIds\":[\"gzmxtxfuhxyksf\"],\"networkTapIds\":[\"vcknglffnozzf\"],\"neighborGroupIds\":[\"frpjfxsyxcdosyhh\",\"pu\",\"rspreyilqcskxkt\",\"o\"],\"provisioningState\":\"Updating\"},\"location\":\"qt\",\"tags\":{\"nacklyrbvmbd\":\"grddi\",\"psbcxqiy\":\"expnphtqwfp\",\"nrzowcgrzaf\":\"pifcjlfu\",\"agugwxdwtfmfj\":\"sozawqxnhl\"},\"id\":\"rzplhaljomg\",\"name\":\"orprrapt\",\"type\":\"bjenylgebrsnvof\"}"; + = "{\"properties\":{\"networkFabricId\":\"behv\",\"networkDeviceIds\":[\"hltnds\",\"zgnyfhqyli\",\"gnbhz\"],\"sourceInterfaceIds\":[\"in\",\"fyagaoc\",\"etzkcol\"],\"networkTapIds\":[\"spqvxzicurufn\",\"pbvdlkpzd\"],\"neighborGroupIds\":[\"wwenvxuhzixra\",\"btqejfqghg\"],\"lastOperation\":{\"details\":\"vxbcyehajbcbrt\"},\"provisioningState\":\"Failed\"},\"location\":\"lak\",\"tags\":{\"icrqxqjzmosmlhc\":\"dql\",\"pkpmdlt\":\"pfgtnsxdjhztn\",\"liaaiqyxlro\":\"mfhde\"},\"id\":\"xpebsxcnhq\",\"name\":\"cbtyor\",\"type\":\"rdamyumr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkPacketBroker response = manager.networkPacketBrokers() - .getByResourceGroupWithResponse("cu", "aicx", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("bbh", "leiwfi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qt", response.location()); - Assertions.assertEquals("grddi", response.tags().get("nacklyrbvmbd")); - Assertions.assertEquals("pgaxpydemccqdss", response.networkFabricId()); + Assertions.assertEquals("lak", response.location()); + Assertions.assertEquals("dql", response.tags().get("icrqxqjzmosmlhc")); + Assertions.assertEquals("behv", response.properties().networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java index 4f35e654c0f1..8c2dbaf471c0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,20 +22,20 @@ public final class NetworkPacketBrokersListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"e\",\"networkDeviceIds\":[\"adkbxui\",\"soawxugpu\",\"eqkwxzmuzgueuygp\"],\"sourceInterfaceIds\":[\"u\",\"e\"],\"networkTapIds\":[\"welygxxz\"],\"neighborGroupIds\":[\"nqwdjvlwqzxy\",\"lwsfxqcmejezjcb\",\"iua\",\"ak\"],\"provisioningState\":\"Canceled\"},\"location\":\"wmavllpfjguz\",\"tags\":{\"oxxbzagwnomp\":\"wamhm\",\"ufysalbjfkjex\":\"yiscnz\",\"c\":\"fzmhkridip\",\"pifjqhj\":\"jnn\"},\"id\":\"nbdup\",\"name\":\"pllosadjffllr\",\"type\":\"fghyyeokadzuddc\"}]}"; + = "{\"value\":[{\"properties\":{\"networkFabricId\":\"ygj\",\"networkDeviceIds\":[\"kakgwlqzn\",\"bsdgyheyayktutf\"],\"sourceInterfaceIds\":[\"gox\"],\"networkTapIds\":[\"ahmdco\",\"exwgzszjqzmqjhgh\",\"hkhjldwxdq\",\"jhtgncfbjvmdkgvu\"],\"neighborGroupIds\":[\"lsuuhwuox\",\"uiaizzjotm\",\"gzjrkslqbafdb\"],\"lastOperation\":{\"details\":\"cruleimswxo\"},\"provisioningState\":\"Updating\"},\"location\":\"umjmpgze\",\"tags\":{\"fks\":\"fpsijpmeptnqsnp\"},\"id\":\"rrvjwbeeolmob\",\"name\":\"qol\",\"type\":\"fk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkPacketBrokers().listByResourceGroup("yzvbploazccgh", com.azure.core.util.Context.NONE); + = manager.networkPacketBrokers().listByResourceGroup("bbaxnym", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wmavllpfjguz", response.iterator().next().location()); - Assertions.assertEquals("wamhm", response.iterator().next().tags().get("oxxbzagwnomp")); - Assertions.assertEquals("e", response.iterator().next().networkFabricId()); + Assertions.assertEquals("umjmpgze", response.iterator().next().location()); + Assertions.assertEquals("fpsijpmeptnqsnp", response.iterator().next().tags().get("fks")); + Assertions.assertEquals("ygj", response.iterator().next().properties().networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java index d1a33e707932..e16f106b8605 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,20 +22,20 @@ public final class NetworkPacketBrokersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"c\",\"networkDeviceIds\":[\"flcxxp\"],\"sourceInterfaceIds\":[\"pktgslkokqa\",\"gzcojgdq\"],\"networkTapIds\":[\"fe\",\"jgpjnydkkgbvsqks\",\"gkvga\",\"nrhrqqiwfysujcv\"],\"neighborGroupIds\":[\"gpexrxy\",\"pw\",\"sm\"],\"provisioningState\":\"Failed\"},\"location\":\"p\",\"tags\":{\"uncnf\":\"pcifdvt\",\"kymjdwirglqibj\":\"yjwjmyubhtmlgjai\"},\"id\":\"vmkaw\",\"name\":\"uxbzfhurrw\",\"type\":\"cwwitzmx\"}]}"; + = "{\"value\":[{\"properties\":{\"networkFabricId\":\"dwzvhtgfdy\",\"networkDeviceIds\":[\"hlwmivazfnb\",\"cjmsrorjbyyxkc\",\"ahvby\",\"xtjivwveng\"],\"sourceInterfaceIds\":[\"cta\"],\"networkTapIds\":[\"jyholsmahbjc\",\"vskqxgb\"],\"neighborGroupIds\":[\"zrvlklaurly\",\"seocp\",\"gsfjn\"],\"lastOperation\":{\"details\":\"ogmcjnqzukbw\"},\"provisioningState\":\"Deleting\"},\"location\":\"qfzvyoxgeriz\",\"tags\":{\"oqmwpmrlg\":\"lkovopqpfcdp\",\"vamvrejkvci\":\"jqsxfp\",\"hwtgcgefaycbvgo\":\"qbrdwf\"},\"id\":\"bjnxoziotx\",\"name\":\"povflxluvmsgdis\",\"type\":\"pnxthuozdvokxuyh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkPacketBrokers().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("p", response.iterator().next().location()); - Assertions.assertEquals("pcifdvt", response.iterator().next().tags().get("uncnf")); - Assertions.assertEquals("c", response.iterator().next().networkFabricId()); + Assertions.assertEquals("qfzvyoxgeriz", response.iterator().next().location()); + Assertions.assertEquals("lkovopqpfcdp", response.iterator().next().tags().get("oqmwpmrlg")); + Assertions.assertEquals("dwzvhtgfdy", response.iterator().next().properties().networkFabricId()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java deleted file mode 100644 index 8cecc5d73eb3..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListResultTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 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.NetworkPacketBrokerInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokersListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkPacketBrokersListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkPacketBrokersListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"wo\",\"networkDeviceIds\":[\"eyyjmjj\",\"izxpxhnzlsle\",\"cttgzkjt\",\"qpdwad\"],\"sourceInterfaceIds\":[\"ztldsvczdjiah\"],\"networkTapIds\":[\"mjzucwwme\",\"jqhddwvmqxiyoo\"],\"neighborGroupIds\":[\"ozkbnzxbypfq\",\"gaixwrgrkkd\"],\"provisioningState\":\"Deleting\"},\"location\":\"swqi\",\"tags\":{\"g\":\"pw\",\"d\":\"gicwnxhtfmcqbs\"},\"id\":\"pgchzpgfqum\",\"name\":\"djxh\",\"type\":\"ghgodkynrceq\"},{\"properties\":{\"networkFabricId\":\"v\",\"networkDeviceIds\":[\"dfmmxjdnajuopjy\",\"qmkw\"],\"sourceInterfaceIds\":[\"cwlo\",\"dejkluxxrwzobuz\"],\"networkTapIds\":[\"g\"],\"neighborGroupIds\":[\"dtkwppth\",\"zdprmimrljdpoqfx\",\"emhkftbaewht\"],\"provisioningState\":\"Updating\"},\"location\":\"amfmxtllfl\",\"tags\":{\"amklilirwdv\":\"qcnrrfijhggabqb\"},\"id\":\"fhsdpzouhkt\",\"name\":\"rxqwqnjxrd\",\"type\":\"ddtullygta\"},{\"properties\":{\"networkFabricId\":\"czcxdfw\",\"networkDeviceIds\":[\"yf\",\"lxrljphraspifl\"],\"sourceInterfaceIds\":[\"ixlmdbgic\"],\"networkTapIds\":[\"gs\",\"drjuqbp\",\"tokljmtznpaxw\"],\"neighborGroupIds\":[\"yyqiprcltungbsol\",\"ckmiig\",\"b\",\"uck\"],\"provisioningState\":\"Failed\"},\"location\":\"ksw\",\"tags\":{\"sswoykdnona\":\"qqcqikclsmal\",\"lei\":\"xwmgzrujlqcwnyn\"},\"id\":\"bcbgv\",\"name\":\"btsertoxa\",\"type\":\"hxuvjhxm\"}],\"nextLink\":\"qstjc\"}") - .toObject(NetworkPacketBrokersListResult.class); - Assertions.assertEquals("swqi", model.value().get(0).location()); - Assertions.assertEquals("pw", model.value().get(0).tags().get("g")); - Assertions.assertEquals("wo", model.value().get(0).networkFabricId()); - Assertions.assertEquals("qstjc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkPacketBrokersListResult model = new NetworkPacketBrokersListResult().withValue(Arrays.asList( - new NetworkPacketBrokerInner().withLocation("swqi") - .withTags(mapOf("g", "pw", "d", "gicwnxhtfmcqbs")) - .withNetworkFabricId("wo"), - new NetworkPacketBrokerInner().withLocation("amfmxtllfl") - .withTags(mapOf("amklilirwdv", "qcnrrfijhggabqb")) - .withNetworkFabricId("v"), - new NetworkPacketBrokerInner().withLocation("ksw") - .withTags(mapOf("sswoykdnona", "qqcqikclsmal", "lei", "xwmgzrujlqcwnyn")) - .withNetworkFabricId("czcxdfw"))) - .withNextLink("qstjc"); - model = BinaryData.fromObject(model).toObject(NetworkPacketBrokersListResult.class); - Assertions.assertEquals("swqi", model.value().get(0).location()); - Assertions.assertEquals("pw", model.value().get(0).tags().get("g")); - Assertions.assertEquals("wo", model.value().get(0).networkFabricId()); - Assertions.assertEquals("qstjc", model.nextLink()); - } - - // Use "Map.of" if available - @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/NetworkRackInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java index 092764a51b3f..78205764a4b1 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.NetworkRackProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.util.HashMap; import java.util.Map; @@ -15,28 +16,29 @@ public final class NetworkRackInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkRackInner model = BinaryData.fromString( - "{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"wmlgicvnpv\",\"networkDevices\":[\"gjnaqyqipsl\",\"mvcdsvmwbitek\"],\"provisioningState\":\"Deleting\",\"annotation\":\"bvfiybxqi\"},\"location\":\"gybfzdqekiv\",\"tags\":{\"ulrqtbht\":\"zcvdi\"},\"id\":\"ezp\",\"name\":\"lpryf\",\"type\":\"xmdutzfkgilnou\"}") + "{\"properties\":{\"annotation\":\"czvothmkh\",\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"zvbwfcnjhbpoelh\",\"networkDevices\":[\"yhrhjvsz\",\"qboknd\"],\"lastOperation\":{\"details\":\"pqwojoev\"},\"provisioningState\":\"Canceled\"},\"location\":\"ytdxmlynz\",\"tags\":{\"lcuhaizi\":\"apbkrbuoggtdl\",\"ohlpsftqkr\":\"vaylz\",\"vbvvcpwtqsu\":\"m\",\"ffetevrnt\":\"pnhmzy\"},\"id\":\"k\",\"name\":\"wacycsyotctkhf\",\"type\":\"fsatvcsx\"}") .toObject(NetworkRackInner.class); - Assertions.assertEquals("gybfzdqekiv", model.location()); - Assertions.assertEquals("zcvdi", model.tags().get("ulrqtbht")); - Assertions.assertEquals(NetworkRackType.COMBINED, model.networkRackType()); - Assertions.assertEquals("wmlgicvnpv", model.networkFabricId()); - Assertions.assertEquals("bvfiybxqi", model.annotation()); + Assertions.assertEquals("ytdxmlynz", model.location()); + Assertions.assertEquals("apbkrbuoggtdl", model.tags().get("lcuhaizi")); + Assertions.assertEquals("czvothmkh", model.properties().annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.properties().networkRackType()); + Assertions.assertEquals("zvbwfcnjhbpoelh", model.properties().networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkRackInner model = new NetworkRackInner().withLocation("gybfzdqekiv") - .withTags(mapOf("ulrqtbht", "zcvdi")) - .withNetworkRackType(NetworkRackType.COMBINED) - .withNetworkFabricId("wmlgicvnpv") - .withAnnotation("bvfiybxqi"); + NetworkRackInner model = new NetworkRackInner().withLocation("ytdxmlynz") + .withTags( + mapOf("lcuhaizi", "apbkrbuoggtdl", "ohlpsftqkr", "vaylz", "vbvvcpwtqsu", "m", "ffetevrnt", "pnhmzy")) + .withProperties(new NetworkRackProperties().withAnnotation("czvothmkh") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withNetworkFabricId("zvbwfcnjhbpoelh")); model = BinaryData.fromObject(model).toObject(NetworkRackInner.class); - Assertions.assertEquals("gybfzdqekiv", model.location()); - Assertions.assertEquals("zcvdi", model.tags().get("ulrqtbht")); - Assertions.assertEquals(NetworkRackType.COMBINED, model.networkRackType()); - Assertions.assertEquals("wmlgicvnpv", model.networkFabricId()); - Assertions.assertEquals("bvfiybxqi", model.annotation()); + Assertions.assertEquals("ytdxmlynz", model.location()); + Assertions.assertEquals("apbkrbuoggtdl", model.tags().get("lcuhaizi")); + Assertions.assertEquals("czvothmkh", model.properties().annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.properties().networkRackType()); + Assertions.assertEquals("zvbwfcnjhbpoelh", model.properties().networkFabricId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackListResultTests.java new file mode 100644 index 000000000000..cb28964d27df --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkRackListResult; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkRackListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkRackListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"mi\",\"networkRackType\":\"Compute\",\"networkFabricId\":\"qxungrobgwfm\",\"networkDevices\":[\"wdylwxmvzjowz\",\"geerclbl\",\"bhpwachyeur\",\"wmvwryvdi\"],\"lastOperation\":{\"details\":\"ikgpruccwmec\"},\"provisioningState\":\"Succeeded\"},\"location\":\"ytrtexegwmrq\",\"tags\":{\"ycfjnc\":\"iwh\"},\"id\":\"ndiloqkajwjuria\",\"name\":\"sb\",\"type\":\"llanhzc\"},{\"properties\":{\"annotation\":\"jxizbaxdygzk\",\"networkRackType\":\"Combined\",\"networkFabricId\":\"fexwacyy\",\"networkDevices\":[\"x\",\"p\"],\"lastOperation\":{\"details\":\"zkf\"},\"provisioningState\":\"Deleting\"},\"location\":\"iuii\",\"tags\":{\"qdcizeqqfopvnopm\":\"cjy\"},\"id\":\"tdsfh\",\"name\":\"xqlyoazyfbkmvl\",\"type\":\"zmxojzsvmai\"},{\"properties\":{\"annotation\":\"q\",\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"yejthgeecb\",\"networkDevices\":[\"gwlckihbamyqs\",\"kknpugzjw\"],\"lastOperation\":{\"details\":\"crjixiujzkcs\"},\"provisioningState\":\"Canceled\"},\"location\":\"rswksykk\",\"tags\":{\"vuqddlgg\":\"txbbwlmnwzok\",\"olgzubakdlkv\":\"q\",\"w\":\"gcmfnsffetpkmixw\"},\"id\":\"lscgsmepnq\",\"name\":\"xgvohdbthhxmoe\",\"type\":\"vudeep\"}],\"nextLink\":\"gannvwxqhp\"}") + .toObject(NetworkRackListResult.class); + Assertions.assertEquals("ytrtexegwmrq", model.value().get(0).location()); + Assertions.assertEquals("iwh", model.value().get(0).tags().get("ycfjnc")); + Assertions.assertEquals("mi", model.value().get(0).properties().annotation()); + Assertions.assertEquals(NetworkRackType.COMPUTE, model.value().get(0).properties().networkRackType()); + Assertions.assertEquals("qxungrobgwfm", model.value().get(0).properties().networkFabricId()); + Assertions.assertEquals("gannvwxqhp", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java similarity index 57% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java index ebc27467ccd8..060733ff5c2c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/TagsUpdateTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java @@ -1,28 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; -public final class TagsUpdateTests { +public final class NetworkRackPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TagsUpdate model - = BinaryData.fromString("{\"tags\":{\"nszonwpngaj\":\"bauiropi\"}}").toObject(TagsUpdate.class); - Assertions.assertEquals("bauiropi", model.tags().get("nszonwpngaj")); + NetworkRackPatch model + = BinaryData.fromString("{\"tags\":{\"ihuftrn\":\"ftaspmcr\"}}").toObject(NetworkRackPatch.class); + Assertions.assertEquals("ftaspmcr", model.tags().get("ihuftrn")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsUpdate model = new TagsUpdate().withTags(mapOf("nszonwpngaj", "bauiropi")); - model = BinaryData.fromObject(model).toObject(TagsUpdate.class); - Assertions.assertEquals("bauiropi", model.tags().get("nszonwpngaj")); + NetworkRackPatch model = new NetworkRackPatch().withTags(mapOf("ihuftrn", "ftaspmcr")); + model = BinaryData.fromObject(model).toObject(NetworkRackPatch.class); + Assertions.assertEquals("ftaspmcr", model.tags().get("ihuftrn")); } // Use "Map.of" if available 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 index a316ca31f7e9..d6897495cac1 100644 --- 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import org.junit.jupiter.api.Assertions; @@ -13,21 +13,21 @@ public final class NetworkRackPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkRackProperties model = BinaryData.fromString( - "{\"networkRackType\":\"Compute\",\"networkFabricId\":\"gndj\",\"networkDevices\":[\"r\",\"ggqqyeqfcb\"],\"provisioningState\":\"Updating\",\"annotation\":\"yuf\"}") + "{\"annotation\":\"hnmizhvprhqq\",\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"blehhkplo\",\"networkDevices\":[\"ottaksadz\",\"ghmmtbtdvucfvvra\",\"beurdeewl\"],\"lastOperation\":{\"details\":\"pcbwkdwjyjiznio\"},\"provisioningState\":\"Failed\"}") .toObject(NetworkRackProperties.class); - Assertions.assertEquals("yuf", model.annotation()); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.networkRackType()); - Assertions.assertEquals("gndj", model.networkFabricId()); + Assertions.assertEquals("hnmizhvprhqq", model.annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.networkRackType()); + Assertions.assertEquals("blehhkplo", model.networkFabricId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkRackProperties model = new NetworkRackProperties().withAnnotation("yuf") - .withNetworkRackType(NetworkRackType.COMPUTE) - .withNetworkFabricId("gndj"); + NetworkRackProperties model = new NetworkRackProperties().withAnnotation("hnmizhvprhqq") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withNetworkFabricId("blehhkplo"); model = BinaryData.fromObject(model).toObject(NetworkRackProperties.class); - Assertions.assertEquals("yuf", model.annotation()); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.networkRackType()); - Assertions.assertEquals("gndj", model.networkFabricId()); + Assertions.assertEquals("hnmizhvprhqq", model.annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, model.networkRackType()); + Assertions.assertEquals("blehhkplo", model.networkFabricId()); } } 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 index 88e19c65b406..13473e6a3c73 100644 --- 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 @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -24,30 +25,30 @@ public final class NetworkRacksCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"riettnmi\",\"networkDevices\":[\"b\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"mbyqyekuw\"},\"location\":\"xz\",\"tags\":{\"ydogr\":\"u\",\"qjdxiiqwqbvanvg\":\"fwzecgbxrcse\",\"xnksmae\":\"xnaaiitnkruyw\",\"ovbgrqwfuxntuegy\":\"drxjsmrseaux\"},\"id\":\"leketk\",\"name\":\"iptqhatfg\",\"type\":\"hhbxgfhgkdm\"}"; + = "{\"properties\":{\"annotation\":\"yvecruhqym\",\"networkRackType\":\"Combined\",\"networkFabricId\":\"thkt\",\"networkDevices\":[\"jkhlpgtpgx\"],\"lastOperation\":{\"details\":\"ypxwlvthiv\"},\"provisioningState\":\"Succeeded\"},\"location\":\"xoswqwbhl\",\"tags\":{\"z\":\"gkcnpdkwerxfezl\",\"vofrenuvp\":\"ekvsuzyowra\",\"tfpbxnret\":\"pltnyyeyj\",\"xtoh\":\"g\"},\"id\":\"uqtximrxey\",\"name\":\"zynxbuvyglfyfcs\",\"type\":\"kjhoxtbsyb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkRack response = manager.networkRacks() - .define("uhhnrmmfzfkhfnz") - .withRegion("fupnypluiv") - .withExistingResourceGroup("yhx") - .withNetworkFabricId("ajhtvbskgciedlq") - .withTags(mapOf("pespebiegzxru", "elauz")) - .withNetworkRackType(NetworkRackType.AGGREGATE) - .withAnnotation("buugchjtpszc") + .define("v") + .withRegion("ixor") + .withExistingResourceGroup("kt") + .withProperties(new NetworkRackProperties().withAnnotation("vzixmusiidivbbrt") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withNetworkFabricId("iqnt")) + .withTags(mapOf("ekbpqghxdpg", "rxmptuf", "ixjudbiac", "hfimlyxd")) .create(); - Assertions.assertEquals("xz", response.location()); - Assertions.assertEquals("u", response.tags().get("ydogr")); - Assertions.assertEquals(NetworkRackType.COMBINED, response.networkRackType()); - Assertions.assertEquals("riettnmi", response.networkFabricId()); - Assertions.assertEquals("mbyqyekuw", response.annotation()); + Assertions.assertEquals("xoswqwbhl", response.location()); + Assertions.assertEquals("gkcnpdkwerxfezl", response.tags().get("z")); + Assertions.assertEquals("yvecruhqym", response.properties().annotation()); + Assertions.assertEquals(NetworkRackType.COMBINED, response.properties().networkRackType()); + Assertions.assertEquals("thkt", response.properties().networkFabricId()); } // Use "Map.of" if available 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 index 39ece42bef0d..1030dd9ade99 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.nio.charset.StandardCharsets; @@ -22,23 +22,23 @@ public final class NetworkRacksGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"jgptxvzhyun\",\"networkDevices\":[\"fjjsel\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"f\"},\"location\":\"pn\",\"tags\":{\"tytrivfle\":\"wfmf\"},\"id\":\"vefnzv\",\"name\":\"miwbaksz\",\"type\":\"cmscezasjyil\"}"; + = "{\"properties\":{\"annotation\":\"tnsnb\",\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"vqhodfmortrsnpb\",\"networkDevices\":[\"gnjkkmkzfbjucgb\",\"zjyrdiiwhmrhzq\"],\"lastOperation\":{\"details\":\"jydwmaq\"},\"provisioningState\":\"Updating\"},\"location\":\"puadpq\",\"tags\":{\"qlvlbjzscrjtn\":\"csvzugiurh\",\"pobjufksddxk\":\"b\",\"lsrguecbthauivg\":\"iwxlylxfpvoylf\"},\"id\":\"ime\",\"name\":\"edqgyrvulz\",\"type\":\"uvckpdpdcnrjqs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkRack response = manager.networkRacks() - .getByResourceGroupWithResponse("tkvoivcktjscjkex", "bx", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("hsqvubwwqgiyu", "nrvwjxmwalh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pn", response.location()); - Assertions.assertEquals("wfmf", response.tags().get("tytrivfle")); - Assertions.assertEquals(NetworkRackType.AGGREGATE, response.networkRackType()); - Assertions.assertEquals("jgptxvzhyun", response.networkFabricId()); - Assertions.assertEquals("f", response.annotation()); + Assertions.assertEquals("puadpq", response.location()); + Assertions.assertEquals("csvzugiurh", response.tags().get("qlvlbjzscrjtn")); + Assertions.assertEquals("tnsnb", response.properties().annotation()); + Assertions.assertEquals(NetworkRackType.AGGREGATE, response.properties().networkRackType()); + Assertions.assertEquals("vqhodfmortrsnpb", response.properties().networkFabricId()); } } 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 index 911f8802a3ec..e0f18b9d6e28 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.nio.charset.StandardCharsets; @@ -23,22 +23,22 @@ public final class NetworkRacksListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"ddxe\",\"networkDevices\":[\"mxbyzfjgrep\"],\"provisioningState\":\"Canceled\",\"annotation\":\"crtv\"},\"location\":\"wpvqrexlu\",\"tags\":{\"jdrf\":\"lqwbrfiovpdl\"},\"id\":\"werlbc\",\"name\":\"trvirdfs\",\"type\":\"swpvnloopzyz\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"etiznnnadnp\",\"networkRackType\":\"Combined\",\"networkFabricId\":\"px\",\"networkDevices\":[\"rqgxnhf\",\"ccd\"],\"lastOperation\":{\"details\":\"yb\"},\"provisioningState\":\"Deleting\"},\"location\":\"mpmeglolpotclmb\",\"tags\":{\"m\":\"jryt\",\"j\":\"no\",\"lrxytra\":\"tnnthjqgovvi\",\"twyt\":\"e\"},\"id\":\"vpiilgy\",\"name\":\"luolgspyqsapnh\",\"type\":\"vpbuk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkRacks().listByResourceGroup("vtrox", com.azure.core.util.Context.NONE); + = manager.networkRacks().listByResourceGroup("ikqdqiybqtlvofj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wpvqrexlu", response.iterator().next().location()); - Assertions.assertEquals("lqwbrfiovpdl", response.iterator().next().tags().get("jdrf")); - Assertions.assertEquals(NetworkRackType.COMBINED, response.iterator().next().networkRackType()); - Assertions.assertEquals("ddxe", response.iterator().next().networkFabricId()); - Assertions.assertEquals("crtv", response.iterator().next().annotation()); + Assertions.assertEquals("mpmeglolpotclmb", response.iterator().next().location()); + Assertions.assertEquals("jryt", response.iterator().next().tags().get("m")); + Assertions.assertEquals("etiznnnadnp", response.iterator().next().properties().annotation()); + Assertions.assertEquals(NetworkRackType.COMBINED, response.iterator().next().properties().networkRackType()); + Assertions.assertEquals("px", response.iterator().next().properties().networkFabricId()); } } 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 index 4168798ab32a..60de310f9f3e 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.nio.charset.StandardCharsets; @@ -23,21 +23,21 @@ public final class NetworkRacksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkRackType\":\"Combined\",\"networkFabricId\":\"htabhacjlfq\",\"networkDevices\":[\"lvvwvpf\",\"tpvzhmlnfvy\",\"dhf\",\"nsd\"],\"provisioningState\":\"Canceled\",\"annotation\":\"bxnlkmazhlewyr\"},\"location\":\"sayehfz\",\"tags\":{\"tkgmwxzlphzujkqa\":\"yqtmdhb\"},\"id\":\"bejhxopehel\",\"name\":\"sykhdapxdiibjj\",\"type\":\"uekhh\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"rqviyfksegwezgf\",\"networkRackType\":\"Combined\",\"networkFabricId\":\"jtcpdtd\",\"networkDevices\":[\"ogzbasjc\"],\"lastOperation\":{\"details\":\"i\"},\"provisioningState\":\"Failed\"},\"location\":\"jmnv\",\"tags\":{\"ebgkxxpk\":\"mnkrqdyc\",\"bcgsa\":\"qr\"},\"id\":\"daypx\",\"name\":\"qedft\",\"type\":\"igmj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkRacks().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("sayehfz", response.iterator().next().location()); - Assertions.assertEquals("yqtmdhb", response.iterator().next().tags().get("tkgmwxzlphzujkqa")); - Assertions.assertEquals(NetworkRackType.COMBINED, response.iterator().next().networkRackType()); - Assertions.assertEquals("htabhacjlfq", response.iterator().next().networkFabricId()); - Assertions.assertEquals("bxnlkmazhlewyr", response.iterator().next().annotation()); + Assertions.assertEquals("jmnv", response.iterator().next().location()); + Assertions.assertEquals("mnkrqdyc", response.iterator().next().tags().get("ebgkxxpk")); + Assertions.assertEquals("rqviyfksegwezgf", response.iterator().next().properties().annotation()); + Assertions.assertEquals(NetworkRackType.COMBINED, response.iterator().next().properties().networkRackType()); + Assertions.assertEquals("jtcpdtd", response.iterator().next().properties().networkFabricId()); } } 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 941224059bb6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.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.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; -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\":{\"networkRackType\":\"Compute\",\"networkFabricId\":\"htujcyohigimwdc\",\"networkDevices\":[\"kqnqvkixnmbzme\"],\"provisioningState\":\"Accepted\",\"annotation\":\"zwimbzayspz\"},\"location\":\"i\",\"tags\":{\"pvdvatlzmgs\":\"fphmdzxplg\"},\"id\":\"hnzrsbkkzovlzdm\",\"name\":\"fmfws\",\"type\":\"afofu\"},{\"properties\":{\"networkRackType\":\"Aggregate\",\"networkFabricId\":\"immovzwd\",\"networkDevices\":[\"kmvhzfo\",\"anyrvaprtgelgwe\",\"ikfyaqandm\",\"mnqoqjum\"],\"provisioningState\":\"Deleting\",\"annotation\":\"bpbvzopaxmf\"},\"location\":\"smcwoxfaxd\",\"tags\":{\"bsat\":\"i\"},\"id\":\"oiauesugmocpcj\",\"name\":\"cboe\",\"type\":\"rgttw\"},{\"properties\":{\"networkRackType\":\"Compute\",\"networkFabricId\":\"siuorinikcedpk\",\"networkDevices\":[\"wmmtmqrxrzq\"],\"provisioningState\":\"Canceled\",\"annotation\":\"zyayubtgmbxi\"},\"location\":\"hragpxmib\",\"tags\":{\"ovyzt\":\"upoyryefqm\",\"ceeg\":\"lnomfpb\",\"ukkrehyh\":\"yieztkutnjil\",\"fvulxfaryr\":\"mjodu\"},\"id\":\"jlgdez\",\"name\":\"jqwahoyi\",\"type\":\"axqvjweiwtczkddn\"}],\"nextLink\":\"vbooqbmdqrxy\"}") - .toObject(NetworkRacksListResult.class); - Assertions.assertEquals("i", model.value().get(0).location()); - Assertions.assertEquals("fphmdzxplg", model.value().get(0).tags().get("pvdvatlzmgs")); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.value().get(0).networkRackType()); - Assertions.assertEquals("htujcyohigimwdc", model.value().get(0).networkFabricId()); - Assertions.assertEquals("zwimbzayspz", model.value().get(0).annotation()); - Assertions.assertEquals("vbooqbmdqrxy", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRacksListResult model = new NetworkRacksListResult().withValue(Arrays.asList( - new NetworkRackInner().withLocation("i") - .withTags(mapOf("pvdvatlzmgs", "fphmdzxplg")) - .withNetworkRackType(NetworkRackType.COMPUTE) - .withNetworkFabricId("htujcyohigimwdc") - .withAnnotation("zwimbzayspz"), - new NetworkRackInner().withLocation("smcwoxfaxd") - .withTags(mapOf("bsat", "i")) - .withNetworkRackType(NetworkRackType.AGGREGATE) - .withNetworkFabricId("immovzwd") - .withAnnotation("bpbvzopaxmf"), - new NetworkRackInner().withLocation("hragpxmib") - .withTags( - mapOf("ovyzt", "upoyryefqm", "ceeg", "lnomfpb", "ukkrehyh", "yieztkutnjil", "fvulxfaryr", "mjodu")) - .withNetworkRackType(NetworkRackType.COMPUTE) - .withNetworkFabricId("siuorinikcedpk") - .withAnnotation("zyayubtgmbxi"))) - .withNextLink("vbooqbmdqrxy"); - model = BinaryData.fromObject(model).toObject(NetworkRacksListResult.class); - Assertions.assertEquals("i", model.value().get(0).location()); - Assertions.assertEquals("fphmdzxplg", model.value().get(0).tags().get("pvdvatlzmgs")); - Assertions.assertEquals(NetworkRackType.COMPUTE, model.value().get(0).networkRackType()); - Assertions.assertEquals("htujcyohigimwdc", model.value().get(0).networkFabricId()); - Assertions.assertEquals("zwimbzayspz", model.value().get(0).annotation()); - Assertions.assertEquals("vbooqbmdqrxy", model.nextLink()); - } - - // Use "Map.of" if available - @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/NetworkTapInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java index 81a9aaf2012d..5c80841343a5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapInnerTests.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; 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.NetworkTapProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import java.util.HashMap; @@ -20,63 +21,50 @@ public final class NetworkTapInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapInner model = BinaryData.fromString( - "{\"properties\":{\"networkPacketBrokerId\":\"gage\",\"sourceTapRuleId\":\"qbugihcdv\",\"destinations\":[{\"name\":\"zorbloejzsax\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"wvdeppjnaphifkf\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"bpebrmj\",\"nfpgh\"]},\"destinationTapRuleId\":\"ttpkims\"},{\"name\":\"nkkhbykr\",\"destinationType\":\"Direct\",\"destinationId\":\"cmelycpgokut\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"zbnv\",\"sh\"]},\"destinationTapRuleId\":\"zzlapyixlvzc\"},{\"name\":\"laebxiau\",\"destinationType\":\"Direct\",\"destinationId\":\"tessjlwjta\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"kx\",\"xqayg\",\"slkvcvwp\"]},\"destinationTapRuleId\":\"cj\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"annotation\":\"onbwhi\"},\"location\":\"yozvrcwfpucw\",\"tags\":{\"oarx\":\"gqefgzjvbxqcb\"},\"id\":\"uuciagvkdlhu\",\"name\":\"u\",\"type\":\"lbjo\"}") + "{\"properties\":{\"annotation\":\"nnhbcjywkdywks\",\"networkPacketBrokerId\":\"avuafanefic\",\"sourceTapRuleId\":\"tplkos\",\"destinations\":[{\"name\":\"bzvxpzwdqzuh\",\"destinationType\":\"Direct\",\"destinationId\":\"tiaczhfjdccjny\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"h\",\"cgjtjk\"]},\"destinationTapRuleId\":\"omnlzthcdbszsbz\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"vid\"},\"configurationState\":\"Rejected\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"ctqxa\",\"tags\":{\"yzgavplnd\":\"oezvwk\",\"aeknfffy\":\"dfiekkiskyy\"},\"id\":\"hdawjl\",\"name\":\"lc\",\"type\":\"fbbj\"}") .toObject(NetworkTapInner.class); - Assertions.assertEquals("yozvrcwfpucw", model.location()); - Assertions.assertEquals("gqefgzjvbxqcb", model.tags().get("oarx")); - Assertions.assertEquals("gage", model.networkPacketBrokerId()); - Assertions.assertEquals("zorbloejzsax", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); - Assertions.assertEquals("wvdeppjnaphifkf", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("bpebrmj", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ttpkims", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.pollingType()); - Assertions.assertEquals("onbwhi", model.annotation()); + Assertions.assertEquals("ctqxa", model.location()); + Assertions.assertEquals("oezvwk", model.tags().get("yzgavplnd")); + Assertions.assertEquals("nnhbcjywkdywks", model.properties().annotation()); + Assertions.assertEquals("avuafanefic", model.properties().networkPacketBrokerId()); + Assertions.assertEquals("bzvxpzwdqzuh", model.properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, model.properties().destinations().get(0).destinationType()); + Assertions.assertEquals("tiaczhfjdccjny", model.properties().destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + model.properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("h", + model.properties().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("omnlzthcdbszsbz", model.properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, model.properties().pollingType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapInner model = new NetworkTapInner().withLocation("yozvrcwfpucw") - .withTags(mapOf("oarx", "gqefgzjvbxqcb")) - .withNetworkPacketBrokerId("gage") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("zorbloejzsax") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("wvdeppjnaphifkf") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("bpebrmj", "nfpgh"))) - .withDestinationTapRuleId("ttpkims"), - new NetworkTapPropertiesDestinationsItem().withName("nkkhbykr") + NetworkTapInner model = new NetworkTapInner().withLocation("ctqxa") + .withTags(mapOf("yzgavplnd", "oezvwk", "aeknfffy", "dfiekkiskyy")) + .withProperties(new NetworkTapProperties().withAnnotation("nnhbcjywkdywks") + .withNetworkPacketBrokerId("avuafanefic") + .withDestinations(Arrays.asList(new DestinationProperties().withName("bzvxpzwdqzuh") .withDestinationType(DestinationType.DIRECT) - .withDestinationId("cmelycpgokut") + .withDestinationId("tiaczhfjdccjny") .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("zbnv", "sh"))) - .withDestinationTapRuleId("zzlapyixlvzc"), - new NetworkTapPropertiesDestinationsItem().withName("laebxiau") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("tessjlwjta") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("kx", "xqayg", "slkvcvwp"))) - .withDestinationTapRuleId("cj"))) - .withPollingType(PollingType.PULL) - .withAnnotation("onbwhi"); + .withNeighborGroupIds(Arrays.asList("h", "cgjtjk"))) + .withDestinationTapRuleId("omnlzthcdbszsbz"))) + .withPollingType(PollingType.PUSH)); model = BinaryData.fromObject(model).toObject(NetworkTapInner.class); - Assertions.assertEquals("yozvrcwfpucw", model.location()); - Assertions.assertEquals("gqefgzjvbxqcb", model.tags().get("oarx")); - Assertions.assertEquals("gage", model.networkPacketBrokerId()); - Assertions.assertEquals("zorbloejzsax", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); - Assertions.assertEquals("wvdeppjnaphifkf", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("bpebrmj", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ttpkims", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.pollingType()); - Assertions.assertEquals("onbwhi", model.annotation()); + Assertions.assertEquals("ctqxa", model.location()); + Assertions.assertEquals("oezvwk", model.tags().get("yzgavplnd")); + Assertions.assertEquals("nnhbcjywkdywks", model.properties().annotation()); + Assertions.assertEquals("avuafanefic", model.properties().networkPacketBrokerId()); + Assertions.assertEquals("bzvxpzwdqzuh", model.properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, model.properties().destinations().get(0).destinationType()); + Assertions.assertEquals("tiaczhfjdccjny", model.properties().destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + model.properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("h", + model.properties().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("omnlzthcdbszsbz", model.properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, model.properties().pollingType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapListResultTests.java new file mode 100644 index 000000000000..dec396e8a59d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapListResultTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapListResult; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"lvzkfekde\",\"networkPacketBrokerId\":\"bpjqtllb\",\"sourceTapRuleId\":\"jpduibsrrrqnn\",\"destinations\":[{\"name\":\"rypyurv\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"hovtuercp\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"wc\"},{\"name\":\"yb\",\"destinationType\":\"Direct\",\"destinationId\":\"zycxhaoegjzg\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"bnwc\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"cbybicqhxhjpu\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"MAT\"},\"location\":\"mu\",\"tags\":{\"enndzgthdzit\":\"wuycuo\",\"vswtwonadezm\":\"zffpherwj\"},\"id\":\"xvfybxmmr\",\"name\":\"nuvqkrrsguog\",\"type\":\"c\"}],\"nextLink\":\"otpyabensjflw\"}") + .toObject(NetworkTapListResult.class); + Assertions.assertEquals("mu", model.value().get(0).location()); + Assertions.assertEquals("wuycuo", model.value().get(0).tags().get("enndzgthdzit")); + Assertions.assertEquals("lvzkfekde", model.value().get(0).properties().annotation()); + Assertions.assertEquals("bpjqtllb", model.value().get(0).properties().networkPacketBrokerId()); + Assertions.assertEquals("rypyurv", model.value().get(0).properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + model.value().get(0).properties().destinations().get(0).destinationType()); + Assertions.assertEquals("hovtuercp", model.value().get(0).properties().destinations().get(0).destinationId()); + Assertions.assertEquals("wc", model.value().get(0).properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, model.value().get(0).properties().pollingType()); + Assertions.assertEquals("otpyabensjflw", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java new file mode 100644 index 000000000000..fe06fc8421a9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchPropertiesTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapPatchProperties model = BinaryData.fromString( + "{\"annotation\":\"nk\",\"pollingType\":\"Pull\",\"destinations\":[{\"name\":\"kvorlfqm\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ynb\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"urkmjufavvlnpbso\",\"m\",\"nklnmrz\",\"mtvrkkfcwxi\"]},\"destinationTapRuleId\":\"stxneykeipxu\"},{\"name\":\"bvriu\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"zxtvsayyaeiivj\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"rvewojoqfx\",\"etx\",\"dqiuspguzljvgji\",\"zq\"]},\"destinationTapRuleId\":\"ljsazmjsisfq\"},{\"name\":\"cm\",\"destinationType\":\"Direct\",\"destinationId\":\"sbfe\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ygllfkchhgsjuzzc\",\"jlwmqc\",\"cabaam\",\"khdhpmkxdujkxpuq\"]},\"destinationTapRuleId\":\"yoqy\"},{\"name\":\"uarpzhr\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"xizdsyxbfj\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"ccouhwivkdf\",\"jsk\"]},\"destinationTapRuleId\":\"bxzepirtv\"}]}") + .toObject(NetworkTapPatchProperties.class); + Assertions.assertEquals("nk", model.annotation()); + Assertions.assertEquals(PollingType.PULL, model.pollingType()); + Assertions.assertEquals("kvorlfqm", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("ynb", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + model.destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("urkmjufavvlnpbso", + model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("stxneykeipxu", model.destinations().get(0).destinationTapRuleId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapPatchProperties model = new NetworkTapPatchProperties().withAnnotation("nk") + .withPollingType(PollingType.PULL) + .withDestinations(Arrays.asList(new DestinationPatchProperties().withName("kvorlfqm") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("ynb") + .withIsolationDomainProperties(new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("urkmjufavvlnpbso", "m", "nklnmrz", "mtvrkkfcwxi"))) + .withDestinationTapRuleId("stxneykeipxu"), + new DestinationPatchProperties().withName("bvriu") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("zxtvsayyaeiivj") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("rvewojoqfx", "etx", "dqiuspguzljvgji", "zq"))) + .withDestinationTapRuleId("ljsazmjsisfq"), + new DestinationPatchProperties().withName("cm") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("sbfe") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds( + Arrays.asList("ygllfkchhgsjuzzc", "jlwmqc", "cabaam", "khdhpmkxdujkxpuq"))) + .withDestinationTapRuleId("yoqy"), + new DestinationPatchProperties().withName("uarpzhr") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("xizdsyxbfj") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("ccouhwivkdf", "jsk"))) + .withDestinationTapRuleId("bxzepirtv"))); + model = BinaryData.fromObject(model).toObject(NetworkTapPatchProperties.class); + Assertions.assertEquals("nk", model.annotation()); + Assertions.assertEquals(PollingType.PULL, model.pollingType()); + Assertions.assertEquals("kvorlfqm", model.destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinations().get(0).destinationType()); + Assertions.assertEquals("ynb", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + model.destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("urkmjufavvlnpbso", + model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("stxneykeipxu", model.destinations().get(0).destinationTapRuleId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java index 26f91ba02dcd..36ef56680e93 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchTests.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationPatchProperties; 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.IsolationDomainPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import java.util.HashMap; @@ -20,58 +21,55 @@ public final class NetworkTapPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapPatch model = BinaryData.fromString( - "{\"properties\":{\"pollingType\":\"Push\",\"destinations\":[{\"name\":\"zsyqagqllcbrvaid\",\"destinationType\":\"Direct\",\"destinationId\":\"htrrqwfy\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"jrnogykugdl\",\"vsa\",\"gthkslgeu\",\"fkbzbfbxjblajy\"]},\"destinationTapRuleId\":\"nbycs\"},{\"name\":\"oisaz\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"fsvpzxg\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"mlfjymgw\"]},\"destinationTapRuleId\":\"szcfyzqpeqreg\"},{\"name\":\"rdpagknxmaovr\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"nzf\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ycjcgeipqxxsdy\",\"fwtyd\"]},\"destinationTapRuleId\":\"mabhgc\"}],\"annotation\":\"jqzhpvhxpba\"},\"tags\":{\"qscjpvqerqxk\":\"eullgfyog\",\"zlhcu\":\"mwdz\",\"qpwwvmbjecfwlbgh\":\"x\"}}") + "{\"tags\":{\"dfkn\":\"cfebpiucenbvrll\"},\"properties\":{\"annotation\":\"wi\",\"pollingType\":\"Pull\",\"destinations\":[{\"name\":\"qjzlwrduxntp\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"jahy\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"qv\"]},\"destinationTapRuleId\":\"fbkqynlzxem\"},{\"name\":\"upjckiehdm\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"rx\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"cuans\",\"eervgc\",\"csapvbcqpfus\"]},\"destinationTapRuleId\":\"ijhmi\"}]}}") .toObject(NetworkTapPatch.class); - Assertions.assertEquals("eullgfyog", model.tags().get("qscjpvqerqxk")); - Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("htrrqwfy", model.destinations().get(0).destinationId()); + Assertions.assertEquals("cfebpiucenbvrll", model.tags().get("dfkn")); + Assertions.assertEquals("wi", model.properties().annotation()); + Assertions.assertEquals(PollingType.PULL, model.properties().pollingType()); + Assertions.assertEquals("qjzlwrduxntp", model.properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + model.properties().destinations().get(0).destinationType()); + Assertions.assertEquals("jahy", model.properties().destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("jrnogykugdl", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("nbycs", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals("jqzhpvhxpba", model.annotation()); + model.properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("qv", + model.properties().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("fbkqynlzxem", model.properties().destinations().get(0).destinationTapRuleId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapPatch model = new NetworkTapPatch() - .withTags(mapOf("qscjpvqerqxk", "eullgfyog", "zlhcu", "mwdz", "qpwwvmbjecfwlbgh", "x")) - .withPollingType(PollingType.PUSH) - .withDestinations(Arrays.asList( - new NetworkTapPatchableParametersDestinationsItem().withName("zsyqagqllcbrvaid") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("htrrqwfy") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("jrnogykugdl", "vsa", "gthkslgeu", "fkbzbfbxjblajy"))) - .withDestinationTapRuleId("nbycs"), - new NetworkTapPatchableParametersDestinationsItem().withName("oisaz") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("fsvpzxg") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("mlfjymgw"))) - .withDestinationTapRuleId("szcfyzqpeqreg"), - new NetworkTapPatchableParametersDestinationsItem().withName("rdpagknxmaovr") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("nzf") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("ycjcgeipqxxsdy", "fwtyd"))) - .withDestinationTapRuleId("mabhgc"))) - .withAnnotation("jqzhpvhxpba"); + NetworkTapPatch model = new NetworkTapPatch().withTags(mapOf("dfkn", "cfebpiucenbvrll")) + .withProperties(new NetworkTapPatchProperties().withAnnotation("wi") + .withPollingType(PollingType.PULL) + .withDestinations(Arrays.asList( + new DestinationPatchProperties().withName("qjzlwrduxntp") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("jahy") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("qv"))) + .withDestinationTapRuleId("fbkqynlzxem"), + new DestinationPatchProperties().withName("upjckiehdm") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId("rx") + .withIsolationDomainProperties( + new IsolationDomainPatchProperties().withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds(Arrays.asList("cuans", "eervgc", "csapvbcqpfus"))) + .withDestinationTapRuleId("ijhmi")))); model = BinaryData.fromObject(model).toObject(NetworkTapPatch.class); - Assertions.assertEquals("eullgfyog", model.tags().get("qscjpvqerqxk")); - Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("htrrqwfy", model.destinations().get(0).destinationId()); + Assertions.assertEquals("cfebpiucenbvrll", model.tags().get("dfkn")); + Assertions.assertEquals("wi", model.properties().annotation()); + Assertions.assertEquals(PollingType.PULL, model.properties().pollingType()); + Assertions.assertEquals("qjzlwrduxntp", model.properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + model.properties().destinations().get(0).destinationType()); + Assertions.assertEquals("jahy", model.properties().destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("jrnogykugdl", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("nbycs", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals("jqzhpvhxpba", model.annotation()); + model.properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("qv", + model.properties().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("fbkqynlzxem", model.properties().destinations().get(0).destinationTapRuleId()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java deleted file mode 100644 index d457f97ccc28..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersDestinationsItemTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 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.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapPatchableParametersDestinationsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapPatchableParametersDestinationsItem model = BinaryData.fromString( - "{\"name\":\"agwiijc\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"whxpsbapial\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"uzudegefxl\"]},\"destinationTapRuleId\":\"ggo\"}") - .toObject(NetworkTapPatchableParametersDestinationsItem.class); - Assertions.assertEquals("agwiijc", model.name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("whxpsbapial", model.destinationId()); - Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("uzudegefxl", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ggo", model.destinationTapRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapPatchableParametersDestinationsItem model - = new NetworkTapPatchableParametersDestinationsItem().withName("agwiijc") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("whxpsbapial") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("uzudegefxl"))) - .withDestinationTapRuleId("ggo"); - model = BinaryData.fromObject(model).toObject(NetworkTapPatchableParametersDestinationsItem.class); - Assertions.assertEquals("agwiijc", model.name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, model.destinationType()); - Assertions.assertEquals("whxpsbapial", model.destinationId()); - Assertions.assertEquals(Encapsulation.NONE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("uzudegefxl", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("ggo", model.destinationTapRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.java deleted file mode 100644 index 13094a5a6cb4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPatchableParametersTests.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.NetworkTapPatchableParameters; -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.NetworkTapPatchableParametersDestinationsItem; -import com.azure.resourcemanager.managednetworkfabric.models.PollingType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapPatchableParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapPatchableParameters model = BinaryData.fromString( - "{\"pollingType\":\"Push\",\"destinations\":[{\"name\":\"oh\",\"destinationType\":\"Direct\",\"destinationId\":\"njzpchiypbfhmi\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"zewbrsrjzgkbr\",\"uxboufqnnqbjxgj\"]},\"destinationTapRuleId\":\"rerukbuudrizw\"},{\"name\":\"kjxl\",\"destinationType\":\"Direct\",\"destinationId\":\"dikqelssybz\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"rommkiqhypwt\",\"zyjj\"]},\"destinationTapRuleId\":\"t\"}],\"annotation\":\"zql\"}") - .toObject(NetworkTapPatchableParameters.class); - Assertions.assertEquals("zql", model.annotation()); - Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("oh", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("njzpchiypbfhmi", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.GRE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("zewbrsrjzgkbr", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rerukbuudrizw", model.destinations().get(0).destinationTapRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapPatchableParameters model = new NetworkTapPatchableParameters().withAnnotation("zql") - .withPollingType(PollingType.PUSH) - .withDestinations(Arrays.asList( - new NetworkTapPatchableParametersDestinationsItem().withName("oh") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("njzpchiypbfhmi") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("zewbrsrjzgkbr", "uxboufqnnqbjxgj"))) - .withDestinationTapRuleId("rerukbuudrizw"), - new NetworkTapPatchableParametersDestinationsItem().withName("kjxl") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("dikqelssybz") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("rommkiqhypwt", "zyjj"))) - .withDestinationTapRuleId("t"))); - model = BinaryData.fromObject(model).toObject(NetworkTapPatchableParameters.class); - Assertions.assertEquals("zql", model.annotation()); - Assertions.assertEquals(PollingType.PUSH, model.pollingType()); - Assertions.assertEquals("oh", model.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("njzpchiypbfhmi", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.GRE, - model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("zewbrsrjzgkbr", - model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("rerukbuudrizw", model.destinations().get(0).destinationTapRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java deleted file mode 100644 index f2324ee16ece..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesDestinationsItemTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 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.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapPropertiesDestinationsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapPropertiesDestinationsItem model = BinaryData.fromString( - "{\"name\":\"cfvvtdpcbpzfo\",\"destinationType\":\"Direct\",\"destinationId\":\"ugbrhfiwltkfys\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"klx\"]},\"destinationTapRuleId\":\"cvasyyh\"}") - .toObject(NetworkTapPropertiesDestinationsItem.class); - Assertions.assertEquals("cfvvtdpcbpzfo", model.name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); - Assertions.assertEquals("ugbrhfiwltkfys", model.destinationId()); - Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("klx", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("cvasyyh", model.destinationTapRuleId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapPropertiesDestinationsItem model - = new NetworkTapPropertiesDestinationsItem().withName("cfvvtdpcbpzfo") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("ugbrhfiwltkfys") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("klx"))) - .withDestinationTapRuleId("cvasyyh"); - model = BinaryData.fromObject(model).toObject(NetworkTapPropertiesDestinationsItem.class); - Assertions.assertEquals("cfvvtdpcbpzfo", model.name()); - Assertions.assertEquals(DestinationType.DIRECT, model.destinationType()); - Assertions.assertEquals("ugbrhfiwltkfys", model.destinationId()); - Assertions.assertEquals(Encapsulation.GRE, model.isolationDomainProperties().encapsulation()); - Assertions.assertEquals("klx", model.isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("cvasyyh", model.destinationTapRuleId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java index 0301397688db..4a9807c2edc9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapPropertiesTests.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapProperties; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; 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.NetworkTapProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,50 +18,56 @@ public final class NetworkTapPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapProperties model = BinaryData.fromString( - "{\"networkPacketBrokerId\":\"fmjfexulv\",\"sourceTapRuleId\":\"pknarse\",\"destinations\":[{\"name\":\"csqoacbuqdgs\",\"destinationType\":\"Direct\",\"destinationId\":\"q\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"vsz\",\"lvyakeszsuuvul\",\"qcwggchxvl\"]},\"destinationTapRuleId\":\"fbrvecicaovphirl\"},{\"name\":\"ipiunnepkwzzzku\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"cjomipvwkaujtt\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"bwofxxdplr\",\"lfkvga\",\"cbtuxlbpxrhrfjen\"]},\"destinationTapRuleId\":\"zwefiktlhqas\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"annotation\":\"secigzzdwj\"}") + "{\"annotation\":\"tfofhoajjylsyqyj\",\"networkPacketBrokerId\":\"ufzvlqquy\",\"sourceTapRuleId\":\"ceevogir\",\"destinations\":[{\"name\":\"w\",\"destinationType\":\"Direct\",\"destinationId\":\"tvuxeu\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"juax\"]},\"destinationTapRuleId\":\"dlypkcpwsrqn\"},{\"name\":\"mjund\",\"destinationType\":\"Direct\",\"destinationId\":\"xcltj\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"qak\",\"sihxvtac\"]},\"destinationTapRuleId\":\"fopxpryxnsbubw\"},{\"name\":\"zqqgug\",\"destinationType\":\"Direct\",\"destinationId\":\"uxahtqmmkdhwq\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"gmfpkeph\",\"jeucosvkkeergvy\",\"a\"]},\"destinationTapRuleId\":\"jpyillgnue\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"fbuqxknvmcgmb\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\"}") .toObject(NetworkTapProperties.class); - Assertions.assertEquals("secigzzdwj", model.annotation()); - Assertions.assertEquals("fmjfexulv", model.networkPacketBrokerId()); - Assertions.assertEquals("csqoacbuqdgs", model.destinations().get(0).name()); + Assertions.assertEquals("tfofhoajjylsyqyj", model.annotation()); + Assertions.assertEquals("ufzvlqquy", model.networkPacketBrokerId()); + Assertions.assertEquals("w", model.destinations().get(0).name()); Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("q", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("tvuxeu", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("vsz", + Assertions.assertEquals("juax", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("fbrvecicaovphirl", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.pollingType()); + Assertions.assertEquals("dlypkcpwsrqn", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, model.pollingType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapProperties model = new NetworkTapProperties().withAnnotation("secigzzdwj") - .withNetworkPacketBrokerId("fmjfexulv") + NetworkTapProperties model = new NetworkTapProperties().withAnnotation("tfofhoajjylsyqyj") + .withNetworkPacketBrokerId("ufzvlqquy") .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("csqoacbuqdgs") + new DestinationProperties().withName("w") .withDestinationType(DestinationType.DIRECT) - .withDestinationId("q") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("vsz", "lvyakeszsuuvul", "qcwggchxvl"))) - .withDestinationTapRuleId("fbrvecicaovphirl"), - new NetworkTapPropertiesDestinationsItem().withName("ipiunnepkwzzzku") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("cjomipvwkaujtt") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("bwofxxdplr", "lfkvga", "cbtuxlbpxrhrfjen"))) - .withDestinationTapRuleId("zwefiktlhqas"))) - .withPollingType(PollingType.PULL); + .withDestinationId("tvuxeu") + .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("juax"))) + .withDestinationTapRuleId("dlypkcpwsrqn"), + new DestinationProperties().withName("mjund") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("xcltj") + .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("qak", "sihxvtac"))) + .withDestinationTapRuleId("fopxpryxnsbubw"), + new DestinationProperties().withName("zqqgug") + .withDestinationType(DestinationType.DIRECT) + .withDestinationId("uxahtqmmkdhwq") + .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) + .withNeighborGroupIds(Arrays.asList("gmfpkeph", "jeucosvkkeergvy", "a"))) + .withDestinationTapRuleId("jpyillgnue"))) + .withPollingType(PollingType.PUSH); model = BinaryData.fromObject(model).toObject(NetworkTapProperties.class); - Assertions.assertEquals("secigzzdwj", model.annotation()); - Assertions.assertEquals("fmjfexulv", model.networkPacketBrokerId()); - Assertions.assertEquals("csqoacbuqdgs", model.destinations().get(0).name()); + Assertions.assertEquals("tfofhoajjylsyqyj", model.annotation()); + Assertions.assertEquals("ufzvlqquy", model.networkPacketBrokerId()); + Assertions.assertEquals("w", model.destinations().get(0).name()); Assertions.assertEquals(DestinationType.DIRECT, model.destinations().get(0).destinationType()); - Assertions.assertEquals("q", model.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, + Assertions.assertEquals("tvuxeu", model.destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, model.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("vsz", + Assertions.assertEquals("juax", model.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("fbrvecicaovphirl", model.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.pollingType()); + Assertions.assertEquals("dlypkcpwsrqn", model.destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, model.pollingType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java new file mode 100644 index 000000000000..79947c1718c8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionPatchTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleActionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleActionPatch model = BinaryData.fromString( + "{\"type\":\"Log\",\"truncate\":\"tgqrqkkvfygkuobp\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"pgobothx\",\"matchConfigurationName\":\"whpnyjtu\"}") + .toObject(NetworkTapRuleActionPatch.class); + Assertions.assertEquals(TapRuleActionType.LOG, model.type()); + Assertions.assertEquals("tgqrqkkvfygkuobp", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isTimestampEnabled()); + Assertions.assertEquals("pgobothx", model.destinationId()); + Assertions.assertEquals("whpnyjtu", model.matchConfigurationName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapRuleActionPatch model = new NetworkTapRuleActionPatch().withType(TapRuleActionType.LOG) + .withTruncate("tgqrqkkvfygkuobp") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("pgobothx") + .withMatchConfigurationName("whpnyjtu"); + model = BinaryData.fromObject(model).toObject(NetworkTapRuleActionPatch.class); + Assertions.assertEquals(TapRuleActionType.LOG, model.type()); + Assertions.assertEquals("tgqrqkkvfygkuobp", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isTimestampEnabled()); + Assertions.assertEquals("pgobothx", model.destinationId()); + Assertions.assertEquals("whpnyjtu", model.matchConfigurationName()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java index ab844a58b0e1..931caca413d8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,27 +14,27 @@ public final class NetworkTapRuleActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleAction model = BinaryData.fromString( - "{\"type\":\"Mirror\",\"truncate\":\"hczygpmg\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"lojhhyl\",\"matchConfigurationName\":\"evfiyymotu\"}") + "{\"type\":\"Drop\",\"truncate\":\"nviulbylmgjzr\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"bgumwhmxpuckns\",\"matchConfigurationName\":\"tlps\"}") .toObject(NetworkTapRuleAction.class); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.type()); - Assertions.assertEquals("hczygpmg", model.truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isTimestampEnabled()); - Assertions.assertEquals("lojhhyl", model.destinationId()); - Assertions.assertEquals("evfiyymotu", model.matchConfigurationName()); + Assertions.assertEquals(TapRuleActionType.DROP, model.type()); + Assertions.assertEquals("nviulbylmgjzr", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isTimestampEnabled()); + Assertions.assertEquals("bgumwhmxpuckns", model.destinationId()); + Assertions.assertEquals("tlps", model.matchConfigurationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleAction model = new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("hczygpmg") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("lojhhyl") - .withMatchConfigurationName("evfiyymotu"); + NetworkTapRuleAction model = new NetworkTapRuleAction().withType(TapRuleActionType.DROP) + .withTruncate("nviulbylmgjzr") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("bgumwhmxpuckns") + .withMatchConfigurationName("tlps"); model = BinaryData.fromObject(model).toObject(NetworkTapRuleAction.class); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.type()); - Assertions.assertEquals("hczygpmg", model.truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isTimestampEnabled()); - Assertions.assertEquals("lojhhyl", model.destinationId()); - Assertions.assertEquals("evfiyymotu", model.matchConfigurationName()); + Assertions.assertEquals(TapRuleActionType.DROP, model.type()); + Assertions.assertEquals("nviulbylmgjzr", model.truncate()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isTimestampEnabled()); + Assertions.assertEquals("bgumwhmxpuckns", model.destinationId()); + Assertions.assertEquals("tlps", model.matchConfigurationName()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java index e32700320141..54466cb7ab4c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -10,13 +10,15 @@ 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.GlobalNetworkTapRuleActionProperties; +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.NetworkTapRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; @@ -32,167 +34,318 @@ public final class NetworkTapRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleInner model = BinaryData.fromString( - "{\"properties\":{\"networkTapId\":\"ae\",\"pollingIntervalInSeconds\":90,\"lastSyncedTime\":\"2021-09-15T09:06:41Z\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"File\",\"tapRulesUrl\":\"fooy\",\"matchConfigurations\":[{\"matchConfigurationName\":\"dtzcqi\",\"sequenceNumber\":3768764619279475619,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"TCP\"},\"protocolTypes\":[\"xlantolamlbijuxk\",\"llczipvwdt\",\"ckzdqiqdlra\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"wxsuy\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"rfgslglhpry\",\"matchConfigurationName\":\"zihuioaeo\"}]},{\"matchConfigurationName\":\"ajtfey\",\"sequenceNumber\":8432449142241405654,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"beuuqutkzwtjwwg\",\"zytijcx\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"dydhqkkkb\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"catuqbhpowcnx\",\"matchConfigurationName\":\"zdlys\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"katprytgrhzbq\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wrp\"]}],\"vlanGroups\":[{\"name\":\"ht\",\"vlans\":[\"zcttbqgdirdam\"]},{\"name\":\"zjgcfjfx\",\"vlans\":[\"jjirmuydgftt\",\"dofgeoagfuoftnx\"]},{\"name\":\"wxmdaj\",\"vlans\":[\"g\",\"gsevmdm\"]},{\"name\":\"nlrstgf\",\"vlans\":[\"j\",\"n\",\"idt\",\"vamyyznmrgcdo\"]}],\"portGroups\":[{\"name\":\"cgytoxuw\",\"ports\":[\"nzqsaqmebgszpl\",\"sdekpdzz\"]}]},{\"ipGroups\":[{\"name\":\"pgvokyejidbd\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"nycwz\",\"lv\",\"wsnmrkkyjt\",\"epwpwfk\"]},{\"name\":\"uxuva\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"dofuckclb\"]},{\"name\":\"luevsolzwilfng\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"ebuuxjx\",\"fxfjwp\",\"kktpmbmxbmbr\",\"gzzxljbkhxsd\"]},{\"name\":\"au\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"weqjfyxydgto\",\"vq\",\"vwglgwzpv\",\"akglhpsesrfga\"]}],\"vlanGroups\":[{\"name\":\"dvxcgdhyhgoqgsoy\",\"vlans\":[\"yjrcbqpb\",\"spglq\",\"o\"]},{\"name\":\"dahneaoovty\",\"vlans\":[\"ivfwjlofze\",\"fsr\"]}],\"portGroups\":[{\"name\":\"la\",\"ports\":[\"foc\",\"hapejov\"]},{\"name\":\"wxn\",\"ports\":[\"hnoyrzaaoeeh\",\"mjenvjeatea\",\"xc\"]},{\"name\":\"oxdjxldnaryy\",\"ports\":[\"kd\",\"lrndwdbvxvza\",\"edoyqxlunkft\",\"mcxqqxmyzklao\"]}]},{\"ipGroups\":[{\"name\":\"hrvmzrqrazadi\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"aslkskhjqjpvba\",\"hxjtgzgtai\"]},{\"name\":\"b\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"gbsfsgsaenwldf\",\"hljqlxsp\",\"rjc\"]}],\"vlanGroups\":[{\"name\":\"dsxebuhsxrz\",\"vlans\":[\"sdaluyckhefrbhs\",\"uerbgpxebjl\",\"dcaytujraxd\"]}],\"portGroups\":[{\"name\":\"jmgtnsew\",\"ports\":[\"ly\"]},{\"name\":\"vvyljurkepose\",\"ports\":[\"ylmpctwjwdsd\",\"zmk\",\"erxxxoteehkhowgo\",\"vvh\"]},{\"name\":\"wpcbapnpxr\",\"ports\":[\"wbmpspfeylqloc\",\"vujex\"]}]}],\"annotation\":\"glxrkgjnm\"},\"location\":\"aslavxj\",\"tags\":{\"pieidzlvssqy\":\"o\"},\"id\":\"jopackyhydv\",\"name\":\"kmfngpmillxgjs\",\"type\":\"izwgsoriobijeiyd\"}") + "{\"properties\":{\"annotation\":\"ubohxvzg\",\"configurationType\":\"File\",\"tapRulesUrl\":\"vrhhogalgx\",\"matchConfigurations\":[{\"matchConfigurationName\":\"zvzt\",\"sequenceNumber\":6876747214811513629,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"cssanybzzghv\",\"fe\",\"myjsvcdhly\",\"kh\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"SCTP\"}},{\"protocolTypes\":[\"zriwgoewap\",\"qksa\",\"ap\",\"j\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"TCP\"}},{\"protocolTypes\":[\"sdfpvdaahlf\",\"cqklpmvzpire\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"SCTP\"}},{\"protocolTypes\":[\"bmfggeokfekcjjlw\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"TCP\"}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"nrfcqu\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"hpi\",\"matchConfigurationName\":\"wrerj\"},{\"type\":\"Log\",\"truncate\":\"chdwyqqidqi\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"bfjm\",\"matchConfigurationName\":\"jvxlhmpmh\"},{\"type\":\"Replicate\",\"truncate\":\"aphqeofytl\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"wmcm\",\"matchConfigurationName\":\"ixuanccqvjfdgfq\"},{\"type\":\"Goto\",\"truncate\":\"xpjhcfaaradci\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"fzgugrbl\",\"matchConfigurationName\":\"l\"}]},{\"matchConfigurationName\":\"ssnqe\",\"sequenceNumber\":5966617785837338272,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"manxx\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"SCTP\"}},{\"protocolTypes\":[\"vtamqwzmnobfew\",\"psibxovuqo\",\"jrkblndyclwgycv\",\"qnzjcyqqz\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"}},{\"protocolTypes\":[\"lbadp\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"TCP\"}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"looubsfx\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"opskgocjomlupfa\",\"matchConfigurationName\":\"sj\"},{\"type\":\"Count\",\"truncate\":\"slgdwz\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"yxajc\",\"matchConfigurationName\":\"rcavqcwyzoqzkmq\"},{\"type\":\"Log\",\"truncate\":\"jnk\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"pbntqqwwgf\",\"matchConfigurationName\":\"qxilefejs\"},{\"type\":\"Log\",\"truncate\":\"ne\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"nttwk\",\"matchConfigurationName\":\"ajksbs\"}]},{\"matchConfigurationName\":\"gjmqjhgcydijnmcv\",\"sequenceNumber\":5656997553780950233,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"zixtd\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"UDP\"}},{\"protocolTypes\":[\"cpxpyafrwr\",\"orogeuv\",\"krspnrsjsemlz\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"exutike\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"grpubwudhv\",\"matchConfigurationName\":\"gjzscueza\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"gq\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"f\",\"rxggezkhzp\"]}],\"vlanGroups\":[{\"name\":\"ssenerr\",\"vlans\":[\"zaivnpsjnpc\",\"plujyduonb\",\"awsaoplvvmnbkx\",\"arsbbdddwokqxail\"]},{\"name\":\"kdyqjvz\",\"vlans\":[\"rdspzesfkqqxu\",\"vzflbrous\",\"xa\"]}],\"portGroups\":[{\"name\":\"kokgo\",\"ports\":[\"fuk\"]},{\"name\":\"bc\",\"ports\":[\"h\",\"btzvxxv\",\"bcuufkrfn\",\"cnihkswxmfurqmw\"]},{\"name\":\"wpntumotah\",\"ports\":[\"vnkxmytzuae\",\"rlhxgcqmyrhkv\"]}]},{\"ipGroups\":[{\"name\":\"i\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tgp\",\"oswgfqvj\",\"ghpakbqyhlsorn\"]},{\"name\":\"meqagkncjmyb\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tnjawrhulemmqmbw\",\"pxirx\"]},{\"name\":\"itzmnhitaxj\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"lxsgcemegdz\"]}],\"vlanGroups\":[{\"name\":\"jubvfjyzuf\",\"vlans\":[\"fnivlutggma\",\"cxauhvcgzxhklsqx\"]}],\"portGroups\":[{\"name\":\"y\",\"ports\":[\"srjyxxoxwfzbkv\",\"cnxfxphs\",\"wbebsnbwutlv\"]},{\"name\":\"msumustihtgrafj\",\"ports\":[\"kyxmmj\",\"zvogtde\"]},{\"name\":\"ennmkvaeuwqd\",\"ports\":[\"hlbmyphfxnrpdh\",\"wokyqsf\"]},{\"name\":\"fsywbihq\",\"ports\":[\"djfyxbvkv\",\"zdmvdd\",\"wcrugyozzz\",\"wnjdvvlrh\"]}]},{\"ipGroups\":[{\"name\":\"kvx\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"bvbps\"]},{\"name\":\"qhxtozfgdkwbkur\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"gfuzkeutuipj\"]},{\"name\":\"zjwaqdzqydewu\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"zzzevtzqwczoc\",\"wbekmu\"]}],\"vlanGroups\":[{\"name\":\"kyvnhiysdhork\",\"vlans\":[\"raqkiwlw\"]}],\"portGroups\":[{\"name\":\"aqwmwqo\",\"ports\":[\"lteatn\",\"gefzj\",\"njtqbg\"]},{\"name\":\"ibt\",\"ports\":[\"xwtdqtcbjdbtqy\"]},{\"name\":\"xu\",\"ports\":[\"ujqgbbjvo\",\"oawh\",\"js\"]}]},{\"ipGroups\":[{\"name\":\"loygsabdgdheron\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"kzvzuatqhgzuyxtr\",\"fdbqskgqjbvitp\"]},{\"name\":\"vs\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"hpiwrmu\",\"k\"]},{\"name\":\"wbyfdwfbw\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tmggcpdrmegajr\"]}],\"vlanGroups\":[{\"name\":\"ymzskwqkkgeseip\",\"vlans\":[\"iupqscoobkj\"]},{\"name\":\"axsqcomji\",\"vlans\":[\"ncevxxkdevpxi\",\"ziizmeqmdu\"]}],\"portGroups\":[{\"name\":\"dqx\",\"ports\":[\"hm\",\"qibtblmc\",\"rjaznotdofqvpb\"]},{\"name\":\"dqk\",\"ports\":[\"qsbbm\",\"taftazgcx\",\"vqlcqufylamxo\"]},{\"name\":\"gc\",\"ports\":[\"utehlka\",\"vtipquksxiknsg\",\"fu\",\"swhpcek\"]},{\"name\":\"vmfnnbbxn\",\"ports\":[\"kkedeetxtp\"]}]}],\"networkTapId\":\"vgifws\",\"pollingIntervalInSeconds\":120,\"lastSyncedTime\":\"2021-07-19T23:34:29Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"wmmpd\"},\"lastOperation\":{\"details\":\"onbz\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\"},\"location\":\"iwsuanzhwsyui\",\"tags\":{\"iipj\":\"qqhbtfloilmkfbe\",\"l\":\"ngvyvuoik\",\"imq\":\"sxntugf\",\"fmvswx\":\"ryclo\"},\"id\":\"jeleifqhdxt\",\"name\":\"wulkr\",\"type\":\"bpaevy\"}") .toObject(NetworkTapRuleInner.class); - Assertions.assertEquals("aslavxj", model.location()); - Assertions.assertEquals("o", model.tags().get("pieidzlvssqy")); - Assertions.assertEquals(PollingIntervalInSeconds.NINE_ZERO, model.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("fooy", model.tapRulesUrl()); - Assertions.assertEquals("dtzcqi", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3768764619279475619L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xlantolamlbijuxk", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("iwsuanzhwsyui", model.location()); + Assertions.assertEquals("qqhbtfloilmkfbe", model.tags().get("iipj")); + Assertions.assertEquals("ubohxvzg", model.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.properties().configurationType()); + Assertions.assertEquals("vrhhogalgx", model.properties().tapRulesUrl()); + Assertions.assertEquals("zvzt", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6876747214811513629L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("cssanybzzghv", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); Assertions.assertEquals(EncapsulationType.GTPV1, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("wxsuy", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("rfgslglhpry", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("zihuioaeo", - model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("katprytgrhzbq", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wrp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ht", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("zcttbqgdirdam", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("cgytoxuw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nzqsaqmebgszpl", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("glxrkgjnm", model.annotation()); + model.properties().matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(Layer4Protocol.SCTP, + model.properties().matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals(TapRuleActionType.REDIRECT, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("nrfcqu", model.properties().matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("hpi", + model.properties().matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("wrerj", + model.properties().matchConfigurations().get(0).actions().get(0).matchConfigurationName()); + Assertions.assertEquals("gq", model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("f", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("ssenerr", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("zaivnpsjnpc", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("kokgo", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("fuk", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(PollingIntervalInSeconds.ONE_TWENTY, model.properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("wmmpd", model.properties().globalNetworkTapRuleActions().truncate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleInner model = new NetworkTapRuleInner().withLocation("aslavxj") - .withTags(mapOf("pieidzlvssqy", "o")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.NINE_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("fooy") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("dtzcqi") - .withSequenceNumber(3768764619279475619L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("xlantolamlbijuxk", "llczipvwdt", "ckzdqiqdlra")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.TCP)))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("wxsuy") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("rfgslglhpry") - .withMatchConfigurationName("zihuioaeo"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ajtfey") - .withSequenceNumber(8432449142241405654L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("beuuqutkzwtjwwg", "zytijcx")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) - .withTruncate("dydhqkkkb") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("catuqbhpowcnx") - .withMatchConfigurationName("zdlys"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("katprytgrhzbq") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wrp")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ht").withVlans(Arrays.asList("zcttbqgdirdam")), - new VlanGroupProperties().withName("zjgcfjfx") - .withVlans(Arrays.asList("jjirmuydgftt", "dofgeoagfuoftnx")), - new VlanGroupProperties().withName("wxmdaj").withVlans(Arrays.asList("g", "gsevmdm")), - new VlanGroupProperties().withName("nlrstgf") - .withVlans(Arrays.asList("j", "n", "idt", "vamyyznmrgcdo")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("cgytoxuw") - .withPorts(Arrays.asList("nzqsaqmebgszpl", "sdekpdzz")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("pgvokyejidbd") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("nycwz", "lv", "wsnmrkkyjt", "epwpwfk")), - new IpGroupProperties().withName("uxuva") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("dofuckclb")), - new IpGroupProperties().withName("luevsolzwilfng") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("ebuuxjx", "fxfjwp", "kktpmbmxbmbr", "gzzxljbkhxsd")), - new IpGroupProperties().withName("au") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("weqjfyxydgto", "vq", "vwglgwzpv", "akglhpsesrfga")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("dvxcgdhyhgoqgsoy") - .withVlans(Arrays.asList("yjrcbqpb", "spglq", "o")), - new VlanGroupProperties().withName("dahneaoovty") - .withVlans(Arrays.asList("ivfwjlofze", "fsr")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("la").withPorts(Arrays.asList("foc", "hapejov")), - new PortGroupProperties().withName("wxn") - .withPorts(Arrays.asList("hnoyrzaaoeeh", "mjenvjeatea", "xc")), - new PortGroupProperties().withName("oxdjxldnaryy") - .withPorts(Arrays.asList("kd", "lrndwdbvxvza", "edoyqxlunkft", "mcxqqxmyzklao")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("hrvmzrqrazadi") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("aslkskhjqjpvba", "hxjtgzgtai")), - new IpGroupProperties().withName("b") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("gbsfsgsaenwldf", "hljqlxsp", "rjc")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("dsxebuhsxrz") - .withVlans(Arrays.asList("sdaluyckhefrbhs", "uerbgpxebjl", "dcaytujraxd")))) - .withPortGroups( - Arrays.asList(new PortGroupProperties().withName("jmgtnsew").withPorts(Arrays.asList("ly")), - new PortGroupProperties().withName("vvyljurkepose") - .withPorts(Arrays.asList("ylmpctwjwdsd", "zmk", "erxxxoteehkhowgo", "vvh")), - new PortGroupProperties().withName("wpcbapnpxr") - .withPorts(Arrays.asList("wbmpspfeylqloc", "vujex")))))) - .withAnnotation("glxrkgjnm"); + NetworkTapRuleInner model + = new NetworkTapRuleInner().withLocation("iwsuanzhwsyui") + .withTags(mapOf("iipj", "qqhbtfloilmkfbe", "l", "ngvyvuoik", "imq", "sxntugf", "fmvswx", "ryclo")) + .withProperties( + new NetworkTapRuleProperties().withAnnotation("ubohxvzg") + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("vrhhogalgx") + .withMatchConfigurations( + Arrays.asList( + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("zvzt") + .withSequenceNumber(6876747214811513629L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions( + Arrays.asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes( + Arrays.asList("cssanybzzghv", "fe", "myjsvcdhly", "kh")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.SCTP)), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("zriwgoewap", "qksa", "ap", "j")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.TCP)), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("sdfpvdaahlf", "cqklpmvzpire")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.SCTP)), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("bmfggeokfekcjjlw")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.TCP)))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) + .withTruncate("nrfcqu") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("hpi") + .withMatchConfigurationName("wrerj"), + new NetworkTapRuleAction().withType(TapRuleActionType.LOG) + .withTruncate("chdwyqqidqi") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("bfjm") + .withMatchConfigurationName("jvxlhmpmh"), + new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) + .withTruncate("aphqeofytl") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("wmcm") + .withMatchConfigurationName("ixuanccqvjfdgfq"), + new NetworkTapRuleAction() + .withType(TapRuleActionType.GOTO) + .withTruncate("xpjhcfaaradci") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("fzgugrbl") + .withMatchConfigurationName("l"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ssnqe") + .withSequenceNumber(5966617785837338272L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("manxx")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.SCTP)), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("vtamqwzmnobfew", "psibxovuqo", + "jrkblndyclwgycv", "qnzjcyqqz")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("lbadp")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.TCP)))) + .withActions( + Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) + .withTruncate("looubsfx") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("opskgocjomlupfa") + .withMatchConfigurationName("sj"), + new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) + .withTruncate("slgdwz") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("yxajc") + .withMatchConfigurationName("rcavqcwyzoqzkmq"), + new NetworkTapRuleAction().withType(TapRuleActionType.LOG) + .withTruncate("jnk") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("pbntqqwwgf") + .withMatchConfigurationName("qxilefejs"), + new NetworkTapRuleAction() + .withType(TapRuleActionType.LOG) + .withTruncate("ne") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("nttwk") + .withMatchConfigurationName("ajksbs"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("gjmqjhgcydijnmcv") + .withSequenceNumber(5656997553780950233L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("zixtd")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("cpxpyafrwr", "orogeuv", "krspnrsjsemlz")) + .withVlanMatchCondition(new VlanMatchCondition()) + .withIpCondition(new IpMatchCondition()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) + .withActions( + Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) + .withTruncate("exutike") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("grpubwudhv") + .withMatchConfigurationName("gjzscueza"))))) + .withDynamicMatchConfigurations(Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties().withName("gq") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("f", "rxggezkhzp")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("ssenerr") + .withVlans(Arrays.asList("zaivnpsjnpc", "plujyduonb", "awsaoplvvmnbkx", + "arsbbdddwokqxail")), + new VlanGroupProperties().withName("kdyqjvz") + .withVlans(Arrays.asList("rdspzesfkqqxu", "vzflbrous", "xa")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("kokgo").withPorts(Arrays.asList("fuk")), + new PortGroupProperties().withName("bc") + .withPorts(Arrays.asList("h", "btzvxxv", "bcuufkrfn", "cnihkswxmfurqmw")), + new PortGroupProperties().withName("wpntumotah") + .withPorts(Arrays.asList("vnkxmytzuae", "rlhxgcqmyrhkv")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("i") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("tgp", "oswgfqvj", "ghpakbqyhlsorn")), + new IpGroupProperties().withName("meqagkncjmyb") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("tnjawrhulemmqmbw", "pxirx")), + new IpGroupProperties().withName("itzmnhitaxj") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("lxsgcemegdz")))) + .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("jubvfjyzuf") + .withVlans(Arrays.asList("fnivlutggma", "cxauhvcgzxhklsqx")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("y") + .withPorts(Arrays.asList("srjyxxoxwfzbkv", "cnxfxphs", "wbebsnbwutlv")), + new PortGroupProperties().withName("msumustihtgrafj") + .withPorts(Arrays.asList("kyxmmj", "zvogtde")), + new PortGroupProperties().withName("ennmkvaeuwqd") + .withPorts(Arrays.asList("hlbmyphfxnrpdh", "wokyqsf")), + new PortGroupProperties() + .withName("fsywbihq") + .withPorts(Arrays.asList("djfyxbvkv", "zdmvdd", "wcrugyozzz", "wnjdvvlrh")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("kvx") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("bvbps")), + new IpGroupProperties().withName("qhxtozfgdkwbkur") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("gfuzkeutuipj")), + new IpGroupProperties().withName("zjwaqdzqydewu") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("zzzevtzqwczoc", "wbekmu")))) + .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("kyvnhiysdhork") + .withVlans(Arrays.asList("raqkiwlw")))) + .withPortGroups(Arrays.asList(new PortGroupProperties() + .withName("aqwmwqo") + .withPorts(Arrays.asList("lteatn", "gefzj", "njtqbg")), + new PortGroupProperties().withName("ibt") + .withPorts(Arrays.asList("xwtdqtcbjdbtqy")), + new PortGroupProperties() + .withName("xu") + .withPorts(Arrays.asList("ujqgbbjvo", "oawh", "js")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("loygsabdgdheron") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("kzvzuatqhgzuyxtr", "fdbqskgqjbvitp")), + new IpGroupProperties().withName("vs") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("hpiwrmu", "k")), + new IpGroupProperties().withName("wbyfdwfbw") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("tmggcpdrmegajr")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("ymzskwqkkgeseip") + .withVlans(Arrays.asList("iupqscoobkj")), + new VlanGroupProperties().withName("axsqcomji") + .withVlans(Arrays.asList("ncevxxkdevpxi", "ziizmeqmdu")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("dqx") + .withPorts(Arrays.asList("hm", "qibtblmc", "rjaznotdofqvpb")), + new PortGroupProperties().withName("dqk") + .withPorts(Arrays.asList("qsbbm", "taftazgcx", "vqlcqufylamxo")), + new PortGroupProperties().withName("gc") + .withPorts(Arrays.asList("utehlka", "vtipquksxiknsg", "fu", "swhpcek")), + new PortGroupProperties().withName("vmfnnbbxn") + .withPorts(Arrays.asList("kkedeetxtp")))))) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.ONE_TWENTY) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("wmmpd"))); model = BinaryData.fromObject(model).toObject(NetworkTapRuleInner.class); - Assertions.assertEquals("aslavxj", model.location()); - Assertions.assertEquals("o", model.tags().get("pieidzlvssqy")); - Assertions.assertEquals(PollingIntervalInSeconds.NINE_ZERO, model.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("fooy", model.tapRulesUrl()); - Assertions.assertEquals("dtzcqi", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3768764619279475619L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("xlantolamlbijuxk", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("iwsuanzhwsyui", model.location()); + Assertions.assertEquals("qqhbtfloilmkfbe", model.tags().get("iipj")); + Assertions.assertEquals("ubohxvzg", model.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.properties().configurationType()); + Assertions.assertEquals("vrhhogalgx", model.properties().tapRulesUrl()); + Assertions.assertEquals("zvzt", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(6876747214811513629L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("cssanybzzghv", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); Assertions.assertEquals(EncapsulationType.GTPV1, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.TCP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("wxsuy", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("rfgslglhpry", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("zihuioaeo", - model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("katprytgrhzbq", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("wrp", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ht", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("zcttbqgdirdam", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("cgytoxuw", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("nzqsaqmebgszpl", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("glxrkgjnm", model.annotation()); + model.properties().matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(Layer4Protocol.SCTP, + model.properties().matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals(TapRuleActionType.REDIRECT, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("nrfcqu", model.properties().matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("hpi", + model.properties().matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("wrerj", + model.properties().matchConfigurations().get(0).actions().get(0).matchConfigurationName()); + Assertions.assertEquals("gq", model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("f", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("ssenerr", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("zaivnpsjnpc", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("kokgo", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("fuk", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(PollingIntervalInSeconds.ONE_TWENTY, model.properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("wmmpd", model.properties().globalNetworkTapRuleActions().truncate()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleListResultTests.java new file mode 100644 index 000000000000..d3ef23e973ca --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleListResultTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkTapRuleListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"yvextch\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"oldowuwh\",\"matchConfigurations\":[{\"matchConfigurationName\":\"fiozttcbi\",\"sequenceNumber\":4424410123069811106,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"dwjcfqoyxryqy\",\"sequenceNumber\":1895259513484086141,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"zauzfdhe\",\"sequenceNumber\":4505556304680499330,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"ykqadfges\",\"sequenceNumber\":2391191595363672853,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{}]}],\"networkTapId\":\"iuokglts\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-06-19T01:15:40Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"b\"},\"lastOperation\":{\"details\":\"tlsrvqzgaqsosrn\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\"},\"location\":\"huoxrqhjninpesw\",\"tags\":{\"zmcsviujojzdvmsn\":\"qkgebz\"},\"id\":\"osxsxoxvim\",\"name\":\"vetqhdbitqsbyujs\",\"type\":\"omr\"},{\"properties\":{\"annotation\":\"u\",\"configurationType\":\"File\",\"tapRulesUrl\":\"msdbvqxgfygf\",\"matchConfigurations\":[{\"matchConfigurationName\":\"dpbceh\",\"sequenceNumber\":1491298620331131147,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"pytporrvkxtfc\",\"sequenceNumber\":5964188763646470371,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"npjnezjighdumltp\",\"sequenceNumber\":8107222177349964418,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]}],\"networkTapId\":\"ngqqxjb\",\"pollingIntervalInSeconds\":120,\"lastSyncedTime\":\"2021-04-18T11:31:16Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"tujydeatwxpxbxed\"},\"lastOperation\":{\"details\":\"boceksramqch\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\"},\"location\":\"kswurx\",\"tags\":{\"qcnbnwivlqcwyzh\":\"vhauimnntfkqp\",\"eirta\":\"dqkzstzpzecdl\",\"udzpsjqrmlujmt\":\"tuwcimtcaumv\",\"mpjbh\":\"nlofwuzebfq\"},\"id\":\"yenfspetxeu\",\"name\":\"wkhdlckdoxocj\",\"type\":\"devzpfr\"}],\"nextLink\":\"rtwwyjmgvrlhfxmr\"}") + .toObject(NetworkTapRuleListResult.class); + Assertions.assertEquals("huoxrqhjninpesw", model.value().get(0).location()); + Assertions.assertEquals("qkgebz", model.value().get(0).tags().get("zmcsviujojzdvmsn")); + Assertions.assertEquals("yvextch", model.value().get(0).properties().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.value().get(0).properties().configurationType()); + Assertions.assertEquals("oldowuwh", model.value().get(0).properties().tapRulesUrl()); + Assertions.assertEquals("fiozttcbi", + model.value().get(0).properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(4424410123069811106L, + model.value().get(0).properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, + model.value().get(0).properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(PollingIntervalInSeconds.SIXTY, + model.value().get(0).properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.value().get(0).properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("b", model.value().get(0).properties().globalNetworkTapRuleActions().truncate()); + Assertions.assertEquals("rtwwyjmgvrlhfxmr", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java new file mode 100644 index 000000000000..b03f41374bbe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionPatchTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +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.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleMatchConditionPatch model = BinaryData.fromString( + "{\"protocolTypes\":[\"tvmijccpk\",\"jlamyv\",\"prjma\",\"h\"],\"vlanMatchCondition\":{\"vlans\":[\"bhx\",\"ppcbqetf\",\"fppvolzayj\",\"dunj\"],\"innerVlans\":[\"rklatwiuuj\",\"sujkr\",\"gxeegxbnjnczepd\",\"cymgbfmdquyyaes\"],\"vlanGroupNames\":[\"nav\",\"yxqbkxdtbf\",\"ihainzkefkzlxvc\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"lib\",\"bnunzuysajvvqlho\",\"yonelivgtibtkqjq\",\"caj\"],\"ipGroupNames\":[\"y\",\"khhk\",\"mrvkxeojtdyulglh\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xspxgogypbztgae\",\"jnskvct\"],\"portGroupNames\":[\"imb\",\"ttmhlvr\",\"cyxrn\"]}}") + .toObject(NetworkTapRuleMatchConditionPatch.class); + Assertions.assertEquals("tvmijccpk", model.protocolTypes().get(0)); + Assertions.assertEquals("bhx", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("rklatwiuuj", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("nav", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("lib", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("y", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("xspxgogypbztgae", model.portCondition().ports().get(0)); + Assertions.assertEquals("imb", model.portCondition().portGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapRuleMatchConditionPatch model = new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("tvmijccpk", "jlamyv", "prjma", "h")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("bhx", "ppcbqetf", "fppvolzayj", "dunj")) + .withInnerVlans(Arrays.asList("rklatwiuuj", "sujkr", "gxeegxbnjnczepd", "cymgbfmdquyyaes")) + .withVlanGroupNames(Arrays.asList("nav", "yxqbkxdtbf", "ihainzkefkzlxvc"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("lib", "bnunzuysajvvqlho", "yonelivgtibtkqjq", "caj")) + .withIpGroupNames(Arrays.asList("y", "khhk", "mrvkxeojtdyulglh"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("xspxgogypbztgae", "jnskvct")) + .withPortGroupNames(Arrays.asList("imb", "ttmhlvr", "cyxrn"))); + model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchConditionPatch.class); + Assertions.assertEquals("tvmijccpk", model.protocolTypes().get(0)); + Assertions.assertEquals("bhx", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("rklatwiuuj", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("nav", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); + Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.ipCondition().prefixType()); + Assertions.assertEquals("lib", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("y", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("xspxgogypbztgae", model.portCondition().ports().get(0)); + Assertions.assertEquals("imb", model.portCondition().portGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java index 3a141f3e42e5..ccf8bc019c56 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -21,53 +21,53 @@ public final class NetworkTapRuleMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleMatchCondition model = BinaryData.fromString( - "{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"gyxzmxynofxl\"],\"portGroupNames\":[\"oqxt\",\"nzujsji\",\"krpskcjhmm\"]},\"protocolTypes\":[\"nivdqtkyk\",\"axnlsfgnysca\",\"cptbzetxygxxicee\"],\"vlanMatchCondition\":{\"vlans\":[\"yuveoxmpz\",\"wahdrdvhaztkxbi\",\"zfgxmbry\"],\"innerVlans\":[\"ibio\",\"iqsykqfdqwdrt\"],\"vlanGroupNames\":[\"daglmrcok\",\"zertkounz\",\"iywhubymfpop\",\"k\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"wt\"],\"ipGroupNames\":[\"w\"]}}") + "{\"protocolTypes\":[\"dtsr\",\"j\"],\"vlanMatchCondition\":{\"vlans\":[\"acrzhnsbylgmg\",\"huqczouanbfulv\",\"xglxoqwbztil\",\"bzbwbgwzhbhfljey\"],\"innerVlans\":[\"iovnlhrwyakzuaf\",\"pwxsvdeatjiobni\"],\"vlanGroupNames\":[\"extqd\",\"wtgntimznupb\",\"tbsetko\",\"sqvhe\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"zmmmjyvdhdgdi\",\"m\",\"gstmfetqjisjmo\"],\"ipGroupNames\":[\"aqfkakhgkrvtyycv\",\"tvjej\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"zxkczb\"],\"portGroupNames\":[\"bb\",\"mh\"]}}") .toObject(NetworkTapRuleMatchCondition.class); - Assertions.assertEquals("nivdqtkyk", model.protocolTypes().get(0)); - Assertions.assertEquals("yuveoxmpz", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ibio", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("daglmrcok", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("dtsr", model.protocolTypes().get(0)); + Assertions.assertEquals("acrzhnsbylgmg", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("iovnlhrwyakzuaf", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("extqd", model.vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("wt", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("w", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("zmmmjyvdhdgdi", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("aqfkakhgkrvtyycv", model.ipCondition().ipGroupNames().get(0)); Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("gyxzmxynofxl", model.portCondition().ports().get(0)); - Assertions.assertEquals("oqxt", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("zxkczb", model.portCondition().ports().get(0)); + Assertions.assertEquals("bb", model.portCondition().portGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleMatchCondition model = new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("nivdqtkyk", "axnlsfgnysca", "cptbzetxygxxicee")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("yuveoxmpz", "wahdrdvhaztkxbi", "zfgxmbry")) - .withInnerVlans(Arrays.asList("ibio", "iqsykqfdqwdrt")) - .withVlanGroupNames(Arrays.asList("daglmrcok", "zertkounz", "iywhubymfpop", "k"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("wt")) - .withIpGroupNames(Arrays.asList("w"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("gyxzmxynofxl")) - .withPortGroupNames(Arrays.asList("oqxt", "nzujsji", "krpskcjhmm"))); + NetworkTapRuleMatchCondition model + = new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("dtsr", "j")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("acrzhnsbylgmg", "huqczouanbfulv", "xglxoqwbztil", "bzbwbgwzhbhfljey")) + .withInnerVlans(Arrays.asList("iovnlhrwyakzuaf", "pwxsvdeatjiobni")) + .withVlanGroupNames(Arrays.asList("extqd", "wtgntimznupb", "tbsetko", "sqvhe"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("zmmmjyvdhdgdi", "m", "gstmfetqjisjmo")) + .withIpGroupNames(Arrays.asList("aqfkakhgkrvtyycv", "tvjej"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("zxkczb")) + .withPortGroupNames(Arrays.asList("bb", "mh"))); model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchCondition.class); - Assertions.assertEquals("nivdqtkyk", model.protocolTypes().get(0)); - Assertions.assertEquals("yuveoxmpz", model.vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ibio", model.vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("daglmrcok", model.vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("dtsr", model.protocolTypes().get(0)); + Assertions.assertEquals("acrzhnsbylgmg", model.vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("iovnlhrwyakzuaf", model.vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("extqd", model.vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.ipCondition().prefixType()); - Assertions.assertEquals("wt", model.ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("w", model.ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals("zmmmjyvdhdgdi", model.ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("aqfkakhgkrvtyycv", model.ipCondition().ipGroupNames().get(0)); Assertions.assertEquals(EncapsulationType.NONE, model.encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, model.portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.TCP, model.portCondition().layer4Protocol()); - Assertions.assertEquals("gyxzmxynofxl", model.portCondition().ports().get(0)); - Assertions.assertEquals("oqxt", model.portCondition().portGroupNames().get(0)); + Assertions.assertEquals(PortType.DESTINATION_PORT, model.portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.UDP, model.portCondition().layer4Protocol()); + Assertions.assertEquals("zxkczb", model.portCondition().ports().get(0)); + Assertions.assertEquals("bb", model.portCondition().portGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java new file mode 100644 index 000000000000..6a60f1f1d646 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationPatchTests.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +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.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTapRuleMatchConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkTapRuleMatchConfigurationPatch model = BinaryData.fromString( + "{\"matchConfigurationName\":\"wofxfmhlvyq\",\"sequenceNumber\":8462050463665643399,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"iekhjgqq\",\"ugwespscvsmsp\",\"luwozf\",\"zasupcvqgx\"],\"vlanMatchCondition\":{\"vlans\":[\"oq\",\"cmcgmlmpnvq\",\"uyiarznhdqseyp\"],\"innerVlans\":[\"ajpuyx\",\"a\",\"rmzgccynb\",\"vmsiehedm\"],\"vlanGroupNames\":[\"neeyrxparxtz\",\"yqw\",\"digeb\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"iwwveeozbjk\",\"qpizdnuehxw\"],\"ipGroupNames\":[\"sjdywb\",\"klgerxactsawv\",\"cimpth\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"bnknyfuysj\",\"vrrllfswarmyb\"],\"portGroupNames\":[\"otgeysyqnipe\",\"fwwcbfnx\",\"aju\"]}},{\"protocolTypes\":[\"cfjisosfzlnraxn\",\"yzguaxfhvjixg\",\"f\"],\"vlanMatchCondition\":{\"vlans\":[\"sjmih\"],\"innerVlans\":[\"qp\"],\"vlanGroupNames\":[\"oi\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"dprpensbmzjrituk\",\"ym\",\"bfex\",\"izzjxwj\"],\"ipGroupNames\":[\"zwanduhduwdvolxt\",\"m\",\"ic\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"jfgox\",\"drmrazhvchvv\",\"yiog\"],\"portGroupNames\":[\"nwzruzsoowx\",\"smxtlcappnvc\"]}},{\"protocolTypes\":[\"pciryomhkdwuw\",\"dupbkmzkwhjjsqw\",\"aefe\",\"vvkxdbnmc\"],\"vlanMatchCondition\":{\"vlans\":[\"cdzdobuesdy\",\"fxnzp\"],\"innerVlans\":[\"upktwpdpsegivyt\",\"bvbbkflewgsl\"],\"vlanGroupNames\":[\"b\",\"vedwuu\",\"bmenxcqs\",\"wclykcr\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"revmpted\",\"uent\",\"shnfiygpgpkkhp\",\"ng\"],\"ipGroupNames\":[\"lmihnmtrdlpxiw\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"zikvoxloeo\",\"yf\",\"vxdifbwblijhpx\",\"kxgoyxontb\"],\"portGroupNames\":[\"rxros\",\"qrrldxfua\",\"fewxatktwjrppi\",\"eyrqve\"]}},{\"protocolTypes\":[\"dcizhvksb\",\"jklwjp\"],\"vlanMatchCondition\":{\"vlans\":[\"cw\"],\"innerVlans\":[\"pyeyzolbfnflytf\",\"uduiqoom\",\"swkq\"],\"vlanGroupNames\":[\"wsnliy\",\"ng\",\"uqzgpdglkfv\",\"wrgavtfy\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kryxpi\",\"vapeakfdmc\"],\"ipGroupNames\":[\"iklxkyo\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"kicwhqy\"],\"portGroupNames\":[\"mndkrwwmurhvif\",\"eqfsrnackitl\"]}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"p\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"daqwj\",\"matchConfigurationName\":\"ilnijhw\"},{\"type\":\"Drop\",\"truncate\":\"sypo\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"bvzpkodngvnqd\",\"matchConfigurationName\":\"sbtwgnldxuc\"},{\"type\":\"Drop\",\"truncate\":\"b\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"nrirpiiuvc\",\"matchConfigurationName\":\"qkqwucqsdgb\"}]}") + .toObject(NetworkTapRuleMatchConfigurationPatch.class); + Assertions.assertEquals("wofxfmhlvyq", model.matchConfigurationName()); + Assertions.assertEquals(8462050463665643399L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("iekhjgqq", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("oq", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("ajpuyx", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("neeyrxparxtz", + model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("iwwveeozbjk", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("sjdywb", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("bnknyfuysj", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("otgeysyqnipe", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.COUNT, model.actions().get(0).type()); + Assertions.assertEquals("p", model.actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("daqwj", model.actions().get(0).destinationId()); + Assertions.assertEquals("ilnijhw", model.actions().get(0).matchConfigurationName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkTapRuleMatchConfigurationPatch model + = new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("wofxfmhlvyq") + .withSequenceNumber(8462050463665643399L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("iekhjgqq", "ugwespscvsmsp", "luwozf", "zasupcvqgx")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("oq", "cmcgmlmpnvq", "uyiarznhdqseyp")) + .withInnerVlans(Arrays.asList("ajpuyx", "a", "rmzgccynb", "vmsiehedm")) + .withVlanGroupNames(Arrays.asList("neeyrxparxtz", "yqw", "digeb"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("iwwveeozbjk", "qpizdnuehxw")) + .withIpGroupNames(Arrays.asList("sjdywb", "klgerxactsawv", "cimpth"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("bnknyfuysj", "vrrllfswarmyb")) + .withPortGroupNames(Arrays.asList("otgeysyqnipe", "fwwcbfnx", "aju"))), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("cfjisosfzlnraxn", "yzguaxfhvjixg", "f")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("sjmih")) + .withInnerVlans(Arrays.asList("qp")) + .withVlanGroupNames(Arrays.asList("oi"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("dprpensbmzjrituk", "ym", "bfex", "izzjxwj")) + .withIpGroupNames(Arrays.asList("zwanduhduwdvolxt", "m", "ic"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("jfgox", "drmrazhvchvv", "yiog")) + .withPortGroupNames(Arrays.asList("nwzruzsoowx", "smxtlcappnvc"))), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("pciryomhkdwuw", "dupbkmzkwhjjsqw", "aefe", "vvkxdbnmc")) + .withVlanMatchCondition( + new VlanMatchConditionPatch().withVlans(Arrays.asList("cdzdobuesdy", "fxnzp")) + .withInnerVlans(Arrays.asList("upktwpdpsegivyt", "bvbbkflewgsl")) + .withVlanGroupNames(Arrays.asList("b", "vedwuu", "bmenxcqs", "wclykcr"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("revmpted", "uent", "shnfiygpgpkkhp", "ng")) + .withIpGroupNames(Arrays.asList("lmihnmtrdlpxiw"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("zikvoxloeo", "yf", "vxdifbwblijhpx", "kxgoyxontb")) + .withPortGroupNames(Arrays.asList("rxros", "qrrldxfua", "fewxatktwjrppi", "eyrqve"))), + new NetworkTapRuleMatchConditionPatch().withProtocolTypes(Arrays.asList("dcizhvksb", "jklwjp")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("cw")) + .withInnerVlans(Arrays.asList("pyeyzolbfnflytf", "uduiqoom", "swkq")) + .withVlanGroupNames(Arrays.asList("wsnliy", "ng", "uqzgpdglkfv", "wrgavtfy"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("kryxpi", "vapeakfdmc")) + .withIpGroupNames(Arrays.asList("iklxkyo"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("kicwhqy")) + .withPortGroupNames(Arrays.asList("mndkrwwmurhvif", "eqfsrnackitl"))))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.COUNT) + .withTruncate("p") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("daqwj") + .withMatchConfigurationName("ilnijhw"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("sypo") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("bvzpkodngvnqd") + .withMatchConfigurationName("sbtwgnldxuc"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("b") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("nrirpiiuvc") + .withMatchConfigurationName("qkqwucqsdgb"))); + model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchConfigurationPatch.class); + Assertions.assertEquals("wofxfmhlvyq", model.matchConfigurationName()); + Assertions.assertEquals(8462050463665643399L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.ipAddressType()); + Assertions.assertEquals("iekhjgqq", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("oq", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("ajpuyx", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("neeyrxparxtz", + model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConditions().get(0).ipCondition().type()); + Assertions.assertEquals(PrefixType.PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); + Assertions.assertEquals("iwwveeozbjk", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("sjdywb", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.matchConditions().get(0).portCondition().portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.matchConditions().get(0).portCondition().layer4Protocol()); + Assertions.assertEquals("bnknyfuysj", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("otgeysyqnipe", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.COUNT, model.actions().get(0).type()); + Assertions.assertEquals("p", model.actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("daqwj", model.actions().get(0).destinationId()); + Assertions.assertEquals("ilnijhw", model.actions().get(0).matchConfigurationName()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java index a02a2a2b319a..9741a71d3590 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRuleMatchConfigurationTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; @@ -26,125 +26,81 @@ public final class NetworkTapRuleMatchConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleMatchConfiguration model = BinaryData.fromString( - "{\"matchConfigurationName\":\"gajkrdyddtpfcud\",\"sequenceNumber\":6115763777753559706,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"kordw\",\"ejpec\"],\"portGroupNames\":[\"cmbpwdlu\",\"ayprldid\",\"mtffbvtzldzchuba\"]},\"protocolTypes\":[\"l\",\"uvigv\",\"ghfrbzakpjtcq\"],\"vlanMatchCondition\":{\"vlans\":[\"ojpsucm\",\"imcwqxynqjgsa\",\"kyvscbgngcrus\",\"hirc\"],\"innerVlans\":[\"vsvkkjbjolpyo\",\"lkvuznadvh\"],\"vlanGroupNames\":[\"eoigowxxbhtpsyio\",\"emqwtq\",\"zzgyksikawan\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"crbkompnbnfgywe\",\"jbepgcmah\",\"wfryawkchkap\",\"tsk\"],\"ipGroupNames\":[\"yfttibjepzwhju\",\"fdgbggcjxzhbl\",\"vwehsu\",\"ym\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ngkqlgxzduvxd\"],\"portGroupNames\":[\"xatm\",\"mnrs\",\"nxoirxy\"]},\"protocolTypes\":[\"iploisjkzsoxznnt\",\"gkvyoh\"],\"vlanMatchCondition\":{\"vlans\":[\"zupzwwyt\",\"djzghximkg\"],\"innerVlans\":[\"pqkjnpyriwntotcx\",\"mqmtsjky\"],\"vlanGroupNames\":[\"xwdonbexftedau\",\"h\",\"eggzgrn\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"mrtgjq\",\"acan\"],\"ipGroupNames\":[\"yxzxjmkanbclazof\",\"exvtemasp\",\"anydsc\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"bhaah\",\"tofelfhpfixo\"],\"portGroupNames\":[\"z\",\"fivsujybsr\"]},\"protocolTypes\":[\"mr\",\"t\",\"dhmfppinm\",\"ikesmkwtzgfr\"],\"vlanMatchCondition\":{\"vlans\":[\"xerxlobkdb\",\"qhvmmniiqy\",\"olhjnskbggicn\",\"wlctmwp\"],\"innerVlans\":[\"krkqgvxrktjc\",\"igcwtspanbqxase\",\"chefpgeed\"],\"vlanGroupNames\":[\"ruholae\",\"wcgi\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"sqqlonbzaow\"],\"ipGroupNames\":[\"dkmbjsmihrijez\",\"fsjwfcz\",\"lkvbgukbsv\",\"wyo\"]}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"nhjgclxaxwcffasp\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ucszgh\",\"matchConfigurationName\":\"aqipmnxclfrsbzrn\"},{\"type\":\"Drop\",\"truncate\":\"vp\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"dtbfmekjc\",\"matchConfigurationName\":\"inxd\"}]}") + "{\"matchConfigurationName\":\"ulqevv\",\"sequenceNumber\":562201024406657321,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"dmvghcmi\",\"mlwkfefbcyj\",\"talqee\",\"udfyimooaez\"],\"vlanMatchCondition\":{\"vlans\":[\"sgoihlqwbyw\"],\"innerVlans\":[\"baeeekfztv\",\"ab\"],\"vlanGroupNames\":[\"t\",\"wnoljdkx\",\"mewyaolclzxkr\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"krpkhqetpoene\",\"noafpcnrxiyrxo\",\"vhufc\"],\"ipGroupNames\":[\"jwblxphtoz\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"vr\"],\"portGroupNames\":[\"ynihtibufgzqzh\",\"uctblfehbgcgyoh\",\"cmeqljxdum\"]}}],\"actions\":[{\"type\":\"Drop\",\"truncate\":\"ebldxagmdfjwc\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"xjsjqu\",\"matchConfigurationName\":\"h\"}]}") .toObject(NetworkTapRuleMatchConfiguration.class); - Assertions.assertEquals("gajkrdyddtpfcud", model.matchConfigurationName()); - Assertions.assertEquals(6115763777753559706L, model.sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("l", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("ojpsucm", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vsvkkjbjolpyo", - model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eoigowxxbhtpsyio", - model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("ulqevv", model.matchConfigurationName()); + Assertions.assertEquals(562201024406657321L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("dmvghcmi", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("sgoihlqwbyw", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("baeeekfztv", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("t", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("crbkompnbnfgywe", - model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("yfttibjepzwhju", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConditions().get(0).encapsulationType()); + Assertions.assertEquals("krpkhqetpoene", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("jwblxphtoz", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.matchConditions().get(0).encapsulationType()); Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("kordw", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("cmbpwdlu", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.REPLICATE, model.actions().get(0).type()); - Assertions.assertEquals("nhjgclxaxwcffasp", model.actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("ucszgh", model.actions().get(0).destinationId()); - Assertions.assertEquals("aqipmnxclfrsbzrn", model.actions().get(0).matchConfigurationName()); + Assertions.assertEquals("vr", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("ynihtibufgzqzh", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.DROP, model.actions().get(0).type()); + Assertions.assertEquals("ebldxagmdfjwc", model.actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("xjsjqu", model.actions().get(0).destinationId()); + Assertions.assertEquals("h", model.actions().get(0).matchConfigurationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkTapRuleMatchConfiguration model - = new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("gajkrdyddtpfcud") - .withSequenceNumber(6115763777753559706L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays - .asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("l", "uvigv", "ghfrbzakpjtcq")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("ojpsucm", "imcwqxynqjgsa", "kyvscbgngcrus", "hirc")) - .withInnerVlans(Arrays.asList("vsvkkjbjolpyo", "lkvuznadvh")) - .withVlanGroupNames(Arrays.asList("eoigowxxbhtpsyio", "emqwtq", "zzgyksikawan"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("crbkompnbnfgywe", "jbepgcmah", "wfryawkchkap", "tsk")) - .withIpGroupNames(Arrays.asList("yfttibjepzwhju", "fdgbggcjxzhbl", "vwehsu", "ym"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("kordw", "ejpec")) - .withPortGroupNames(Arrays.asList("cmbpwdlu", "ayprldid", "mtffbvtzldzchuba"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("iploisjkzsoxznnt", "gkvyoh")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("zupzwwyt", "djzghximkg")) - .withInnerVlans(Arrays.asList("pqkjnpyriwntotcx", "mqmtsjky")) - .withVlanGroupNames(Arrays.asList("xwdonbexftedau", "h", "eggzgrn"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("mrtgjq", "acan")) - .withIpGroupNames(Arrays.asList("yxzxjmkanbclazof", "exvtemasp", "anydsc"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("ngkqlgxzduvxd")) - .withPortGroupNames(Arrays.asList("xatm", "mnrs", "nxoirxy"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("mr", "t", "dhmfppinm", "ikesmkwtzgfr")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("xerxlobkdb", "qhvmmniiqy", "olhjnskbggicn", "wlctmwp")) - .withInnerVlans(Arrays.asList("krkqgvxrktjc", "igcwtspanbqxase", "chefpgeed")) - .withVlanGroupNames(Arrays.asList("ruholae", "wcgi"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("sqqlonbzaow")) - .withIpGroupNames(Arrays.asList("dkmbjsmihrijez", "fsjwfcz", "lkvbgukbsv", "wyo"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("bhaah", "tofelfhpfixo")) - .withPortGroupNames(Arrays.asList("z", "fivsujybsr"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.REPLICATE) - .withTruncate("nhjgclxaxwcffasp") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("ucszgh") - .withMatchConfigurationName("aqipmnxclfrsbzrn"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("vp") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("dtbfmekjc") - .withMatchConfigurationName("inxd"))); + = new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ulqevv") + .withSequenceNumber(562201024406657321L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("dmvghcmi", "mlwkfefbcyj", "talqee", "udfyimooaez")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("sgoihlqwbyw")) + .withInnerVlans(Arrays.asList("baeeekfztv", "ab")) + .withVlanGroupNames(Arrays.asList("t", "wnoljdkx", "mewyaolclzxkr"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("krpkhqetpoene", "noafpcnrxiyrxo", "vhufc")) + .withIpGroupNames(Arrays.asList("jwblxphtoz"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("vr")) + .withPortGroupNames(Arrays.asList("ynihtibufgzqzh", "uctblfehbgcgyoh", "cmeqljxdum"))))) + .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.DROP) + .withTruncate("ebldxagmdfjwc") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("xjsjqu") + .withMatchConfigurationName("h"))); model = BinaryData.fromObject(model).toObject(NetworkTapRuleMatchConfiguration.class); - Assertions.assertEquals("gajkrdyddtpfcud", model.matchConfigurationName()); - Assertions.assertEquals(6115763777753559706L, model.sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("l", model.matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("ojpsucm", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("vsvkkjbjolpyo", - model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eoigowxxbhtpsyio", - model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); + Assertions.assertEquals("ulqevv", model.matchConfigurationName()); + Assertions.assertEquals(562201024406657321L, model.sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("dmvghcmi", model.matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("sgoihlqwbyw", model.matchConditions().get(0).vlanMatchCondition().vlans().get(0)); + Assertions.assertEquals("baeeekfztv", model.matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); + Assertions.assertEquals("t", model.matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.LONGEST_PREFIX, model.matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("crbkompnbnfgywe", - model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("yfttibjepzwhju", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConditions().get(0).encapsulationType()); + Assertions.assertEquals("krpkhqetpoene", model.matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); + Assertions.assertEquals("jwblxphtoz", model.matchConditions().get(0).ipCondition().ipGroupNames().get(0)); + Assertions.assertEquals(EncapsulationType.NONE, model.matchConditions().get(0).encapsulationType()); Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("kordw", model.matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("cmbpwdlu", model.matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.REPLICATE, model.actions().get(0).type()); - Assertions.assertEquals("nhjgclxaxwcffasp", model.actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("ucszgh", model.actions().get(0).destinationId()); - Assertions.assertEquals("aqipmnxclfrsbzrn", model.actions().get(0).matchConfigurationName()); + Assertions.assertEquals("vr", model.matchConditions().get(0).portCondition().ports().get(0)); + Assertions.assertEquals("ynihtibufgzqzh", + model.matchConditions().get(0).portCondition().portGroupNames().get(0)); + Assertions.assertEquals(TapRuleActionType.DROP, model.actions().get(0).type()); + Assertions.assertEquals("ebldxagmdfjwc", model.actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("xjsjqu", model.actions().get(0).destinationId()); + Assertions.assertEquals("h", model.actions().get(0).matchConfigurationName()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java index 763b77b83308..8555f3da5148 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchPropertiesTests.java @@ -1,30 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRulePatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; 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.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; 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.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; 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 com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -32,420 +33,257 @@ public final class NetworkTapRulePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRulePatchProperties model = BinaryData.fromString( - "{\"configurationType\":\"File\",\"tapRulesUrl\":\"rmhnmizhvpr\",\"matchConfigurations\":[{\"matchConfigurationName\":\"cubleh\",\"sequenceNumber\":1571375428500855687,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"zigh\"],\"portGroupNames\":[\"b\",\"dvucfvvra\"]},\"protocolTypes\":[\"urdeewlsuxp\",\"bwkdwjyjiznioroo\",\"m\"],\"vlanMatchCondition\":{\"vlans\":[\"pmcreihu\",\"trnighm\",\"nuwqxungro\",\"gwfmsxjwdylwxm\"],\"innerVlans\":[\"ow\"],\"vlanGroupNames\":[\"eerclbltbhpw\",\"chy\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"r\",\"vdifkiikg\"],\"ipGroupNames\":[\"ccwmecbtxsytrtex\",\"gwmrqjywiwhvy\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"loqkajwjuri\",\"rsbcl\"],\"portGroupNames\":[\"hzcknjxiz\",\"axdy\",\"zkz\"]},\"protocolTypes\":[\"e\",\"wacyyjmlxppdndzk\"],\"vlanMatchCondition\":{\"vlans\":[\"iiuiibf\"],\"innerVlans\":[\"ytqdcizeqqfop\",\"nopm\",\"tdsfh\",\"xqlyoazyfbkmvl\"],\"vlanGroupNames\":[\"x\",\"jzsvmaigb\",\"kvhyejth\",\"eecbpergwlc\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"sokknpugzjwdizc\",\"jixiujzkc\",\"exgkrsw\"],\"ipGroupNames\":[\"kkbxktxbbwlmnw\",\"okn\",\"uqddlggbqaolgzu\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"cmfnsffet\",\"kmixwewzls\",\"gsmepnqvxgvoh\",\"bthhxmoevvude\"],\"portGroupNames\":[\"hgannvwxqhpjhub\",\"hxvzgayb\",\"rhhogalgxnw\",\"mzvztauebpa\"]},\"protocolTypes\":[\"fcssanybzzghvd\"],\"vlanMatchCondition\":{\"vlans\":[\"yj\",\"v\",\"dhlywkho\"],\"innerVlans\":[\"unzxezriw\",\"oewapcqksaaapxjh\",\"itibenwsdf\"],\"vlanGroupNames\":[\"aahlfr\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"pireszyaqgomlbmf\",\"geokfekcjj\"],\"ipGroupNames\":[\"yeahhhutpulnrfcq\",\"fmcihpinowr\",\"rjpxptch\"]}}],\"actions\":[{\"type\":\"Drop\",\"truncate\":\"dqimlgbbfjm\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"xlhmpmhef\",\"matchConfigurationName\":\"aphqeofytl\"},{\"type\":\"Goto\",\"truncate\":\"wmcm\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"uanccq\",\"matchConfigurationName\":\"fdgfqpmquxpj\"},{\"type\":\"Log\",\"truncate\":\"arad\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"mufzgugrbl\",\"matchConfigurationName\":\"l\"},{\"type\":\"Mirror\",\"truncate\":\"nqebaotbptgc\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"xxrwqfmdqecvtamq\",\"matchConfigurationName\":\"mnobfeww\"}]},{\"matchConfigurationName\":\"ibxovu\",\"sequenceNumber\":7832491699982446512,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"cvtqnzjcyqqzhemb\",\"bwna\",\"ba\"],\"portGroupNames\":[\"sjdle\"]},\"protocolTypes\":[\"mvvlooubs\",\"xipjeopskgocjom\",\"upfazusj\",\"dhuslgdwz\"],\"vlanMatchCondition\":{\"vlans\":[\"yxajc\",\"grcavqc\"],\"innerVlans\":[\"oqzkmqcwwsjnki\"],\"vlanGroupNames\":[\"pbntqqwwgf\",\"sqxile\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ne\",\"uqynttwk\"],\"ipGroupNames\":[\"jksb\",\"yogjmqjh\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"vjbssfcriqxz\",\"xtdlxwmvcdkucp\"],\"portGroupNames\":[\"afr\",\"rgorogeuvmkrspn\"]},\"protocolTypes\":[\"semlzofrsnq\",\"ljpetexutikelpmw\"],\"vlanMatchCondition\":{\"vlans\":[\"bwudhvosgjzs\"],\"innerVlans\":[\"zalivdfwgq\",\"hewcffrx\",\"gezkhzpriqisse\"],\"vlanGroupNames\":[\"rusyzai\",\"npsjnpc\",\"plujyduonb\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"vvm\",\"bkxjar\",\"bbdddwokqx\"],\"ipGroupNames\":[\"xqkdyqjvzvcgrds\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"uhvz\",\"lbrouszxac\",\"wukokgoojj\"],\"portGroupNames\":[\"tubcmu\",\"h\",\"btzvxxv\"]},\"protocolTypes\":[\"uufkrfnkcnihkswx\",\"furqm\"],\"vlanMatchCondition\":{\"vlans\":[\"pntumotahb\",\"svnkxmyt\",\"u\"],\"innerVlans\":[\"rlhxgcqmyrhkv\",\"zzmiemqyft\"],\"vlanGroupNames\":[\"oswgfqvj\",\"ghpakbqyhlsorn\",\"b\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"jm\"],\"ipGroupNames\":[\"yevztnjaw\",\"hul\",\"mmqmbwppx\",\"rxbkitzmnhitax\"]}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"lxsgcemegdz\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"jubvfjyzuf\",\"matchConfigurationName\":\"ifnivlut\"},{\"type\":\"Count\",\"truncate\":\"acxauh\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"xhklsqxt\",\"matchConfigurationName\":\"yygktsrjyxxoxwf\"}]},{\"matchConfigurationName\":\"kvecnxfx\",\"sequenceNumber\":6127027006710190293,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"uwmsu\",\"ustihtgrafjajvky\",\"mmjczvog\",\"derjennmk\"],\"portGroupNames\":[\"uwqdwxhhlbmyphf\"]},\"protocolTypes\":[\"pdhewokyqs\",\"kx\",\"sy\"],\"vlanMatchCondition\":{\"vlans\":[\"qbtodjfy\",\"bvkvwzdmvdd\",\"wcrugyozzz\",\"wnjdvvlrh\"],\"innerVlans\":[\"kkvxu\",\"dqzbvbpsuvqhx\",\"ozf\"],\"vlanGroupNames\":[\"wbkurklpiigf\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"pjclzjwaqdzqyd\",\"wuwxyllz\",\"zevtzqwczoc\"],\"ipGroupNames\":[\"ekmuynfpkyvnhiy\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"raqkiwlw\"],\"portGroupNames\":[\"la\",\"wmwqoguflte\",\"t\"]},\"protocolTypes\":[\"ef\",\"jxnjtqbgy\"],\"vlanMatchCondition\":{\"vlans\":[\"hnvxwtd\",\"tcbjdbtqy\",\"kxunsaujqgbb\",\"vovoa\"],\"innerVlans\":[\"js\",\"bc\"],\"vlanGroupNames\":[\"ygsa\",\"d\",\"d\",\"e\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kzvzuatqhgzuyxtr\",\"fdbqskgqjbvitp\"],\"ipGroupNames\":[\"sffavdhpiwrmuwk\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"bwxyldqtmggcpd\",\"megaj\",\"zctwymzsk\",\"qkkge\"],\"portGroupNames\":[\"phgliupqscoobk\",\"lcaxsqcomjiqi\"]},\"protocolTypes\":[\"evxxkdevpximzii\",\"meqmduvtvodqxxpq\",\"ml\",\"ibtblmcvrjazno\"],\"vlanMatchCondition\":{\"vlans\":[\"qvpbq\",\"dqk\",\"sb\",\"sbbmitaftazgcx\"],\"innerVlans\":[\"lcqufylamxow\"],\"vlanGroupNames\":[\"joyutehlkarvtipq\",\"ksxiknsgofunswh\",\"cekggvmfnnb\",\"xn\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"etxtpw\",\"vgifws\",\"njzijaciwm\"],\"ipGroupNames\":[\"tqdonbzzs\",\"fzyviiwsua\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"uifkzqqhb\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ilm\",\"matchConfigurationName\":\"beoiip\"},{\"type\":\"Goto\",\"truncate\":\"vyvuoikdlpsx\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"fwimqnryclocfmv\",\"matchConfigurationName\":\"xvjeleifqhdxtww\"},{\"type\":\"Drop\",\"truncate\":\"ybpaevykbyjecrq\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"kchsfoul\",\"matchConfigurationName\":\"rcxuibsdqbdyblp\"},{\"type\":\"Mirror\",\"truncate\":\"m\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"eoqhbjql\",\"matchConfigurationName\":\"bleru\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"hjucihbymjj\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rxvjeazrahelhb\"]}],\"vlanGroups\":[{\"name\":\"ieqamcthtpqgf\",\"vlans\":[\"sizkdiuvflg\",\"hcw\"]},{\"name\":\"wahcrxofgrutv\",\"vlans\":[\"cxzivxpmhz\"]},{\"name\":\"hhkvnnjdtujqz\",\"vlans\":[\"jvpmxnht\",\"zstqlf\"]}],\"portGroups\":[{\"name\":\"wvtlgxy\",\"ports\":[\"wequfl\",\"yyopoaytwwgw\",\"ubotbvufrkw\",\"iemimdtn\"]},{\"name\":\"wew\",\"ports\":[\"reeedddrftfquul\",\"clhsiigeeuw\"]}]},{\"ipGroups\":[{\"name\":\"yxfedqnetd\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"oqgvbzpggp\",\"meyobqajejirvavr\",\"kgpogplbjuvlnh\"]},{\"name\":\"rnjhinaeges\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"qmjmoplukfyk\"]}],\"vlanGroups\":[{\"name\":\"ovadkrmjx\",\"vlans\":[\"pdkesjqbzkqmx\",\"poriwbwggijtspzj\",\"rrh\",\"kwsbzrhdugquh\"]},{\"name\":\"gzfrunjfhrjhi\",\"vlans\":[\"ause\",\"nczk\",\"ihvtuwyjsqw\"]},{\"name\":\"zoszjg\",\"vlans\":[\"kfnyskwwunqhc\",\"avoj\",\"slhip\"]}],\"portGroups\":[{\"name\":\"bljp\",\"ports\":[\"rvchyluqalp\"]},{\"name\":\"fjjfxtizt\",\"ports\":[\"tahhhsa\",\"xxsri\",\"rcwbaae\",\"yyefmxwoqotiiqb\"]},{\"name\":\"asrvrmtist\",\"ports\":[\"jhorlxkpy\",\"k\",\"nnycntrqxxwtd\"]}]},{\"ipGroups\":[{\"name\":\"tsuhqhtoxtd\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"x\",\"qmzxsyaks\",\"npaami\"]},{\"name\":\"bgh\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"bgchcgsfzhbjkiy\",\"qbjsdjpgxeysgw\",\"cfferznzc\"]},{\"name\":\"voveomkhfeqcoop\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"imgckycjpeebznbz\",\"xsuloutnpb\"]}],\"vlanGroups\":[{\"name\":\"qo\",\"vlans\":[\"ncdmwkh\",\"pfhsldqdza\",\"iunyevdyzdsytc\"]},{\"name\":\"swhcamwuy\",\"vlans\":[\"kcgsfcmvh\",\"drp\",\"atvyrkljqkqws\",\"jtvjkowggxawwd\"]}],\"portGroups\":[{\"name\":\"nkteiidlbovwbclp\",\"ports\":[\"gani\",\"kjcnerek\"]}]}],\"annotation\":\"uls\"}") + "{\"annotation\":\"iqwzutiyelrn\",\"configurationType\":\"File\",\"tapRulesUrl\":\"vhqsz\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"qmqcudp\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"rnfckjth\",\"sequenceNumber\":8368180229323138441,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"bknge\",\"jxumowynj\"],\"vlanMatchCondition\":{\"vlans\":[\"mxuktdrsjtmnkxj\",\"uwfzcfdtstiaxty\",\"nuhcfhepisq\",\"cmlroiommemso\"],\"innerVlans\":[\"lcyeqdobobaqcabe\",\"ckcesrsi\",\"wnlpjcxbjg\",\"myqyyfrridzfps\"],\"vlanGroupNames\":[\"kidfhmlxrqkeknu\",\"kqafzvptriysjrgt\",\"uwpuqpsrcekdvvo\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"gclvbwa\"],\"ipGroupNames\":[\"drjbjngoars\",\"drw\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"ypi\",\"rxirq\"],\"portGroupNames\":[\"zesstuiny\"]}},{\"protocolTypes\":[\"lfupjzcxxv\",\"joy\"],\"vlanMatchCondition\":{\"vlans\":[\"hxuerrd\",\"kt\",\"ytkbce\",\"fc\"],\"innerVlans\":[\"vfqjckmpwyvlh\",\"hhcikh\",\"ebgjg\"],\"vlanGroupNames\":[\"acagifl\",\"cygotohzwtoidh\",\"xitr\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"jsjzels\",\"iemv\",\"pmeakosysycv\",\"de\"],\"ipGroupNames\":[\"bsaipusuofkegbvb\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"sluazz\",\"f\",\"veugpx\"],\"portGroupNames\":[\"mp\",\"pbscboxr\",\"qdczmrjgobekx\",\"heowsecaf\"]}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"k\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"sbdbm\",\"matchConfigurationName\":\"esacuicn\"},{\"type\":\"Drop\",\"truncate\":\"suivmrf\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"drmmnlhnkmxrqke\",\"matchConfigurationName\":\"davi\"}]},{\"matchConfigurationName\":\"beqrfzavqymcwts\",\"sequenceNumber\":7887623828830271752,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"kuorw\",\"qb\",\"tweobptscruykkie\"],\"vlanMatchCondition\":{\"vlans\":[\"noyjyflsm\"],\"innerVlans\":[\"lyoi\",\"gdfz\"],\"vlanGroupNames\":[\"hykcvoevcwf\",\"otkxxlwwooxg\",\"sdz\",\"gcvypjhu\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"hujcqg\",\"wvxwi\",\"aoibmjk\"],\"ipGroupNames\":[\"ljdcu\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"qo\",\"qhgphg\",\"u\",\"ud\"],\"portGroupNames\":[\"qruvumry\",\"dnqivahfcqw\",\"jzebp\",\"cciyoypoedks\"]}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"ybqeigxuyx\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"u\",\"matchConfigurationName\":\"hznfff\"}]},{\"matchConfigurationName\":\"cgnaqsrmrfq\",\"sequenceNumber\":7523992636670849615,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"b\",\"mgqlwyqznbbyzpo\"],\"vlanMatchCondition\":{\"vlans\":[\"tgpbygbn\"],\"innerVlans\":[\"oiq\",\"tzpvqew\"],\"vlanGroupNames\":[\"z\",\"xzuxerxh\",\"wl\",\"kqsqvvdkfp\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"ymxxyfrdjidce\",\"fv\",\"wfwsldi\"],\"ipGroupNames\":[\"uppvyddqsvc\",\"rsnxfrp\",\"wwqclmdmtfxxepz\",\"xzxlcqzfxa\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"kirp\",\"n\"],\"portGroupNames\":[\"dmhk\",\"omeobwkeuzltenlb\",\"xlmxozesndo\",\"uomtxj\"]}}],\"actions\":[{\"type\":\"Goto\",\"truncate\":\"ckikkqy\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"wis\",\"matchConfigurationName\":\"fmrzc\"},{\"type\":\"Log\",\"truncate\":\"nky\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"tehognsddjk\",\"matchConfigurationName\":\"edesuazogfcnx\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"tcqxmyvkxixypavi\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"ohvpsuw\"]},{\"name\":\"hmxczbyfkocgmzd\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wscrngtwgxrolw\",\"plksdksutacucti\",\"avishbvjhxvpmqqu\",\"ux\"]},{\"name\":\"hngrxl\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"orocrqicgym\",\"gbq\",\"fy\",\"vhtvijvwmrg\"]},{\"name\":\"zhrplcxfmbzqu\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"hbtqyzy\",\"g\",\"mbky\",\"vxjdqosxzmdz\"]}],\"vlanGroups\":[{\"name\":\"fufkekzfk\",\"vlans\":[\"hsevmn\"]},{\"name\":\"ghvsryjokv\",\"vlans\":[\"bjsarxsvmfpa\",\"wbpzgfgqp\",\"dhgxgiea\"]}],\"portGroups\":[{\"name\":\"x\",\"ports\":[\"lozukgs\",\"uhwyxjsfmaxcebn\",\"eoskem\"]},{\"name\":\"erwqxpjpv\",\"ports\":[\"f\",\"httuobrx\",\"mhyt\"]}]}]}") .toObject(NetworkTapRulePatchProperties.class); - Assertions.assertEquals("uls", model.annotation()); + Assertions.assertEquals("iqwzutiyelrn", model.annotation()); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("rmhnmizhvpr", model.tapRulesUrl()); - Assertions.assertEquals("cubleh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1571375428500855687L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("urdeewlsuxp", + Assertions.assertEquals("vhqsz", model.tapRulesUrl()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("qmqcudp", model.globalNetworkTapRuleActions().truncate()); + Assertions.assertEquals("rnfckjth", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(8368180229323138441L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("bknge", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmcreihu", + Assertions.assertEquals("mxuktdrsjtmnkxj", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ow", + Assertions.assertEquals("lcyeqdobobaqcabe", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eerclbltbhpw", + Assertions.assertEquals("kidfhmlxrqkeknu", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("r", + Assertions.assertEquals("gclvbwa", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ccwmecbtxsytrtex", + Assertions.assertEquals("drjbjngoars", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); Assertions.assertEquals(EncapsulationType.NONE, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, + Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("zigh", + Assertions.assertEquals("ypi", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("b", + Assertions.assertEquals("zesstuiny", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("dqimlgbbfjm", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, + Assertions.assertEquals(TapRuleActionType.REPLICATE, + model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("k", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("xlhmpmhef", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("aphqeofytl", + Assertions.assertEquals("sbdbm", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("esacuicn", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("hjucihbymjj", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("tcqxmyvkxixypavi", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("rxvjeazrahelhb", + Assertions.assertEquals("ohvpsuw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ieqamcthtpqgf", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("sizkdiuvflg", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wvtlgxy", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("wequfl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("fufkekzfk", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("hsevmn", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("x", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("lozukgs", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkTapRulePatchProperties model - = new NetworkTapRulePatchProperties().withAnnotation("uls") + = new NetworkTapRulePatchProperties().withAnnotation("iqwzutiyelrn") .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("rmhnmizhvpr") - .withMatchConfigurations( + .withTapRulesUrl("vhqsz") + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.FALSE) + .withTruncate("qmqcudp")) + .withMatchConfigurations(Arrays.asList( + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("rnfckjth") + .withSequenceNumber(8368180229323138441L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("bknge", "jxumowynj")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("mxuktdrsjtmnkxj", "uwfzcfdtstiaxty", "nuhcfhepisq", + "cmlroiommemso")) + .withInnerVlans( + Arrays.asList("lcyeqdobobaqcabe", "ckcesrsi", "wnlpjcxbjg", "myqyyfrridzfps")) + .withVlanGroupNames( + Arrays.asList("kidfhmlxrqkeknu", "kqafzvptriysjrgt", "uwpuqpsrcekdvvo"))) + .withIpCondition( + new IpMatchConditionPatch().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("gclvbwa")) + .withIpGroupNames(Arrays.asList("drjbjngoars", "drw"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("ypi", "rxirq")) + .withPortGroupNames(Arrays.asList("zesstuiny"))), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("lfupjzcxxv", "joy")) + .withVlanMatchCondition(new VlanMatchConditionPatch() + .withVlans(Arrays.asList("hxuerrd", "kt", "ytkbce", "fc")) + .withInnerVlans(Arrays.asList("vfqjckmpwyvlh", "hhcikh", "ebgjg")) + .withVlanGroupNames(Arrays.asList("acagifl", "cygotohzwtoidh", "xitr"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("jsjzels", "iemv", "pmeakosysycv", "de")) + .withIpGroupNames(Arrays.asList("bsaipusuofkegbvb"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("sluazz", "f", "veugpx")) + .withPortGroupNames( + Arrays.asList("mp", "pbscboxr", "qdczmrjgobekx", "heowsecaf"))))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.REPLICATE) + .withTruncate("k") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("sbdbm") + .withMatchConfigurationName("esacuicn"), + new NetworkTapRuleActionPatch() + .withType(TapRuleActionType.DROP) + .withTruncate("suivmrf") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("drmmnlhnkmxrqke") + .withMatchConfigurationName("davi"))), + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("beqrfzavqymcwts") + .withSequenceNumber(7887623828830271752L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("kuorw", "qb", "tweobptscruykkie")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("noyjyflsm")) + .withInnerVlans(Arrays.asList("lyoi", "gdfz")) + .withVlanGroupNames(Arrays.asList("hykcvoevcwf", "otkxxlwwooxg", "sdz", "gcvypjhu"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("hujcqg", "wvxwi", "aoibmjk")) + .withIpGroupNames(Arrays.asList("ljdcu"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("qo", "qhgphg", "u", "ud")) + .withPortGroupNames( + Arrays.asList("qruvumry", "dnqivahfcqw", "jzebp", "cciyoypoedks"))))) + .withActions(Arrays + .asList(new NetworkTapRuleActionPatch().withType(TapRuleActionType.COUNT) + .withTruncate("ybqeigxuyx") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("u") + .withMatchConfigurationName("hznfff"))), + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("cgnaqsrmrfq") + .withSequenceNumber(7523992636670849615L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("b", "mgqlwyqznbbyzpo")) + .withVlanMatchCondition(new VlanMatchConditionPatch().withVlans(Arrays.asList("tgpbygbn")) + .withInnerVlans(Arrays.asList("oiq", "tzpvqew")) + .withVlanGroupNames(Arrays.asList("z", "xzuxerxh", "wl", "kqsqvvdkfp"))) + .withIpCondition(new IpMatchConditionPatch().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("ymxxyfrdjidce", "fv", "wfwsldi")) + .withIpGroupNames( + Arrays.asList("uppvyddqsvc", "rsnxfrp", "wwqclmdmtfxxepz", "xzxlcqzfxa"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("kirp", "n")) + .withPortGroupNames( + Arrays.asList("dmhk", "omeobwkeuzltenlb", "xlmxozesndo", "uomtxj"))))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.GOTO) + .withTruncate("ckikkqy") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("wis") + .withMatchConfigurationName("fmrzc"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.LOG) + .withTruncate("nky") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("tehognsddjk") + .withMatchConfigurationName("edesuazogfcnx"))))) + .withDynamicMatchConfigurations( Arrays .asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("cubleh") - .withSequenceNumber(1571375428500855687L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions( - Arrays.asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("urdeewlsuxp", "bwkdwjyjiznioroo", "m")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("pmcreihu", "trnighm", "nuwqxungro", - "gwfmsxjwdylwxm")) - .withInnerVlans(Arrays.asList("ow")) - .withVlanGroupNames(Arrays.asList("eerclbltbhpw", "chy"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("r", "vdifkiikg")) - .withIpGroupNames(Arrays.asList("ccwmecbtxsytrtex", "gwmrqjywiwhvy"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("zigh")) - .withPortGroupNames(Arrays.asList("b", "dvucfvvra"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("e", "wacyyjmlxppdndzk")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("iiuiibf")) - .withInnerVlans( - Arrays.asList("ytqdcizeqqfop", "nopm", "tdsfh", "xqlyoazyfbkmvl")) - .withVlanGroupNames( - Arrays.asList("x", "jzsvmaigb", "kvhyejth", "eecbpergwlc"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues( - Arrays.asList("sokknpugzjwdizc", "jixiujzkc", "exgkrsw")) - .withIpGroupNames( - Arrays.asList("kkbxktxbbwlmnw", "okn", "uqddlggbqaolgzu"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("loqkajwjuri", "rsbcl")) - .withPortGroupNames(Arrays.asList("hzcknjxiz", "axdy", "zkz"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("fcssanybzzghvd")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("yj", "v", "dhlywkho")) - .withInnerVlans( - Arrays.asList("unzxezriw", "oewapcqksaaapxjh", "itibenwsdf")) - .withVlanGroupNames(Arrays.asList("aahlfr"))) - .withIpCondition( - new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("pireszyaqgomlbmf", "geokfekcjj")) - .withIpGroupNames( - Arrays.asList("yeahhhutpulnrfcq", "fmcihpinowr", "rjpxptch"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition( - new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("cmfnsffet", "kmixwewzls", "gsmepnqvxgvoh", - "bthhxmoevvude")) - .withPortGroupNames(Arrays.asList("hgannvwxqhpjhub", "hxvzgayb", - "rhhogalgxnw", "mzvztauebpa"))))) - .withActions(Arrays.asList(new NetworkTapRuleAction() - .withType(TapRuleActionType.DROP) - .withTruncate("dqimlgbbfjm") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("xlhmpmhef") - .withMatchConfigurationName("aphqeofytl"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("wmcm") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("uanccq") - .withMatchConfigurationName("fdgfqpmquxpj"), - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("arad") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("mufzgugrbl") - .withMatchConfigurationName("l"), - new NetworkTapRuleAction() - .withType(TapRuleActionType.MIRROR) - .withTruncate("nqebaotbptgc") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("xxrwqfmdqecvtamq") - .withMatchConfigurationName("mnobfeww"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ibxovu") - .withSequenceNumber(7832491699982446512L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("mvvlooubs", "xipjeopskgocjom", - "upfazusj", "dhuslgdwz")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("yxajc", "grcavqc")) - .withInnerVlans(Arrays.asList("oqzkmqcwwsjnki")) - .withVlanGroupNames(Arrays.asList("pbntqqwwgf", "sqxile"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("ne", "uqynttwk")) - .withIpGroupNames(Arrays.asList("jksb", "yogjmqjh"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("cvtqnzjcyqqzhemb", "bwna", "ba")) - .withPortGroupNames(Arrays.asList("sjdle"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("semlzofrsnq", "ljpetexutikelpmw")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("bwudhvosgjzs")) - .withInnerVlans( - Arrays.asList("zalivdfwgq", "hewcffrx", "gezkhzpriqisse")) - .withVlanGroupNames( - Arrays.asList("rusyzai", "npsjnpc", "plujyduonb"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("vvm", "bkxjar", "bbdddwokqx")) - .withIpGroupNames(Arrays.asList("xqkdyqjvzvcgrds"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("vjbssfcriqxz", "xtdlxwmvcdkucp")) - .withPortGroupNames(Arrays.asList("afr", "rgorogeuvmkrspn"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("uufkrfnkcnihkswx", "furqm")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("pntumotahb", "svnkxmyt", "u")) - .withInnerVlans(Arrays.asList("rlhxgcqmyrhkv", "zzmiemqyft")) - .withVlanGroupNames(Arrays.asList("oswgfqvj", "ghpakbqyhlsorn", - "b"))) - .withIpCondition(new IpMatchCondition().withType( - SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("jm")) - .withIpGroupNames(Arrays.asList("yevztnjaw", "hul", "mmqmbwppx", - "rxbkitzmnhitax"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition( - new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("uhvz", "lbrouszxac", "wukokgoojj")) - .withPortGroupNames(Arrays.asList("tubcmu", "h", "btzvxxv"))))) - .withActions(Arrays - .asList( - new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) - .withTruncate("lxsgcemegdz") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("jubvfjyzuf") - .withMatchConfigurationName("ifnivlut"), - new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) - .withTruncate("acxauh") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("xhklsqxt") - .withMatchConfigurationName("yygktsrjyxxoxwf"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("kvecnxfx") - .withSequenceNumber(6127027006710190293L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays - .asList( - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("pdhewokyqs", "kx", "sy")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("qbtodjfy", "bvkvwzdmvdd", "wcrugyozzz", - "wnjdvvlrh")) - .withInnerVlans(Arrays.asList("kkvxu", "dqzbvbpsuvqhx", "ozf")) - .withVlanGroupNames(Arrays.asList("wbkurklpiigf"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("pjclzjwaqdzqyd", "wuwxyllz", "zevtzqwczoc")) - .withIpGroupNames(Arrays.asList("ekmuynfpkyvnhiy"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays - .asList("uwmsu", "ustihtgrafjajvky", "mmjczvog", "derjennmk")) - .withPortGroupNames(Arrays.asList("uwqdwxhhlbmyphf"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("ef", "jxnjtqbgy")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans( - Arrays.asList("hnvxwtd", "tcbjdbtqy", "kxunsaujqgbb", "vovoa")) - .withInnerVlans(Arrays.asList("js", "bc")) - .withVlanGroupNames(Arrays.asList("ygsa", "d", "d", "e"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues( - Arrays.asList("kzvzuatqhgzuyxtr", "fdbqskgqjbvitp")) - .withIpGroupNames(Arrays.asList("sffavdhpiwrmuwk"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("raqkiwlw")) - .withPortGroupNames(Arrays.asList("la", "wmwqoguflte", "t"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("evxxkdevpximzii", "meqmduvtvodqxxpq", - "ml", "ibtblmcvrjazno")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("qvpbq", "dqk", "sb", "sbbmitaftazgcx")) - .withInnerVlans(Arrays.asList("lcqufylamxow")) - .withVlanGroupNames(Arrays.asList("joyutehlkarvtipq", - "ksxiknsgofunswh", "cekggvmfnnb", "xn"))) - .withIpCondition(new IpMatchCondition() - .withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("etxtpw", "vgifws", "njzijaciwm")) - .withIpGroupNames(Arrays.asList("tqdonbzzs", "fzyviiwsua"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition() - .withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts( - Arrays.asList("bwxyldqtmggcpd", "megaj", "zctwymzsk", "qkkge")) - .withPortGroupNames( - Arrays.asList("phgliupqscoobk", "lcaxsqcomjiqi"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("uifkzqqhb") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("ilm") - .withMatchConfigurationName("beoiip"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("vyvuoikdlpsx") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("fwimqnryclocfmv") - .withMatchConfigurationName("xvjeleifqhdxtww"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("ybpaevykbyjecrq") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("kchsfoul") - .withMatchConfigurationName("rcxuibsdqbdyblp"), - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("m") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("eoqhbjql") - .withMatchConfigurationName("bleru"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties().withName("hjucihbymjj") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("rxvjeazrahelhb")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ieqamcthtpqgf") - .withVlans(Arrays.asList("sizkdiuvflg", "hcw")), - new VlanGroupProperties().withName("wahcrxofgrutv").withVlans(Arrays.asList("cxzivxpmhz")), - new VlanGroupProperties().withName("hhkvnnjdtujqz") - .withVlans(Arrays.asList("jvpmxnht", "zstqlf")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("wvtlgxy") - .withPorts(Arrays.asList("wequfl", "yyopoaytwwgw", "ubotbvufrkw", "iemimdtn")), - new PortGroupProperties().withName("wew") - .withPorts(Arrays.asList("reeedddrftfquul", "clhsiigeeuw")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("yxfedqnetd") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("oqgvbzpggp", "meyobqajejirvavr", "kgpogplbjuvlnh")), - new IpGroupProperties().withName("rnjhinaeges") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("qmjmoplukfyk")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("ovadkrmjx") - .withVlans(Arrays.asList("pdkesjqbzkqmx", "poriwbwggijtspzj", "rrh", "kwsbzrhdugquh")), - new VlanGroupProperties().withName("gzfrunjfhrjhi") - .withVlans(Arrays.asList("ause", "nczk", "ihvtuwyjsqw")), - new VlanGroupProperties().withName("zoszjg") - .withVlans(Arrays.asList("kfnyskwwunqhc", "avoj", "slhip")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("bljp").withPorts(Arrays.asList("rvchyluqalp")), - new PortGroupProperties().withName("fjjfxtizt") - .withPorts(Arrays.asList("tahhhsa", "xxsri", "rcwbaae", "yyefmxwoqotiiqb")), - new PortGroupProperties().withName("asrvrmtist") - .withPorts(Arrays.asList("jhorlxkpy", "k", "nnycntrqxxwtd")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("tsuhqhtoxtd") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("x", "qmzxsyaks", "npaami")), - new IpGroupProperties().withName("bgh") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("bgchcgsfzhbjkiy", "qbjsdjpgxeysgw", "cfferznzc")), - new IpGroupProperties().withName("voveomkhfeqcoop") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("imgckycjpeebznbz", "xsuloutnpb")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("qo") - .withVlans(Arrays.asList("ncdmwkh", "pfhsldqdza", "iunyevdyzdsytc")), - new VlanGroupProperties().withName("swhcamwuy") - .withVlans(Arrays.asList("kcgsfcmvh", "drp", "atvyrkljqkqws", "jtvjkowggxawwd")))) - .withPortGroups(Arrays.asList(new PortGroupProperties().withName("nkteiidlbovwbclp") - .withPorts(Arrays.asList("gani", "kjcnerek")))))); + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("tcqxmyvkxixypavi") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("ohvpsuw")), + new IpGroupPatchProperties().withName("hmxczbyfkocgmzd") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays + .asList("wscrngtwgxrolw", "plksdksutacucti", "avishbvjhxvpmqqu", "ux")), + new IpGroupPatchProperties().withName("hngrxl") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("orocrqicgym", "gbq", "fy", "vhtvijvwmrg")), + new IpGroupPatchProperties().withName("zhrplcxfmbzqu") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("hbtqyzy", "g", "mbky", "vxjdqosxzmdz")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("fufkekzfk") + .withVlans(Arrays.asList("hsevmn")), + new VlanGroupPatchProperties().withName("ghvsryjokv") + .withVlans(Arrays.asList("bjsarxsvmfpa", "wbpzgfgqp", "dhgxgiea")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("x") + .withPorts(Arrays.asList("lozukgs", "uhwyxjsfmaxcebn", "eoskem")), + new PortGroupPatchProperties().withName("erwqxpjpv") + .withPorts(Arrays.asList("f", "httuobrx", "mhyt")))))); model = BinaryData.fromObject(model).toObject(NetworkTapRulePatchProperties.class); - Assertions.assertEquals("uls", model.annotation()); + Assertions.assertEquals("iqwzutiyelrn", model.annotation()); Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("rmhnmizhvpr", model.tapRulesUrl()); - Assertions.assertEquals("cubleh", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1571375428500855687L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("urdeewlsuxp", + Assertions.assertEquals("vhqsz", model.tapRulesUrl()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("qmqcudp", model.globalNetworkTapRuleActions().truncate()); + Assertions.assertEquals("rnfckjth", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(8368180229323138441L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("bknge", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmcreihu", + Assertions.assertEquals("mxuktdrsjtmnkxj", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ow", + Assertions.assertEquals("lcyeqdobobaqcabe", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("eerclbltbhpw", + Assertions.assertEquals("kidfhmlxrqkeknu", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, + Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("r", + Assertions.assertEquals("gclvbwa", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("ccwmecbtxsytrtex", + Assertions.assertEquals("drjbjngoars", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); Assertions.assertEquals(EncapsulationType.NONE, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.SOURCE_PORT, + Assertions.assertEquals(PortType.DESTINATION_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("zigh", + Assertions.assertEquals("ypi", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("b", + Assertions.assertEquals("zesstuiny", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.DROP, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("dqimlgbbfjm", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, + Assertions.assertEquals(TapRuleActionType.REPLICATE, + model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("k", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("xlhmpmhef", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("aphqeofytl", + Assertions.assertEquals("sbdbm", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("esacuicn", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("hjucihbymjj", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("tcqxmyvkxixypavi", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("rxvjeazrahelhb", + Assertions.assertEquals("ohvpsuw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("ieqamcthtpqgf", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("sizkdiuvflg", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("wvtlgxy", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("wequfl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("fufkekzfk", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("hsevmn", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("x", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("lozukgs", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java index 06f2cf8ace6f..5a0f6cb5708b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchTests.java @@ -1,27 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch; 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.GlobalNetworkTapRuleActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleActionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; -import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -31,188 +32,274 @@ public final class NetworkTapRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRulePatch model = BinaryData.fromString( - "{\"properties\":{\"configurationType\":\"Inline\",\"tapRulesUrl\":\"jmtf\",\"matchConfigurations\":[{\"matchConfigurationName\":\"lnirupkq\",\"sequenceNumber\":1991980702958146147,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"wmehfxrttxbmsenn\",\"fab\",\"camalect\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"xmsynbkd\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"fxuzmsvzyqrbrn\",\"matchConfigurationName\":\"jtlxfikjkxara\"},{\"type\":\"Mirror\",\"truncate\":\"asnjeglht\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"zpcjcnwjzbqblxr\",\"matchConfigurationName\":\"vdsvoqizawwsds\"},{\"type\":\"Goto\",\"truncate\":\"hjxsa\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"uffhxf\",\"matchConfigurationName\":\"mwzrdqyoybmr\"}]},{\"matchConfigurationName\":\"to\",\"sequenceNumber\":8522857147817918154,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"layer4Protocol\":\"UDP\"},\"protocolTypes\":[\"qphkv\",\"yzadcrxylaypdt\"],\"vlanMatchCondition\":{},\"ipCondition\":{}}],\"actions\":[{\"type\":\"Goto\",\"truncate\":\"huriwhjdfr\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"h\",\"matchConfigurationName\":\"nkcclpctuog\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"s\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"oebnxsqcowscuyfq\",\"amfbqh\",\"u\"]},{\"name\":\"afuzpnxqpwnik\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"grb\",\"ct\",\"vgoo\",\"qsazmzlpcxi\"]},{\"name\":\"hxxrqicf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"dthkvpyeyoafinm\"]},{\"name\":\"qup\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"fwkyluobdxw\"]}],\"vlanGroups\":[{\"name\":\"clcvqs\",\"vlans\":[\"ay\"]},{\"name\":\"vwbzmfxlrymf\",\"vlans\":[\"piywqnp\",\"ydrf\",\"gcnyxbyxmkhm\",\"ync\"]},{\"name\":\"u\",\"vlans\":[\"styygjq\",\"ulmwqgmhmqmiwx\",\"fvvzucqfgufjnbx\"]}],\"portGroups\":[{\"name\":\"dukinhlxh\",\"ports\":[\"kekzouyveww\",\"zrdwcg\",\"dohgcandxfhhhte\",\"tdqtdnnckkplj\"]},{\"name\":\"hvvfkdxccyijjimh\",\"ports\":[\"rqnjxmvvsduydwnw\",\"ruhhqldrdymnswx\"]},{\"name\":\"xqwqnghxnim\",\"ports\":[\"jrxgunnq\",\"ypu\",\"tnylqu\"]}]},{\"ipGroups\":[{\"name\":\"vyumgmmueb\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"gsqufmjxcyo\",\"eqcazisvbrqgcy\",\"pgawepk\",\"on\"]},{\"name\":\"pghlr\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"lxb\",\"ibrv\",\"ztaflvsmfj\"]},{\"name\":\"vfjcqrttjfuqm\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"feqb\",\"vdostwyg\"]},{\"name\":\"mw\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wzz\"]}],\"vlanGroups\":[{\"name\":\"lcjgpvcqzvzrbvg\",\"vlans\":[\"lxrmxvm\"]},{\"name\":\"wynbgovazoymd\",\"vlans\":[\"plkhwwdkatveqmg\",\"cswzeyxrye\",\"r\"]},{\"name\":\"p\",\"vlans\":[\"kl\",\"smfasgtlv\"]}],\"portGroups\":[{\"name\":\"ilosjaemcezevft\",\"ports\":[\"l\"]}]},{\"ipGroups\":[{\"name\":\"yghz\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wtpcflcezswwvw\"]},{\"name\":\"tdjtvbfpfhru\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"cjnqs\",\"xd\"]},{\"name\":\"umxquk\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"hclqddnhfkne\",\"weddpnyzc\",\"yjsmkaq\",\"dqabnwvpaq\"]}],\"vlanGroups\":[{\"name\":\"bbigcfd\",\"vlans\":[\"xnfbmjyyrqa\",\"dwovocyt\"]}],\"portGroups\":[{\"name\":\"ayokrwfmihw\",\"ports\":[\"hedb\",\"o\",\"dczvothmkh\",\"aozvbwfcnjhbpoel\"]},{\"name\":\"cmyhrhjvszfqb\",\"ports\":[\"dwpppqwojoe\",\"zz\"]},{\"name\":\"ytdxmlynz\",\"ports\":[\"apbkrbuoggtdl\",\"lcuhaizi\",\"vaylz\",\"ohlpsftqkr\"]},{\"name\":\"hvbvvcpwtqsus\",\"ports\":[\"mzy\"]}]}],\"annotation\":\"fetev\"},\"tags\":{\"hfhfsat\":\"fknwacycsyotct\"}}") + "{\"tags\":{\"cjrzvlcivqx\":\"vjmxokxxamq\",\"wwlojkbgnf\":\"emklphx\",\"sunhaevlah\":\"rzjv\"},\"properties\":{\"annotation\":\"ywywuahwcorewcn\",\"configurationType\":\"File\",\"tapRulesUrl\":\"qjfdajr\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"mggewdqbxexfy\"},\"matchConfigurations\":[{\"matchConfigurationName\":\"ssuqksl\",\"sequenceNumber\":660764279928457810,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"eywpmohnrtlikf\",\"ydztkqrfbgynzfw\",\"zdteqjmyqxuhg\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"None\",\"portCondition\":{}},{\"protocolTypes\":[\"jyoxxjxb\",\"owrrlcckly\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{}},{\"protocolTypes\":[\"emqom\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"ibzicyvichcapt\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"nrkbnv\",\"matchConfigurationName\":\"cklzhznfgvlxy\"},{\"type\":\"Log\",\"truncate\":\"tigpksywicklktg\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"tqjytdc\",\"matchConfigurationName\":\"fuhbdwbvjsbg\"},{\"type\":\"Log\",\"truncate\":\"o\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"ytn\",\"matchConfigurationName\":\"vbpbl\"}]},{\"matchConfigurationName\":\"wsexheeocnqou\",\"sequenceNumber\":2614488883656246680,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"fhdxyfhxohzbzhha\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{}},{\"protocolTypes\":[\"dslcofuv\",\"fuehouisaklhjf\",\"dxqfussubzssp\"],\"vlanMatchCondition\":{},\"ipCondition\":{},\"encapsulationType\":\"GTPv1\",\"portCondition\":{}}],\"actions\":[{\"type\":\"Replicate\",\"truncate\":\"xpqwlkqdgwb\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"hldwvogl\",\"matchConfigurationName\":\"jdhgslorm\"},{\"type\":\"Goto\",\"truncate\":\"fcvxkylhc\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"lmnqunkygbptmsgk\",\"matchConfigurationName\":\"dwlxt\"},{\"type\":\"Goto\",\"truncate\":\"gbhudhrpjimvrrq\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"kwmamrlfizj\",\"matchConfigurationName\":\"dndihupngy\"},{\"type\":\"Drop\",\"truncate\":\"yafewcmodxw\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"xnxrqxrtzeargv\",\"matchConfigurationName\":\"khbjhmv\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"w\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"bffqc\"]},{\"name\":\"ynepkt\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"conyse\",\"jijfhpxni\",\"ouoxfalo\",\"bskkypor\"]}],\"vlanGroups\":[{\"name\":\"eunbydlg\",\"vlans\":[\"hwuubwts\",\"yn\",\"tvjfqreeoxvqj\"]}],\"portGroups\":[{\"name\":\"lihsdbfbmdi\",\"ports\":[\"zhpjgqz\",\"iaoaweacfxa\",\"buhruetc\",\"xriqzzdckh\"]},{\"name\":\"drrjsu\",\"ports\":[\"wobwxrxm\"]}]},{\"ipGroups\":[{\"name\":\"hlsfjfouqjpzhea\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"xqkvadmjhymudjma\",\"jzdebhsermcly\"]},{\"name\":\"wu\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"aptbssvkbcbpt\",\"ybloccu\"]},{\"name\":\"lxzbnsshvqn\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"uybutcdzjfjt\",\"peyxdyuxurxr\"]}],\"vlanGroups\":[{\"name\":\"mijgpqfkwnaeik\",\"vlans\":[\"cymqfvxgwpqny\",\"mzapdokez\",\"pe\",\"knfzqnzbflbqmhb\"]},{\"name\":\"xxvwedhagq\",\"vlans\":[\"eseayuflms\",\"zzdcrolrz\",\"sb\"]}],\"portGroups\":[{\"name\":\"zk\",\"ports\":[\"nwjivtbusz\"]},{\"name\":\"j\",\"ports\":[\"eujywdalisdeqngc\",\"ydzin\"]}]},{\"ipGroups\":[{\"name\":\"lpozmdahyclxrs\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"ldpoi\",\"ffjk\",\"tnhrevimxmaxcj\",\"pitygv\"]},{\"name\":\"dsoqtbfkvuo\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"nqekwankl\"]},{\"name\":\"rlcydjht\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"wiynd\",\"rdonkgobx\",\"lr\",\"olenrswknpdr\"]}],\"vlanGroups\":[{\"name\":\"aofroefqcki\",\"vlans\":[\"rejyoyb\"]},{\"name\":\"ftusdwmnrt\",\"vlans\":[\"ucnnrovom\",\"pxwsicvwqzocsf\"]}],\"portGroups\":[{\"name\":\"nmsg\",\"ports\":[\"dibugvnrgalvwrhr\",\"ibrbknuubxc\"]},{\"name\":\"jtup\",\"ports\":[\"npyeevffifu\",\"gtdow\",\"xmwefcbybpc\",\"rtczwjcujyznvyrj\"]},{\"name\":\"jlgkuirx\",\"ports\":[\"wiiircvnfgbdvi\",\"xohktxagfu\",\"dbqjnye\"]}]},{\"ipGroups\":[{\"name\":\"gxqqqasfeooqftp\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"rphklqlii\"]},{\"name\":\"anuwgjnofg\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"sebjuymtevae\"]}],\"vlanGroups\":[{\"name\":\"ywhr\",\"vlans\":[\"jvaedogz\"]},{\"name\":\"gxbxxgj\",\"vlans\":[\"phivfh\"]},{\"name\":\"tenfdvdoearywusr\",\"vlans\":[\"dt\",\"syfezfsmyljd\",\"yyrwnmwtqi\"]}],\"portGroups\":[{\"name\":\"nkynkstdtfw\",\"ports\":[\"phfxaq\",\"yihjcwwvaosckfa\",\"h\",\"hp\"]},{\"name\":\"wweifdy\",\"ports\":[\"exnguwnrdpuz\",\"a\",\"hsujtggybsz\",\"mijxejpd\"]}]}]}}") .toObject(NetworkTapRulePatch.class); - Assertions.assertEquals("fknwacycsyotct", model.tags().get("hfhfsat")); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("jmtf", model.tapRulesUrl()); - Assertions.assertEquals("lnirupkq", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1991980702958146147L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("wmehfxrttxbmsenn", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("vjmxokxxamq", model.tags().get("cjrzvlcivqx")); + Assertions.assertEquals("ywywuahwcorewcn", model.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.properties().configurationType()); + Assertions.assertEquals("qjfdajr", model.properties().tapRulesUrl()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("mggewdqbxexfy", model.properties().globalNetworkTapRuleActions().truncate()); + Assertions.assertEquals("ssuqksl", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(660764279928457810L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("eywpmohnrtlikf", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); Assertions.assertEquals(EncapsulationType.NONE, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("xmsynbkd", model.matchConfigurations().get(0).actions().get(0).truncate()); + model.properties().matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(TapRuleActionType.MIRROR, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("ibzicyvichcapt", + model.properties().matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("fxuzmsvzyqrbrn", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("jtlxfikjkxara", - model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("s", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("oebnxsqcowscuyfq", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("clcvqs", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ay", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("dukinhlxh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("kekzouyveww", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("fetev", model.annotation()); + model.properties().matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("nrkbnv", + model.properties().matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("cklzhznfgvlxy", + model.properties().matchConfigurations().get(0).actions().get(0).matchConfigurationName()); + Assertions.assertEquals("w", model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("bffqc", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("eunbydlg", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("hwuubwts", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("lihsdbfbmdi", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("zhpjgqz", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkTapRulePatch model - = new NetworkTapRulePatch().withTags(mapOf("hfhfsat", "fknwacycsyotct")) - .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("jmtf") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("lnirupkq") - .withSequenceNumber(1991980702958146147L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("wmehfxrttxbmsenn", "fab", "camalect")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("xmsynbkd") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("fxuzmsvzyqrbrn") - .withMatchConfigurationName("jtlxfikjkxara"), - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("asnjeglht") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("zpcjcnwjzbqblxr") - .withMatchConfigurationName("vdsvoqizawwsds"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("hjxsa") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("uffhxf") - .withMatchConfigurationName("mwzrdqyoybmr"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("to") - .withSequenceNumber(8522857147817918154L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("qphkv", "yzadcrxylaypdt")) - .withVlanMatchCondition(new VlanMatchCondition()) - .withIpCondition(new IpMatchCondition()) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withLayer4Protocol(Layer4Protocol.UDP)))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("huriwhjdfr") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("h") - .withMatchConfigurationName("nkcclpctuog"))))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("s") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("oebnxsqcowscuyfq", "amfbqh", "u")), - new IpGroupProperties().withName("afuzpnxqpwnik") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("grb", "ct", "vgoo", "qsazmzlpcxi")), - new IpGroupProperties().withName("hxxrqicf") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("dthkvpyeyoafinm")), - new IpGroupProperties().withName("qup") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("fwkyluobdxw")))) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties().withName("clcvqs").withVlans(Arrays.asList("ay")), - new VlanGroupProperties().withName("vwbzmfxlrymf") - .withVlans(Arrays.asList("piywqnp", "ydrf", "gcnyxbyxmkhm", "ync")), - new VlanGroupProperties().withName("u") - .withVlans(Arrays.asList("styygjq", "ulmwqgmhmqmiwx", "fvvzucqfgufjnbx")))) - .withPortGroups( - Arrays.asList(new PortGroupProperties().withName("dukinhlxh") - .withPorts(Arrays.asList("kekzouyveww", "zrdwcg", "dohgcandxfhhhte", "tdqtdnnckkplj")), - new PortGroupProperties().withName("hvvfkdxccyijjimh") - .withPorts(Arrays.asList("rqnjxmvvsduydwnw", "ruhhqldrdymnswx")), - new PortGroupProperties().withName("xqwqnghxnim") - .withPorts(Arrays.asList("jrxgunnq", "ypu", "tnylqu")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("vyumgmmueb") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("gsqufmjxcyo", "eqcazisvbrqgcy", "pgawepk", "on")), - new IpGroupProperties().withName("pghlr") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("lxb", "ibrv", "ztaflvsmfj")), - new IpGroupProperties().withName("vfjcqrttjfuqm") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("feqb", "vdostwyg")), - new IpGroupProperties().withName("mw") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("wzz")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("lcjgpvcqzvzrbvg").withVlans(Arrays.asList("lxrmxvm")), - new VlanGroupProperties().withName("wynbgovazoymd") - .withVlans(Arrays.asList("plkhwwdkatveqmg", "cswzeyxrye", "r")), - new VlanGroupProperties().withName("p").withVlans(Arrays.asList("kl", "smfasgtlv")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("ilosjaemcezevft").withPorts(Arrays.asList("l")))), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("yghz") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("wtpcflcezswwvw")), - new IpGroupProperties().withName("tdjtvbfpfhru") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("cjnqs", "xd")), - new IpGroupProperties().withName("umxquk") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("hclqddnhfkne", "weddpnyzc", "yjsmkaq", "dqabnwvpaq")))) - .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("bbigcfd") - .withVlans(Arrays.asList("xnfbmjyyrqa", "dwovocyt")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("ayokrwfmihw") - .withPorts(Arrays.asList("hedb", "o", "dczvothmkh", "aozvbwfcnjhbpoel")), - new PortGroupProperties().withName("cmyhrhjvszfqb") - .withPorts(Arrays.asList("dwpppqwojoe", "zz")), - new PortGroupProperties().withName("ytdxmlynz") - .withPorts(Arrays.asList("apbkrbuoggtdl", "lcuhaizi", "vaylz", "ohlpsftqkr")), - new PortGroupProperties().withName("hvbvvcpwtqsus").withPorts(Arrays.asList("mzy")))))) - .withAnnotation("fetev"); + = new NetworkTapRulePatch() + .withTags(mapOf("cjrzvlcivqx", "vjmxokxxamq", "wwlojkbgnf", "emklphx", "sunhaevlah", "rzjv")) + .withProperties( + new NetworkTapRulePatchProperties().withAnnotation("ywywuahwcorewcn") + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("qjfdajr") + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionPatchProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("mggewdqbxexfy")) + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfigurationPatch().withMatchConfigurationName("ssuqksl") + .withSequenceNumber(660764279928457810L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions( + Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("eywpmohnrtlikf", + "ydztkqrfbgynzfw", "zdteqjmyqxuhg")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("jyoxxjxb", "owrrlcckly")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("emqom")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.MIRROR) + .withTruncate("ibzicyvichcapt") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("nrkbnv") + .withMatchConfigurationName("cklzhznfgvlxy"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.LOG) + .withTruncate("tigpksywicklktg") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("tqjytdc") + .withMatchConfigurationName("fuhbdwbvjsbg"), + new NetworkTapRuleActionPatch() + .withType(TapRuleActionType.LOG) + .withTruncate("o") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("ytn") + .withMatchConfigurationName("vbpbl"))), + new NetworkTapRuleMatchConfigurationPatch() + .withMatchConfigurationName("wsexheeocnqou") + .withSequenceNumber(2614488883656246680L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes(Arrays.asList("fhdxyfhxohzbzhha")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()), + new NetworkTapRuleMatchConditionPatch() + .withProtocolTypes( + Arrays.asList("dslcofuv", "fuehouisaklhjf", "dxqfussubzssp")) + .withVlanMatchCondition(new VlanMatchConditionPatch()) + .withIpCondition(new IpMatchConditionPatch()) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortConditionPatch()))) + .withActions(Arrays.asList( + new NetworkTapRuleActionPatch().withType(TapRuleActionType.REPLICATE) + .withTruncate("xpqwlkqdgwb") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("hldwvogl") + .withMatchConfigurationName("jdhgslorm"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.GOTO) + .withTruncate("fcvxkylhc") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("lmnqunkygbptmsgk") + .withMatchConfigurationName("dwlxt"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.GOTO) + .withTruncate("gbhudhrpjimvrrq") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("kwmamrlfizj") + .withMatchConfigurationName("dndihupngy"), + new NetworkTapRuleActionPatch().withType(TapRuleActionType.DROP) + .withTruncate("yafewcmodxw") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("xnxrqxrtzeargv") + .withMatchConfigurationName("khbjhmv"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfigurationPatch() + .withIpGroups( + Arrays + .asList( + new IpGroupPatchProperties().withName("w") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("bffqc")), + new IpGroupPatchProperties().withName("ynepkt") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("conyse", "jijfhpxni", "ouoxfalo", + "bskkypor")))) + .withVlanGroups( + Arrays.asList(new VlanGroupPatchProperties().withName("eunbydlg") + .withVlans(Arrays.asList("hwuubwts", "yn", "tvjfqreeoxvqj")))) + .withPortGroups( + Arrays + .asList( + new PortGroupPatchProperties().withName("lihsdbfbmdi") + .withPorts(Arrays.asList("zhpjgqz", "iaoaweacfxa", "buhruetc", + "xriqzzdckh")), + new PortGroupPatchProperties().withName("drrjsu") + .withPorts(Arrays.asList("wobwxrxm")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("hlsfjfouqjpzhea") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("xqkvadmjhymudjma", "jzdebhsermcly")), + new IpGroupPatchProperties().withName("wu") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("aptbssvkbcbpt", "ybloccu")), + new IpGroupPatchProperties().withName("lxzbnsshvqn") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("uybutcdzjfjt", "peyxdyuxurxr")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("mijgpqfkwnaeik") + .withVlans(Arrays.asList("cymqfvxgwpqny", "mzapdokez", "pe", + "knfzqnzbflbqmhb")), + new VlanGroupPatchProperties().withName("xxvwedhagq") + .withVlans(Arrays.asList("eseayuflms", "zzdcrolrz", "sb")))) + .withPortGroups( + Arrays.asList( + new PortGroupPatchProperties().withName("zk") + .withPorts(Arrays.asList("nwjivtbusz")), + new PortGroupPatchProperties() + .withName("j") + .withPorts(Arrays.asList("eujywdalisdeqngc", "ydzin")))), + new CommonDynamicMatchConfigurationPatch().withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("lpozmdahyclxrs") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("ldpoi", "ffjk", "tnhrevimxmaxcj", "pitygv")), + new IpGroupPatchProperties().withName("dsoqtbfkvuo") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("nqekwankl")), + new IpGroupPatchProperties().withName("rlcydjht") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("wiynd", "rdonkgobx", "lr", "olenrswknpdr")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("aofroefqcki") + .withVlans(Arrays.asList("rejyoyb")), + new VlanGroupPatchProperties().withName("ftusdwmnrt") + .withVlans(Arrays.asList("ucnnrovom", "pxwsicvwqzocsf")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("nmsg") + .withPorts(Arrays.asList("dibugvnrgalvwrhr", "ibrbknuubxc")), + new PortGroupPatchProperties().withName("jtup") + .withPorts(Arrays.asList("npyeevffifu", "gtdow", "xmwefcbybpc", + "rtczwjcujyznvyrj")), + new PortGroupPatchProperties() + .withName("jlgkuirx") + .withPorts(Arrays.asList("wiiircvnfgbdvi", "xohktxagfu", "dbqjnye")))), + new CommonDynamicMatchConfigurationPatch() + .withIpGroups(Arrays.asList( + new IpGroupPatchProperties().withName("gxqqqasfeooqftp") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("rphklqlii")), + new IpGroupPatchProperties().withName("anuwgjnofg") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("sebjuymtevae")))) + .withVlanGroups(Arrays.asList( + new VlanGroupPatchProperties().withName("ywhr") + .withVlans(Arrays.asList("jvaedogz")), + new VlanGroupPatchProperties().withName("gxbxxgj") + .withVlans(Arrays.asList("phivfh")), + new VlanGroupPatchProperties().withName("tenfdvdoearywusr") + .withVlans(Arrays.asList("dt", "syfezfsmyljd", "yyrwnmwtqi")))) + .withPortGroups(Arrays.asList( + new PortGroupPatchProperties().withName("nkynkstdtfw") + .withPorts(Arrays.asList("phfxaq", "yihjcwwvaosckfa", "h", "hp")), + new PortGroupPatchProperties().withName("wweifdy") + .withPorts( + Arrays.asList("exnguwnrdpuz", "a", "hsujtggybsz", "mijxejpd"))))))); model = BinaryData.fromObject(model).toObject(NetworkTapRulePatch.class); - Assertions.assertEquals("fknwacycsyotct", model.tags().get("hfhfsat")); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("jmtf", model.tapRulesUrl()); - Assertions.assertEquals("lnirupkq", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(1991980702958146147L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("wmehfxrttxbmsenn", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); + Assertions.assertEquals("vjmxokxxamq", model.tags().get("cjrzvlcivqx")); + Assertions.assertEquals("ywywuahwcorewcn", model.properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, model.properties().configurationType()); + Assertions.assertEquals("qjfdajr", model.properties().tapRulesUrl()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + model.properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("mggewdqbxexfy", model.properties().globalNetworkTapRuleActions().truncate()); + Assertions.assertEquals("ssuqksl", model.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(660764279928457810L, model.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, model.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("eywpmohnrtlikf", + model.properties().matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); Assertions.assertEquals(EncapsulationType.NONE, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("xmsynbkd", model.matchConfigurations().get(0).actions().get(0).truncate()); + model.properties().matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); + Assertions.assertEquals(TapRuleActionType.MIRROR, + model.properties().matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("ibzicyvichcapt", + model.properties().matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.FALSE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("fxuzmsvzyqrbrn", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("jtlxfikjkxara", - model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("s", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("oebnxsqcowscuyfq", - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("clcvqs", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("ay", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("dukinhlxh", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("kekzouyveww", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - Assertions.assertEquals("fetev", model.annotation()); + model.properties().matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); + Assertions.assertEquals("nrkbnv", + model.properties().matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("cklzhznfgvlxy", + model.properties().matchConfigurations().get(0).actions().get(0).matchConfigurationName()); + Assertions.assertEquals("w", model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV6, + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); + Assertions.assertEquals("bffqc", + model.properties().dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); + Assertions.assertEquals("eunbydlg", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("hwuubwts", + model.properties().dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("lihsdbfbmdi", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("zhpjgqz", + model.properties().dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java deleted file mode 100644 index a8251e463a35..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePatchablePropertiesTests.java +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) 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.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.NetworkTapRulePatchableProperties; -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 org.junit.jupiter.api.Assertions; - -public final class NetworkTapRulePatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapRulePatchableProperties model = BinaryData.fromString( - "{\"configurationType\":\"Inline\",\"tapRulesUrl\":\"pvd\",\"matchConfigurations\":[{\"matchConfigurationName\":\"eerscdxrnrnjrcu\",\"sequenceNumber\":6706008368624061443,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"psa\",\"mameub\",\"qiqmlfvhlq\",\"skkqjmxptuei\"],\"portGroupNames\":[\"gkwdr\"]},\"protocolTypes\":[\"pahu\",\"onjkkxukguehvvp\",\"joegcjojlleuidp\",\"tonvhgnhtmeplhb\"],\"vlanMatchCondition\":{\"vlans\":[\"pmummmkva\",\"uc\"],\"innerVlans\":[\"ua\",\"qpmnu\"],\"vlanGroupNames\":[\"rchxwwuzdmhvwl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"it\",\"dsjipdviscotyxb\",\"iifef\"],\"ipGroupNames\":[\"lvrqo\"]}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"eailwdqmqf\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"tmfx\",\"matchConfigurationName\":\"d\"},{\"type\":\"Goto\",\"truncate\":\"namkuuyiuyu\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"lxicwgpthdcf\",\"matchConfigurationName\":\"z\"},{\"type\":\"Drop\",\"truncate\":\"fodropalvngtwyu\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"qrntaumdrc\",\"matchConfigurationName\":\"vkrkegtyczup\"}]},{\"matchConfigurationName\":\"yxlz\",\"sequenceNumber\":7662588380490129928,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"s\",\"xduetbapfc\",\"ewxtrl\"],\"portGroupNames\":[\"xyazkjpirgzx\",\"bcz\"]},\"protocolTypes\":[\"egbthm\",\"ritjbu\"],\"vlanMatchCondition\":{\"vlans\":[\"unozfvualjthoiv\",\"dwsngkr\",\"ihscjvakmhzbhw\"],\"innerVlans\":[\"bwihbnnxemvynu\",\"qkotauratn\"],\"vlanGroupNames\":[\"pfzsclefyrl\",\"tndqlmf\",\"ggnbbuypwovvvsfl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"rehjuqwvapx\",\"lzhpzihacenq\",\"zlxnqzubf\"],\"ipGroupNames\":[\"dbgmkfwmjcwte\",\"fhxwyr\",\"b\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"pcha\"],\"portGroupNames\":[\"eplrajubowuywevt\"]},\"protocolTypes\":[\"eikmwlaoklfni\",\"yxgucbmtredsc\",\"nstjcyyuvtz\",\"xzhclec\"],\"vlanMatchCondition\":{\"vlans\":[\"qzcl\",\"yh\",\"u\",\"gi\"],\"innerVlans\":[\"gyresgzsd\",\"mwb\",\"orj\"],\"vlanGroupNames\":[\"chy\",\"hakvyrfbqvum\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"pmaxfnzlpqmpf\",\"xef\",\"ulbl\",\"rtux\"],\"ipGroupNames\":[\"hfcaeo\",\"ifq\",\"ywjflobh\",\"hqmomfeco\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xldjmzezbj\"],\"portGroupNames\":[\"lslu\",\"bqfy\"]},\"protocolTypes\":[\"y\"],\"vlanMatchCondition\":{\"vlans\":[\"uqs\"],\"innerVlans\":[\"qyvoupr\",\"y\",\"qzssl\",\"mgw\"],\"vlanGroupNames\":[\"vrxpfdu\",\"olhg\",\"qvpbfjpoqzucfzl\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"bormvhvzielbp\",\"nqujywz\",\"qyggmnwsvhb\"],\"ipGroupNames\":[\"iwyejtobdr\"]}}],\"actions\":[{\"type\":\"Count\",\"truncate\":\"kunsbfjhhlwtpkv\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"tt\",\"matchConfigurationName\":\"kgtzqnwqsttewu\"}]},{\"matchConfigurationName\":\"ysjeufjx\",\"sequenceNumber\":1275946665450936475,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"vrhprrvbwonleqf\",\"vtlrvbstph\",\"ykunin\",\"tlnrj\"],\"portGroupNames\":[\"dbuziciqppoqvg\",\"newuhwfw\"]},\"protocolTypes\":[\"xuoxtfnres\"],\"vlanMatchCondition\":{\"vlans\":[\"gckncjmg\"],\"innerVlans\":[\"vbt\"],\"vlanGroupNames\":[\"fmjymjnh\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"upubdxckdlhz\",\"hcu\",\"vbosjj\",\"dizhrjqfyaytvsly\"],\"ipGroupNames\":[\"gniuar\",\"cjiwgsxfaio\",\"wd\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"zxbarcbpae\",\"zqsym\",\"w\"],\"portGroupNames\":[\"cytesmf\",\"crtfodqhuauzm\",\"iv\",\"trfzhhezvh\"]},\"protocolTypes\":[\"xdyyrud\",\"ahswtvdkxb\",\"ssgfenffdxbvwfqj\"],\"vlanMatchCondition\":{\"vlans\":[\"d\",\"ija\",\"xndmuvar\"],\"innerVlans\":[\"zj\",\"tp\",\"rmuhcuhtuzlx\"],\"vlanGroupNames\":[\"o\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"wrapczdojqy\",\"zesi\",\"iysnjqyowaadc\"],\"ipGroupNames\":[\"za\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"aupwhlzyckrem\",\"jlm\"],\"portGroupNames\":[\"orsirx\",\"hyrkqakofajfr\",\"prfvmkinwteyrqsh\"]},\"protocolTypes\":[\"cejo\",\"ylblfsprr\",\"cspimtcvvfxrdy\"],\"vlanMatchCondition\":{\"vlans\":[\"lxiz\",\"qikm\",\"obliqemcdiiisk\",\"bonxxupj\"],\"innerVlans\":[\"rk\",\"kgenjqnnpjwkosn\",\"xigfoujjc\",\"gdqmrlhnzkwop\"],\"vlanGroupNames\":[\"yinxu\",\"rrxyxwjezbfqpl\",\"yuekdcpvuftrsvjm\",\"svujnjktvolefcj\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"otfbjampqoclann\"],\"ipGroupNames\":[\"nlsuqbwzstr\",\"tgvpatr\",\"jjktfin\",\"hoksmmculwk\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"jflsgaojb\",\"qpqsdoctpzpuj\"],\"portGroupNames\":[\"mcdsgxcelujisw\",\"lu\"]},\"protocolTypes\":[\"hfwlfxzfwugeup\",\"knecexkgrv\",\"psjdmng\",\"yt\"],\"vlanMatchCondition\":{\"vlans\":[\"fyxcnwawoxcgzbej\",\"fbifopfjxdwdrp\",\"zqjkrf\",\"bwotfcuuugtji\"],\"innerVlans\":[\"ayiawohfm\",\"nnzm\",\"cjjkmqenh\",\"idzr\"],\"vlanGroupNames\":[\"gloiovsl\",\"ivqsuvwtenb\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"yoaq\",\"ukuicjuftekioo\",\"nd\"],\"ipGroupNames\":[\"fhvpxjhxzubfj\",\"abbwzgvzu\",\"ixcdckixs\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"vkmvyxzerejrkp\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"etjx\",\"matchConfigurationName\":\"opt\"},{\"type\":\"Log\",\"truncate\":\"whlbecgihzbpem\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"bovr\",\"matchConfigurationName\":\"xywpjhspboxhif\"},{\"type\":\"Log\",\"truncate\":\"peswyhhmifjuajx\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"mmp\",\"matchConfigurationName\":\"lyuqvcmlaexb\"},{\"type\":\"Drop\",\"truncate\":\"fpnezsjzayml\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"hyogzmsimeht\",\"matchConfigurationName\":\"uwdhtq\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"m\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"gi\",\"nomwnwnghojovke\",\"ymicjixx\",\"sfpcrtnuguefxxij\"]}],\"vlanGroups\":[{\"name\":\"veywetkrhlolmcn\",\"vlans\":[\"fgsvbbvaqdljnpet\",\"rnrdetawevx\",\"huekdxljzvdovb\",\"blerlpr\"]},{\"name\":\"qccddcbny\",\"vlans\":[\"c\",\"xwbpwyykdig\"]},{\"name\":\"lrzndas\",\"vlans\":[\"dmjqmvy\"]}],\"portGroups\":[{\"name\":\"qlarhqt\",\"ports\":[\"azekdzdzffzjwzts\"]},{\"name\":\"chggryelg\",\"ports\":[\"tig\"]},{\"name\":\"frrkdknczgorywnv\",\"ports\":[\"vmd\"]},{\"name\":\"dlhqvbkarbpyhssr\",\"ports\":[\"pkpkocm\",\"ccebxxopyicyvspe\",\"lhwyykgvrccpumd\"]}]}]}") - .toObject(NetworkTapRulePatchableProperties.class); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("pvd", model.tapRulesUrl()); - Assertions.assertEquals("eerscdxrnrnjrcu", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(6706008368624061443L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("pahu", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmummmkva", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ua", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("rchxwwuzdmhvwl", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("it", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lvrqo", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("psa", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("gkwdr", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("eailwdqmqf", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("tmfx", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("d", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("m", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("gi", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("veywetkrhlolmcn", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("fgsvbbvaqdljnpet", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("qlarhqt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("azekdzdzffzjwzts", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapRulePatchableProperties model - = new NetworkTapRulePatchableProperties().withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("pvd") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("eerscdxrnrnjrcu") - .withSequenceNumber(6706008368624061443L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes( - Arrays.asList("pahu", "onjkkxukguehvvp", "joegcjojlleuidp", "tonvhgnhtmeplhb")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("pmummmkva", "uc")) - .withInnerVlans(Arrays.asList("ua", "qpmnu")) - .withVlanGroupNames(Arrays.asList("rchxwwuzdmhvwl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("it", "dsjipdviscotyxb", "iifef")) - .withIpGroupNames(Arrays.asList("lvrqo"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("psa", "mameub", "qiqmlfvhlq", "skkqjmxptuei")) - .withPortGroupNames(Arrays.asList("gkwdr"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("eailwdqmqf") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("tmfx") - .withMatchConfigurationName("d"), - new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) - .withTruncate("namkuuyiuyu") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("lxicwgpthdcf") - .withMatchConfigurationName("z"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("fodropalvngtwyu") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("qrntaumdrc") - .withMatchConfigurationName("vkrkegtyczup"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("yxlz") - .withSequenceNumber(7662588380490129928L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("egbthm", "ritjbu")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("unozfvualjthoiv", "dwsngkr", "ihscjvakmhzbhw")) - .withInnerVlans(Arrays.asList("bwihbnnxemvynu", "qkotauratn")) - .withVlanGroupNames(Arrays.asList("pfzsclefyrl", "tndqlmf", "ggnbbuypwovvvsfl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("rehjuqwvapx", "lzhpzihacenq", "zlxnqzubf")) - .withIpGroupNames(Arrays.asList("dbgmkfwmjcwte", "fhxwyr", "b"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("s", "xduetbapfc", "ewxtrl")) - .withPortGroupNames(Arrays.asList("xyazkjpirgzx", "bcz"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes( - Arrays.asList("eikmwlaoklfni", "yxgucbmtredsc", "nstjcyyuvtz", "xzhclec")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("qzcl", "yh", "u", "gi")) - .withInnerVlans(Arrays.asList("gyresgzsd", "mwb", "orj")) - .withVlanGroupNames(Arrays.asList("chy", "hakvyrfbqvum"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("pmaxfnzlpqmpf", "xef", "ulbl", "rtux")) - .withIpGroupNames(Arrays.asList("hfcaeo", "ifq", "ywjflobh", "hqmomfeco"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("pcha")) - .withPortGroupNames(Arrays.asList("eplrajubowuywevt"))), - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("y")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("uqs")) - .withInnerVlans(Arrays.asList("qyvoupr", "y", "qzssl", "mgw")) - .withVlanGroupNames(Arrays.asList("vrxpfdu", "olhg", "qvpbfjpoqzucfzl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("bormvhvzielbp", "nqujywz", "qyggmnwsvhb")) - .withIpGroupNames(Arrays.asList("iwyejtobdr"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xldjmzezbj")) - .withPortGroupNames(Arrays.asList("lslu", "bqfy"))))) - .withActions(Arrays - .asList(new NetworkTapRuleAction().withType(TapRuleActionType.COUNT) - .withTruncate("kunsbfjhhlwtpkv") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("tt") - .withMatchConfigurationName("kgtzqnwqsttewu"))), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ysjeufjx") - .withSequenceNumber(1275946665450936475L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList( - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("xuoxtfnres")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("gckncjmg")) - .withInnerVlans(Arrays.asList("vbt")) - .withVlanGroupNames(Arrays.asList("fmjymjnh"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues( - Arrays.asList("upubdxckdlhz", "hcu", "vbosjj", "dizhrjqfyaytvsly")) - .withIpGroupNames(Arrays.asList("gniuar", "cjiwgsxfaio", "wd"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("vrhprrvbwonleqf", "vtlrvbstph", "ykunin", "tlnrj")) - .withPortGroupNames(Arrays.asList("dbuziciqppoqvg", "newuhwfw"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("xdyyrud", "ahswtvdkxb", "ssgfenffdxbvwfqj")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("d", "ija", "xndmuvar")) - .withInnerVlans(Arrays.asList("zj", "tp", "rmuhcuhtuzlx")) - .withVlanGroupNames(Arrays.asList("o"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("wrapczdojqy", "zesi", "iysnjqyowaadc")) - .withIpGroupNames(Arrays.asList("za"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition() - .withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("zxbarcbpae", "zqsym", "w")) - .withPortGroupNames(Arrays.asList("cytesmf", "crtfodqhuauzm", "iv", "trfzhhezvh"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("cejo", "ylblfsprr", "cspimtcvvfxrdy")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans(Arrays.asList("lxiz", "qikm", "obliqemcdiiisk", "bonxxupj")) - .withInnerVlans( - Arrays.asList("rk", "kgenjqnnpjwkosn", "xigfoujjc", "gdqmrlhnzkwop")) - .withVlanGroupNames(Arrays.asList("yinxu", "rrxyxwjezbfqpl", "yuekdcpvuftrsvjm", - "svujnjktvolefcj"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("otfbjampqoclann")) - .withIpGroupNames( - Arrays.asList("nlsuqbwzstr", "tgvpatr", "jjktfin", "hoksmmculwk"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("aupwhlzyckrem", "jlm")) - .withPortGroupNames(Arrays.asList("orsirx", "hyrkqakofajfr", "prfvmkinwteyrqsh"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("hfwlfxzfwugeup", "knecexkgrv", "psjdmng", "yt")) - .withVlanMatchCondition(new VlanMatchCondition() - .withVlans( - Arrays.asList("fyxcnwawoxcgzbej", "fbifopfjxdwdrp", "zqjkrf", "bwotfcuuugtji")) - .withInnerVlans(Arrays.asList("ayiawohfm", "nnzm", "cjjkmqenh", "idzr")) - .withVlanGroupNames(Arrays.asList("gloiovsl", "ivqsuvwtenb"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("yoaq", "ukuicjuftekioo", "nd")) - .withIpGroupNames(Arrays.asList("fhvpxjhxzubfj", "abbwzgvzu", "ixcdckixs"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("jflsgaojb", "qpqsdoctpzpuj")) - .withPortGroupNames(Arrays.asList("mcdsgxcelujisw", "lu"))))) - .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("vkmvyxzerejrkp") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("etjx") - .withMatchConfigurationName("opt"), - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("whlbecgihzbpem") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("bovr") - .withMatchConfigurationName("xywpjhspboxhif"), - new NetworkTapRuleAction().withType(TapRuleActionType.LOG) - .withTruncate("peswyhhmifjuajx") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("mmp") - .withMatchConfigurationName("lyuqvcmlaexb"), - new NetworkTapRuleAction().withType(TapRuleActionType.DROP) - .withTruncate("fpnezsjzayml") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("hyogzmsimeht") - .withMatchConfigurationName("uwdhtq"))))) - .withDynamicMatchConfigurations( - Arrays - .asList( - new CommonDynamicMatchConfiguration() - .withIpGroups( - Arrays - .asList(new IpGroupProperties().withName("m") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("gi", "nomwnwnghojovke", "ymicjixx", - "sfpcrtnuguefxxij")))) - .withVlanGroups(Arrays.asList( - new VlanGroupProperties().withName("veywetkrhlolmcn") - .withVlans(Arrays.asList("fgsvbbvaqdljnpet", "rnrdetawevx", "huekdxljzvdovb", - "blerlpr")), - new VlanGroupProperties().withName("qccddcbny") - .withVlans(Arrays.asList("c", "xwbpwyykdig")), - new VlanGroupProperties().withName("lrzndas").withVlans(Arrays.asList("dmjqmvy")))) - .withPortGroups(Arrays.asList( - new PortGroupProperties().withName("qlarhqt") - .withPorts(Arrays.asList("azekdzdzffzjwzts")), - new PortGroupProperties().withName("chggryelg").withPorts(Arrays.asList("tig")), - new PortGroupProperties().withName("frrkdknczgorywnv") - .withPorts(Arrays.asList("vmd")), - new PortGroupProperties().withName("dlhqvbkarbpyhssr") - .withPorts(Arrays.asList("pkpkocm", "ccebxxopyicyvspe", "lhwyykgvrccpumd")))))); - model = BinaryData.fromObject(model).toObject(NetworkTapRulePatchableProperties.class); - Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); - Assertions.assertEquals("pvd", model.tapRulesUrl()); - Assertions.assertEquals("eerscdxrnrnjrcu", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(6706008368624061443L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("pahu", - model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("pmummmkva", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("ua", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("rchxwwuzdmhvwl", - model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); - Assertions.assertEquals(SourceDestinationType.DESTINATION_IP, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); - Assertions.assertEquals(PrefixType.LONGEST_PREFIX, - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("it", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lvrqo", - model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.GTPV1, - model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); - Assertions.assertEquals(PortType.DESTINATION_PORT, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); - Assertions.assertEquals(Layer4Protocol.UDP, - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("psa", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("gkwdr", - model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.LOG, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("eailwdqmqf", model.matchConfigurations().get(0).actions().get(0).truncate()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, - model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("tmfx", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("d", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("m", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, - model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("gi", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("veywetkrhlolmcn", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("fgsvbbvaqdljnpet", - model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("qlarhqt", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("azekdzdzffzjwzts", - model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java index e20b7e0596a0..10d0f5b9e8d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulePropertiesTests.java @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleProperties; 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.GlobalNetworkTapRuleActionProperties; +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.NetworkTapRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; @@ -33,207 +34,471 @@ public final class NetworkTapRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkTapRuleProperties model = BinaryData.fromString( - "{\"networkTapId\":\"uynhbokayrgwybr\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-05-22T17:45:37Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"igsioctqkm\",\"matchConfigurations\":[{\"matchConfigurationName\":\"xvzfffhtjnwos\",\"sequenceNumber\":4567273419330613691,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"riomxeezwyhj\"],\"portGroupNames\":[\"iqegm\",\"db\",\"ohcwhpyv\"]},\"protocolTypes\":[\"detsz\",\"canzb\",\"ekwuyckyvn\",\"nsm\"],\"vlanMatchCondition\":{\"vlans\":[\"wjbct\",\"bpzujqjtotdxp\"],\"innerVlans\":[\"slhwuusieckty\",\"h\",\"uxidhhxomilddxj\"],\"vlanGroupNames\":[\"gxwjwil\",\"qrslaate\",\"twujjzgx\",\"gqwlxrhg\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"kbkkteoze\",\"ogmkorvvmvmco\",\"nqhlbs\",\"osnqliwkmzojfe\"],\"ipGroupNames\":[\"lhtgmkn\",\"zgbjbhrpgi\",\"sttcucrcmm\"]}},{\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"f\"],\"portGroupNames\":[\"sld\",\"tohqclna\",\"h\",\"gsiqikvllr\"]},\"protocolTypes\":[\"mgl\"],\"vlanMatchCondition\":{\"vlans\":[\"km\",\"rawrqkzawbunmp\",\"klwzlw\"],\"innerVlans\":[\"rne\",\"zltkaszfj\",\"xscbduxapgrcqe\",\"mvrdjomlnwsbv\"],\"vlanGroupNames\":[\"sflxkqesd\",\"ed\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"inm\",\"hymcq\",\"dklt\",\"dhqnufbxweiib\"],\"ipGroupNames\":[\"jovf\",\"ybydhui\",\"aouwudh\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"wvumosqircamqprl\",\"brugejcvjkjycz\",\"mtagelajdyol\"],\"portGroupNames\":[\"yxqfmzsizzhravr\"]},\"protocolTypes\":[\"jymgqbgcxhn\",\"xgzxlermkmer\",\"hskirhnp\"],\"vlanMatchCondition\":{\"vlans\":[\"bkfukdljq\",\"vtsdydshkpafy\"],\"innerVlans\":[\"owwzizznyufpqzst\",\"fgufyjfdkqiy\"],\"vlanGroupNames\":[\"jokgwesymzqh\",\"qpfzlpejtznxlue\",\"ujqbbgsimwejl\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"bdwbcp\",\"aswkuhydtnaczkf\",\"fatgawphnski\",\"dwgtqcumecsaa\"],\"ipGroupNames\":[\"qbdiuycsbskowkr\"]}},{\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"mqowiuasfgqg\",\"cyhfaimqvdru\",\"zkgyfpeoe\",\"gfmq\"],\"portGroupNames\":[\"kixvlzjxplh\"]},\"protocolTypes\":[\"asyntv\",\"jy\"],\"vlanMatchCondition\":{\"vlans\":[\"qrvvbq\",\"knmp\"],\"innerVlans\":[\"xgiqasifubn\"],\"vlanGroupNames\":[\"tlpwqpjnxjkhtups\",\"yo\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"wkztsmsfbevyl\",\"znfhkqytk\"],\"ipGroupNames\":[\"do\",\"gfzdgjfcycrsvl\",\"yyhigqkzjuqw\"]}}],\"actions\":[{\"type\":\"Mirror\",\"truncate\":\"x\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"yoipnfdb\",\"matchConfigurationName\":\"oscienezfvbe\"},{\"type\":\"Mirror\",\"truncate\":\"kbpjnrte\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"thr\",\"matchConfigurationName\":\"mdudsy\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"ktjhffe\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"youergaghp\",\"zxkpyehhfdyld\"]},{\"name\":\"yedzfzq\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tdereunokakzw\",\"pjlwyxe\"]},{\"name\":\"nmxrfomckewvmyi\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"jjtpdyzoutxfptof\",\"gnuywezygva\",\"gaaqw\"]},{\"name\":\"gjpytpmpvdnogehl\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"tbnukkfaxz\",\"vbxxyjisskobqoc\"]}],\"vlanGroups\":[{\"name\":\"oewyhxessmvrkd\",\"vlans\":[\"eqfbd\"]}],\"portGroups\":[{\"name\":\"esbrujbjpppktl\",\"ports\":[\"bfm\"]},{\"name\":\"ieat\",\"ports\":[\"rnminzqplgtkih\"]},{\"name\":\"ikzsrzfffji\",\"ports\":[\"bpntogkensckhb\",\"carmoyfx\",\"kwykuqdndxl\"]}]}],\"annotation\":\"h\"}") + "{\"annotation\":\"yjecrqkwakkch\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"ulborcxuibsdq\",\"matchConfigurations\":[{\"matchConfigurationName\":\"lp\",\"sequenceNumber\":281130679618784182,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"oqhbjqlqfbler\",\"f\"],\"vlanMatchCondition\":{\"vlans\":[\"shjucihbymjjvt\"],\"innerVlans\":[\"rxvjeazrahelhb\"],\"vlanGroupNames\":[\"iieqam\",\"thtpqgfzdosi\",\"kdi\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"wjg\",\"ahcrxofgrutv\"],\"ipGroupNames\":[\"cxzivxpmhz\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"dtu\"],\"portGroupNames\":[\"vhnjvpmxnhtmz\"]}},{\"protocolTypes\":[\"lfxolr\",\"vtlgx\",\"fjswequflzyyopoa\"],\"vlanMatchCondition\":{\"vlans\":[\"gwqub\",\"tbvufrkwjiemim\"],\"innerVlans\":[\"powewjs\"],\"vlanGroupNames\":[\"eedddrftfquu\",\"p\",\"lhs\",\"igeeuwbr\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"netdqw\"],\"ipGroupNames\":[\"oqgvbzpggp\",\"meyobqajejirvavr\",\"kgpogplbjuvlnh\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"egesbxne\"],\"portGroupNames\":[\"jmoplukfy\",\"kfhsovadkr\"]}},{\"protocolTypes\":[\"mwqpdkesjqbzkqm\",\"vporiwbwggi\",\"tspzjnrr\",\"ikwsbzrhdugq\"],\"vlanMatchCondition\":{\"vlans\":[\"gzfrunjfhrjhi\",\"cbaus\",\"qnczkvihvtuwy\",\"sqwzszoszjgzu\"],\"innerVlans\":[\"nys\",\"wwunqhc\"],\"vlanGroupNames\":[\"ojmslhip\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"xprrvchy\"],\"ipGroupNames\":[\"alpcufjjfxtiztq\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"axxsritr\",\"wbaaes\",\"yefmxwoqotii\"],\"portGroupNames\":[\"pasrvrmt\",\"sty\",\"kjhorlxkpy\",\"k\"]}}],\"actions\":[{\"type\":\"Goto\",\"truncate\":\"trqxxwt\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"jtsuhqh\",\"matchConfigurationName\":\"xtdyqavfxbqmzxsy\"},{\"type\":\"Redirect\",\"truncate\":\"npaami\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"hvwt\",\"matchConfigurationName\":\"bgchcgsfzhbjkiy\"}]},{\"matchConfigurationName\":\"bjsdj\",\"sequenceNumber\":3167101636708659666,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"fferzn\",\"cbivov\",\"om\"],\"vlanMatchCondition\":{\"vlans\":[\"qcooplfpohimgcky\"],\"innerVlans\":[\"eebznbznxs\"],\"vlanGroupNames\":[\"utnpbmxooqohgpn\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"fhsl\",\"qd\",\"a\"],\"ipGroupNames\":[\"nyevdyzdsytciks\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"fxkcgsfcmvhad\",\"pba\",\"vyrkljqkq\",\"sy\"],\"portGroupNames\":[\"j\",\"owggx\",\"wwdmbyp\",\"kteiidlbovwbclpr\"]}},{\"protocolTypes\":[\"an\"],\"vlanMatchCondition\":{\"vlans\":[\"cnerekyjul\"],\"innerVlans\":[\"wnqhqlqgpwxtvc\",\"bav\",\"bvxwvegenlrjcsmw\"],\"vlanGroupNames\":[\"uyflnxelrjkfzcde\",\"owwe\",\"hyfkdilbwqlqa\",\"sfqbirtybcelfjn\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"faxs\",\"dvuelumodpegqxso\",\"chazrqoxz\"],\"ipGroupNames\":[\"b\",\"qvhskbmpw\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"UDP\",\"ports\":[\"gaef\",\"awkmibu\",\"dwiu\"],\"portGroupNames\":[\"c\",\"pdyttqmiu\"]}},{\"protocolTypes\":[\"l\",\"s\",\"bmhhtuqmt\",\"ynoflqobfixngxe\"],\"vlanMatchCondition\":{\"vlans\":[\"xhnkingiqcd\",\"lrpgupsjlbs\",\"ndaf\"],\"innerVlans\":[\"uyje\",\"kcnhpplzhc\",\"zxjziuu\",\"rlnewnuwkkfzzetl\"],\"vlanGroupNames\":[\"yxzlv\",\"ywj\",\"rlgqp\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"rcbcdwhslxe\",\"ajadknmst\",\"doprwkampy\",\"wpbldz\"],\"ipGroupNames\":[\"drcy\",\"mwhuzymh\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"kmnbzko\",\"aiildcpud\",\"hquxsyjofpgv\",\"drobujnjgy\"],\"portGroupNames\":[\"mqx\",\"gid\",\"llnjg\",\"pskgrhn\"]}}],\"actions\":[{\"type\":\"Log\",\"truncate\":\"az\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"ghxhkyqzjsdkpvn\",\"matchConfigurationName\":\"zwpf\"},{\"type\":\"Redirect\",\"truncate\":\"ybn\",\"isTimestampEnabled\":\"True\",\"destinationId\":\"hohflyuvbgt\",\"matchConfigurationName\":\"zqweuyd\"}]},{\"matchConfigurationName\":\"nairvhpqsv\",\"sequenceNumber\":3958898481859680028,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{\"protocolTypes\":[\"nqnvnc\",\"rfcs\",\"vjnkoiz\"],\"vlanMatchCondition\":{\"vlans\":[\"biba\",\"ugico\",\"jtmvwrmjxyvuo\"],\"innerVlans\":[\"czbassqfyylwpp\",\"ygkbzb\"],\"vlanGroupNames\":[\"sybxhqvov\",\"pmhttuvsqjsrvjnq\",\"aqg\",\"qbfkceincnrecjbi\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"rmnszdosmjsqsvz\",\"mxtc\",\"ghndae\",\"hgsulwvgs\"],\"ipGroupNames\":[\"igvfjjuzkilmc\",\"wuhyzekypy\",\"vljlbzdlby\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ov\"],\"portGroupNames\":[\"bhanz\"]}},{\"protocolTypes\":[\"fhsh\",\"gp\"],\"vlanMatchCondition\":{\"vlans\":[\"zpbyfyvynpmggq\",\"agenvqbugihcdvf\"],\"innerVlans\":[\"orbloejzsaxzg\",\"qwvdepp\",\"naphifkfrpmpl\"],\"vlanGroupNames\":[\"ebrmjjnfp\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"imsk\",\"nkkhbykr\"],\"ipGroupNames\":[\"rcmelycpgokut\",\"rvybnz\",\"nv\",\"sh\"]},\"encapsulationType\":\"GTPv1\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"xlvzcgulaebxiauq\",\"uptessjlwjta\",\"pv\"],\"portGroupNames\":[\"kx\",\"xqayg\",\"slkvcvwp\"]}},{\"protocolTypes\":[\"jbvyezjwjkqo\"],\"vlanMatchCondition\":{\"vlans\":[\"iieyozvrc\",\"fpucwn\",\"cgq\"],\"innerVlans\":[\"zjvbxqcbgoarx\",\"uuciagvkdlhu\",\"u\"],\"vlanGroupNames\":[\"joafm\",\"fex\"]},\"ipCondition\":{\"type\":\"SourceIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"a\",\"seiancsqoac\",\"uq\",\"gsapleqfgkxen\"],\"ipGroupNames\":[\"glvyakeszsuuvul\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"vlqgfbrvecicao\",\"phirl\",\"bipiunn\"],\"portGroupNames\":[\"wz\",\"zkueruwcjomipvw\",\"a\"]}}],\"actions\":[{\"type\":\"Redirect\",\"truncate\":\"k\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"wofxxdplrel\",\"matchConfigurationName\":\"vga\"},{\"type\":\"Log\",\"truncate\":\"uxl\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"hrfjenrazwefiktl\",\"matchConfigurationName\":\"ashtostjixyzseci\"}]},{\"matchConfigurationName\":\"zdwjtacfvvtdpcbp\",\"sequenceNumber\":8950649462407027936,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{\"protocolTypes\":[\"rhfiwltkfy\",\"untethklxwh\",\"vasyyhgqok\",\"bmsrkix\"],\"vlanMatchCondition\":{\"vlans\":[\"wrlqomaqs\"],\"innerVlans\":[\"pzzbrwn\"],\"vlanGroupNames\":[\"zsxagysokli\",\"ksybvrrbnhylsb\",\"ujcy\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"stizsyqag\",\"llcbrva\",\"dylkyhtr\",\"qwfyybptmjjr\"],\"ipGroupNames\":[\"ykugdla\",\"sav\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ufkbzbf\",\"xjblajy\",\"dnbycsbtoisa\",\"dj\"],\"portGroupNames\":[\"svpzxgnywxuy\",\"lfj\"]}},{\"protocolTypes\":[\"wtmszcfyzq\",\"e\"],\"vlanMatchCondition\":{\"vlans\":[\"furdpagknxmao\",\"rgihlnzffewv\",\"kycjcg\"],\"innerVlans\":[\"qxxsd\",\"afwtydsmmab\"],\"vlanGroupNames\":[\"lejqzhpvhxp\",\"adj\",\"eullgfyog\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"e\"],\"ipGroupNames\":[\"komwdzpzlhcuexlq\",\"wwvmbjec\",\"wlbg\",\"nkfrwxo\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"TCP\",\"ports\":[\"chiypbfhm\",\"hi\",\"tqozewbrsrjzgkbr\"],\"portGroupNames\":[\"bo\",\"fq\",\"nqbjxgjwsrer\"]}},{\"protocolTypes\":[\"uudrizwkwkjxlaac\",\"dikqelssybz\",\"evgb\",\"rommkiqhypwt\"],\"vlanMatchCondition\":{\"vlans\":[\"jy\"],\"innerVlans\":[\"mzqlnaag\"],\"vlanGroupNames\":[\"j\"]},\"ipCondition\":{\"type\":\"Bidirectional\",\"prefixType\":\"LongestPrefix\",\"ipPrefixValues\":[\"psbapiale\",\"aydpuzudegefxl\",\"eggot\",\"smhssfnwh\"],\"ipGroupNames\":[\"hh\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"fthdgwuzronodv\",\"zfk\"],\"portGroupNames\":[\"ysodcikgx\",\"k\",\"zfzdjekeb\"]}},{\"protocolTypes\":[\"xz\",\"jwyfi\"],\"vlanMatchCondition\":{\"vlans\":[\"cjfa\"],\"innerVlans\":[\"lpj\"],\"vlanGroupNames\":[\"rxifqnfforxs\",\"tzngxbsalewgu\"]},\"ipCondition\":{\"type\":\"DestinationIP\",\"prefixType\":\"Prefix\",\"ipPrefixValues\":[\"vsk\",\"itlynkwfsa\",\"ng\",\"gb\"],\"ipGroupNames\":[\"mhidyliuajkln\"]},\"encapsulationType\":\"None\",\"portCondition\":{\"portType\":\"SourcePort\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"nmzr\",\"jaojpzngdrzige\",\"wsadsqyu\",\"dkhwqdmohhe\"],\"portGroupNames\":[\"unxmyevy\",\"gdeipnfizejwl\",\"iacndjzwh\",\"jodapqok\"]}}],\"actions\":[{\"type\":\"Drop\",\"truncate\":\"adxsewbempfa\",\"isTimestampEnabled\":\"False\",\"destinationId\":\"melyksygi\",\"matchConfigurationName\":\"clmslnunkqvz\"}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{\"name\":\"dexquaw\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"fzetjiz\",\"hpnbm\",\"jvvyxtvvxnakzix\"]},{\"name\":\"aybf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"whrmvlaknujmw\",\"nrzblxna\",\"hsmfndcbsyhludzj\",\"kovohwvpr\"]}],\"vlanGroups\":[{\"name\":\"tdurmdtacntjna\",\"vlans\":[\"vqiiasbt\",\"skkfkuyikm\",\"hhqsxjbjkewrigl\",\"qtrefe\"]}],\"portGroups\":[{\"name\":\"xcjffzwncvd\",\"ports\":[\"onztpcjptnnt\",\"rcjqpzj\"]},{\"name\":\"pjrrhpgsjbioag\",\"ports\":[\"qehmdqvaol\"]},{\"name\":\"xdfsfvkjc\",\"ports\":[\"rsvxphtjnhptj\",\"rkd\",\"yzhimm\"]},{\"name\":\"tdtftmizuzjd\",\"ports\":[\"yzcslazp\",\"kqoyimxpggk\",\"teagbgac\"]}]},{\"ipGroups\":[{\"name\":\"uytv\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"pbybkisboif\",\"xglpwdjraurfshzn\",\"rttuhaaa\"]},{\"name\":\"dcdjmdkqtxfrmbe\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"wagehxui\",\"wesrtjaqgb\",\"kkncypmt\",\"vspsaneyvae\"]}],\"vlanGroups\":[{\"name\":\"bnhrfbrjokjwq\",\"vlans\":[\"aqnilpp\"]},{\"name\":\"aigazwf\",\"vlans\":[\"f\"]},{\"name\":\"w\",\"vlans\":[\"eodtqfdrslzy\",\"qxse\",\"wycuhyt\",\"wgetfig\"]},{\"name\":\"eqjxzizebjrahg\",\"vlans\":[\"ubwggxzsshxliqm\",\"ckwh\",\"mdoiiyobqzwjal\",\"rsofxcacr\"]}],\"portGroups\":[{\"name\":\"mrs\",\"ports\":[\"ldprelsxfkzrz\",\"irjvqxvwkiocxo\",\"rjwbuocqflm\",\"lrlqxbctatezyozd\"]}]},{\"ipGroups\":[{\"name\":\"nlsjxcscnitodmra\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"odnvltcvma\",\"puwkupbb\",\"hiclhyzhr\"]},{\"name\":\"dfwbifnnhlsf\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"tfcq\",\"mynbrpe\",\"pfijtezgx\"]},{\"name\":\"eszamad\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"nfu\"]},{\"name\":\"czktllxswt\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"irmnrijefmr\",\"wxcevdspt\",\"gffmwtblgmkokq\",\"i\"]}],\"vlanGroups\":[{\"name\":\"fwlnmlkff\",\"vlans\":[\"estbsli\"]},{\"name\":\"dnccotelik\",\"vlans\":[\"tehhxtzxqdwbym\",\"qlngncrdorctysec\",\"ekh\"]}],\"portGroups\":[{\"name\":\"hq\",\"ports\":[\"vimmwc\",\"ozvlfymt\"]}]},{\"ipGroups\":[{\"name\":\"xup\",\"ipAddressType\":\"IPv6\",\"ipPrefixes\":[\"jbcbkgnrf\"]},{\"name\":\"schjxncqzah\",\"ipAddressType\":\"IPv4\",\"ipPrefixes\":[\"do\",\"imorzolxosgiht\"]}],\"vlanGroups\":[{\"name\":\"qbmxqf\",\"vlans\":[\"njqswshesgcsqos\",\"cxlngoufpi\",\"p\"]}],\"portGroups\":[{\"name\":\"zspfyvslaz\",\"ports\":[\"lxgtdu\"]},{\"name\":\"ty\",\"ports\":[\"drznlaxozqthkwxf\",\"gfzizyxduy\",\"nqzbrq\"]},{\"name\":\"k\",\"ports\":[\"kviyjucamnsbqoit\",\"hmucji\",\"hcxyvehy\"]},{\"name\":\"elyqdvpqfbxg\",\"ports\":[\"d\",\"sdmtxqlefnoh\",\"yw\",\"fopkyll\"]}]}],\"networkTapId\":\"yenjpwdmsfw\",\"pollingIntervalInSeconds\":120,\"lastSyncedTime\":\"2021-08-10T23:09:30Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"e\"},\"lastOperation\":{\"details\":\"xhq\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"}") .toObject(NetworkTapRuleProperties.class); - Assertions.assertEquals("h", model.annotation()); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("igsioctqkm", model.tapRulesUrl()); - Assertions.assertEquals("xvzfffhtjnwos", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4567273419330613691L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("detsz", + Assertions.assertEquals("yjecrqkwakkch", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("ulborcxuibsdq", model.tapRulesUrl()); + Assertions.assertEquals("lp", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(281130679618784182L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("oqhbjqlqfbler", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("wjbct", + Assertions.assertEquals("shjucihbymjjvt", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("slhwuusieckty", + Assertions.assertEquals("rxvjeazrahelhb", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("gxwjwil", + Assertions.assertEquals("iieqam", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("kbkkteoze", + Assertions.assertEquals("wjg", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lhtgmkn", + Assertions.assertEquals("cxzivxpmhz", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, + Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("riomxeezwyhj", + Assertions.assertEquals("dtu", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("iqegm", + Assertions.assertEquals("vhnjvpmxnhtmz", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("x", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(TapRuleActionType.GOTO, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("trqxxwt", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("yoipnfdb", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("oscienezfvbe", + Assertions.assertEquals("jtsuhqh", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("xtdyqavfxbqmzxsy", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("ktjhffe", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("dexquaw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("youergaghp", + Assertions.assertEquals("fzetjiz", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("oewyhxessmvrkd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("eqfbd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("esbrujbjpppktl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("bfm", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("tdurmdtacntjna", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("vqiiasbt", + model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("xcjffzwncvd", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("onztpcjptnnt", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(PollingIntervalInSeconds.ONE_TWENTY, model.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("e", model.globalNetworkTapRuleActions().truncate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkTapRuleProperties model = new NetworkTapRuleProperties().withAnnotation("h") - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("igsioctqkm") - .withMatchConfigurations(Arrays.asList(new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("xvzfffhtjnwos") - .withSequenceNumber(4567273419330613691L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("detsz", "canzb", "ekwuyckyvn", "nsm")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("wjbct", "bpzujqjtotdxp")) - .withInnerVlans(Arrays.asList("slhwuusieckty", "h", "uxidhhxomilddxj")) - .withVlanGroupNames(Arrays.asList("gxwjwil", "qrslaate", "twujjzgx", "gqwlxrhg"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) - .withPrefixType(PrefixType.PREFIX) - .withIpPrefixValues(Arrays.asList("kbkkteoze", "ogmkorvvmvmco", "nqhlbs", "osnqliwkmzojfe")) - .withIpGroupNames(Arrays.asList("lhtgmkn", "zgbjbhrpgi", "sttcucrcmm"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("riomxeezwyhj")) - .withPortGroupNames(Arrays.asList("iqegm", "db", "ohcwhpyv"))), - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("mgl")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("km", "rawrqkzawbunmp", "klwzlw")) - .withInnerVlans(Arrays.asList("rne", "zltkaszfj", "xscbduxapgrcqe", "mvrdjomlnwsbv")) - .withVlanGroupNames(Arrays.asList("sflxkqesd", "ed"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("inm", "hymcq", "dklt", "dhqnufbxweiib")) - .withIpGroupNames(Arrays.asList("jovf", "ybydhui", "aouwudh"))) - .withEncapsulationType(EncapsulationType.NONE) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("f")) - .withPortGroupNames(Arrays.asList("sld", "tohqclna", "h", "gsiqikvllr"))), - new NetworkTapRuleMatchCondition() - .withProtocolTypes(Arrays.asList("jymgqbgcxhn", "xgzxlermkmer", "hskirhnp")) - .withVlanMatchCondition( - new VlanMatchCondition().withVlans(Arrays.asList("bkfukdljq", "vtsdydshkpafy")) - .withInnerVlans(Arrays.asList("owwzizznyufpqzst", "fgufyjfdkqiy")) - .withVlanGroupNames(Arrays.asList("jokgwesymzqh", "qpfzlpejtznxlue", "ujqbbgsimwejl"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues( - Arrays.asList("bdwbcp", "aswkuhydtnaczkf", "fatgawphnski", "dwgtqcumecsaa")) - .withIpGroupNames(Arrays.asList("qbdiuycsbskowkr"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("wvumosqircamqprl", "brugejcvjkjycz", "mtagelajdyol")) - .withPortGroupNames(Arrays.asList("yxqfmzsizzhravr"))), - new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("asyntv", "jy")) - .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("qrvvbq", "knmp")) - .withInnerVlans(Arrays.asList("xgiqasifubn")) - .withVlanGroupNames(Arrays.asList("tlpwqpjnxjkhtups", "yo"))) - .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) - .withPrefixType(PrefixType.LONGEST_PREFIX) - .withIpPrefixValues(Arrays.asList("wkztsmsfbevyl", "znfhkqytk")) - .withIpGroupNames(Arrays.asList("do", "gfzdgjfcycrsvl", "yyhigqkzjuqw"))) - .withEncapsulationType(EncapsulationType.GTPV1) - .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.TCP) - .withPorts(Arrays.asList("mqowiuasfgqg", "cyhfaimqvdru", "zkgyfpeoe", "gfmq")) - .withPortGroupNames(Arrays.asList("kixvlzjxplh"))))) - .withActions(Arrays.asList( - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("x") - .withIsTimestampEnabled(BooleanEnumProperty.TRUE) - .withDestinationId("yoipnfdb") - .withMatchConfigurationName("oscienezfvbe"), - new NetworkTapRuleAction().withType(TapRuleActionType.MIRROR) - .withTruncate("kbpjnrte") - .withIsTimestampEnabled(BooleanEnumProperty.FALSE) - .withDestinationId("thr") - .withMatchConfigurationName("mdudsy"))))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList( - new IpGroupProperties().withName("ktjhffe") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("youergaghp", "zxkpyehhfdyld")), - new IpGroupProperties().withName("yedzfzq") - .withIpAddressType(IpAddressType.IPV6) - .withIpPrefixes(Arrays.asList("tdereunokakzw", "pjlwyxe")), - new IpGroupProperties().withName("nmxrfomckewvmyi") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("jjtpdyzoutxfptof", "gnuywezygva", "gaaqw")), - new IpGroupProperties().withName("gjpytpmpvdnogehl") - .withIpAddressType(IpAddressType.IPV4) - .withIpPrefixes(Arrays.asList("tbnukkfaxz", "vbxxyjisskobqoc")))) - .withVlanGroups(Arrays - .asList(new VlanGroupProperties().withName("oewyhxessmvrkd").withVlans(Arrays.asList("eqfbd")))) - .withPortGroups( - Arrays.asList(new PortGroupProperties().withName("esbrujbjpppktl").withPorts(Arrays.asList("bfm")), - new PortGroupProperties().withName("ieat").withPorts(Arrays.asList("rnminzqplgtkih")), - new PortGroupProperties().withName("ikzsrzfffji") - .withPorts(Arrays.asList("bpntogkensckhb", "carmoyfx", "kwykuqdndxl")))))); + NetworkTapRuleProperties model + = new NetworkTapRuleProperties().withAnnotation("yjecrqkwakkch") + .withConfigurationType(ConfigurationType.INLINE) + .withTapRulesUrl("ulborcxuibsdq") + .withMatchConfigurations(Arrays.asList( + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("lp") + .withSequenceNumber(281130679618784182L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("oqhbjqlqfbler", "f")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("shjucihbymjjvt")) + .withInnerVlans(Arrays.asList("rxvjeazrahelhb")) + .withVlanGroupNames(Arrays.asList("iieqam", "thtpqgfzdosi", "kdi"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("wjg", "ahcrxofgrutv")) + .withIpGroupNames(Arrays.asList("cxzivxpmhz"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("dtu")) + .withPortGroupNames(Arrays.asList("vhnjvpmxnhtmz"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("lfxolr", "vtlgx", "fjswequflzyyopoa")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("gwqub", "tbvufrkwjiemim")) + .withInnerVlans(Arrays.asList("powewjs")) + .withVlanGroupNames(Arrays.asList("eedddrftfquu", "p", "lhs", "igeeuwbr"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("netdqw")) + .withIpGroupNames( + Arrays.asList("oqgvbzpggp", "meyobqajejirvavr", "kgpogplbjuvlnh"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition() + .withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("egesbxne")) + .withPortGroupNames(Arrays.asList("jmoplukfy", "kfhsovadkr"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes( + Arrays.asList("mwqpdkesjqbzkqm", "vporiwbwggi", "tspzjnrr", "ikwsbzrhdugq")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans( + Arrays.asList("gzfrunjfhrjhi", "cbaus", "qnczkvihvtuwy", "sqwzszoszjgzu")) + .withInnerVlans(Arrays.asList("nys", "wwunqhc")) + .withVlanGroupNames(Arrays.asList("ojmslhip"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("xprrvchy")) + .withIpGroupNames(Arrays.asList("alpcufjjfxtiztq"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("axxsritr", "wbaaes", "yefmxwoqotii")) + .withPortGroupNames(Arrays.asList("pasrvrmt", "sty", "kjhorlxkpy", "k"))))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.GOTO) + .withTruncate("trqxxwt") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("jtsuhqh") + .withMatchConfigurationName("xtdyqavfxbqmzxsy"), + new NetworkTapRuleAction() + .withType(TapRuleActionType.REDIRECT) + .withTruncate("npaami") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("hvwt") + .withMatchConfigurationName("bgchcgsfzhbjkiy"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("bjsdj") + .withSequenceNumber(3167101636708659666L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("fferzn", "cbivov", "om")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("qcooplfpohimgcky")) + .withInnerVlans(Arrays.asList("eebznbznxs")) + .withVlanGroupNames(Arrays.asList("utnpbmxooqohgpn"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("fhsl", "qd", "a")) + .withIpGroupNames(Arrays.asList("nyevdyzdsytciks"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("fxkcgsfcmvhad", "pba", "vyrkljqkq", "sy")) + .withPortGroupNames(Arrays.asList("j", "owggx", "wwdmbyp", "kteiidlbovwbclpr"))), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("an")) + .withVlanMatchCondition( + new VlanMatchCondition().withVlans(Arrays.asList("cnerekyjul")) + .withInnerVlans(Arrays.asList("wnqhqlqgpwxtvc", "bav", "bvxwvegenlrjcsmw")) + .withVlanGroupNames(Arrays.asList("uyflnxelrjkfzcde", "owwe", "hyfkdilbwqlqa", + "sfqbirtybcelfjn"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("faxs", "dvuelumodpegqxso", "chazrqoxz")) + .withIpGroupNames(Arrays.asList("b", "qvhskbmpw"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("gaef", "awkmibu", "dwiu")) + .withPortGroupNames(Arrays.asList("c", "pdyttqmiu"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("l", "s", "bmhhtuqmt", "ynoflqobfixngxe")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("xhnkingiqcd", "lrpgupsjlbs", "ndaf")) + .withInnerVlans(Arrays.asList("uyje", "kcnhpplzhc", "zxjziuu", "rlnewnuwkkfzzetl")) + .withVlanGroupNames(Arrays.asList("yxzlv", "ywj", "rlgqp"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues( + Arrays.asList("rcbcdwhslxe", "ajadknmst", "doprwkampy", "wpbldz")) + .withIpGroupNames(Arrays.asList("drcy", "mwhuzymh"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("kmnbzko", "aiildcpud", "hquxsyjofpgv", "drobujnjgy")) + .withPortGroupNames(Arrays.asList("mqx", "gid", "llnjg", "pskgrhn"))))) + .withActions(Arrays.asList(new NetworkTapRuleAction() + .withType(TapRuleActionType.LOG) + .withTruncate("az") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("ghxhkyqzjsdkpvn") + .withMatchConfigurationName("zwpf"), + new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) + .withTruncate("ybn") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId("hohflyuvbgt") + .withMatchConfigurationName("zqweuyd"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("nairvhpqsv") + .withSequenceNumber(3958898481859680028L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("nqnvnc", "rfcs", "vjnkoiz")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("biba", "ugico", "jtmvwrmjxyvuo")) + .withInnerVlans(Arrays.asList("czbassqfyylwpp", "ygkbzb")) + .withVlanGroupNames(Arrays.asList("sybxhqvov", "pmhttuvsqjsrvjnq", "aqg", + "qbfkceincnrecjbi"))) + .withIpCondition(new IpMatchCondition() + .withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("rmnszdosmjsqsvz", "mxtc", "ghndae", "hgsulwvgs")) + .withIpGroupNames( + Arrays.asList("igvfjjuzkilmc", "wuhyzekypy", "vljlbzdlby"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("ov")) + .withPortGroupNames(Arrays.asList("bhanz"))), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("fhsh", "gp")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("zpbyfyvynpmggq", "agenvqbugihcdvf")) + .withInnerVlans(Arrays.asList("orbloejzsaxzg", "qwvdepp", "naphifkfrpmpl")) + .withVlanGroupNames(Arrays.asList("ebrmjjnfp"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues(Arrays.asList("imsk", "nkkhbykr")) + .withIpGroupNames(Arrays.asList("rcmelycpgokut", "rvybnz", "nv", "sh"))) + .withEncapsulationType(EncapsulationType.GTPV1) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("xlvzcgulaebxiauq", "uptessjlwjta", "pv")) + .withPortGroupNames(Arrays.asList("kx", "xqayg", "slkvcvwp"))), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("jbvyezjwjkqo")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("iieyozvrc", "fpucwn", "cgq")) + .withInnerVlans(Arrays.asList("zjvbxqcbgoarx", "uuciagvkdlhu", "u")) + .withVlanGroupNames(Arrays.asList("joafm", "fex"))) + .withIpCondition( + new IpMatchCondition().withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues( + Arrays.asList("a", "seiancsqoac", "uq", "gsapleqfgkxen")) + .withIpGroupNames(Arrays.asList("glvyakeszsuuvul"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.DESTINATION_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("vlqgfbrvecicao", "phirl", "bipiunn")) + .withPortGroupNames(Arrays.asList("wz", "zkueruwcjomipvw", "a"))))) + .withActions(Arrays.asList( + new NetworkTapRuleAction().withType(TapRuleActionType.REDIRECT) + .withTruncate("k") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("wofxxdplrel") + .withMatchConfigurationName("vga"), + new NetworkTapRuleAction() + .withType(TapRuleActionType.LOG) + .withTruncate("uxl") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("hrfjenrazwefiktl") + .withMatchConfigurationName("ashtostjixyzseci"))), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("zdwjtacfvvtdpcbp") + .withSequenceNumber(8950649462407027936L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions(Arrays.asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("rhfiwltkfy", "untethklxwh", "vasyyhgqok", "bmsrkix")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("wrlqomaqs")) + .withInnerVlans(Arrays.asList("pzzbrwn")) + .withVlanGroupNames(Arrays.asList("zsxagysokli", "ksybvrrbnhylsb", "ujcy"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues( + Arrays.asList("stizsyqag", "llcbrva", "dylkyhtr", "qwfyybptmjjr")) + .withIpGroupNames(Arrays.asList("ykugdla", "sav"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("ufkbzbf", "xjblajy", "dnbycsbtoisa", "dj")) + .withPortGroupNames(Arrays.asList("svpzxgnywxuy", "lfj"))), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("wtmszcfyzq", "e")) + .withVlanMatchCondition(new VlanMatchCondition() + .withVlans(Arrays.asList("furdpagknxmao", "rgihlnzffewv", "kycjcg")) + .withInnerVlans(Arrays.asList("qxxsd", "afwtydsmmab")) + .withVlanGroupNames(Arrays.asList("lejqzhpvhxp", "adj", "eullgfyog"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("e")) + .withIpGroupNames(Arrays.asList("komwdzpzlhcuexlq", "wwvmbjec", "wlbg", "nkfrwxo"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("chiypbfhm", "hi", "tqozewbrsrjzgkbr")) + .withPortGroupNames(Arrays.asList("bo", "fq", "nqbjxgjwsrer"))), + new NetworkTapRuleMatchCondition() + .withProtocolTypes( + Arrays.asList("uudrizwkwkjxlaac", "dikqelssybz", "evgb", "rommkiqhypwt")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("jy")) + .withInnerVlans(Arrays.asList("mzqlnaag")) + .withVlanGroupNames(Arrays.asList("j"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.BIDIRECTIONAL) + .withPrefixType(PrefixType.LONGEST_PREFIX) + .withIpPrefixValues( + Arrays.asList("psbapiale", "aydpuzudegefxl", "eggot", "smhssfnwh")) + .withIpGroupNames(Arrays.asList("hh"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.UDP) + .withPorts(Arrays.asList("fthdgwuzronodv", "zfk")) + .withPortGroupNames(Arrays.asList("ysodcikgx", "k", "zfzdjekeb"))), + new NetworkTapRuleMatchCondition().withProtocolTypes(Arrays.asList("xz", "jwyfi")) + .withVlanMatchCondition(new VlanMatchCondition().withVlans(Arrays.asList("cjfa")) + .withInnerVlans(Arrays.asList("lpj")) + .withVlanGroupNames(Arrays.asList("rxifqnfforxs", "tzngxbsalewgu"))) + .withIpCondition(new IpMatchCondition().withType(SourceDestinationType.DESTINATION_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("vsk", "itlynkwfsa", "ng", "gb")) + .withIpGroupNames(Arrays.asList("mhidyliuajkln"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition(new PortCondition().withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("nmzr", "jaojpzngdrzige", "wsadsqyu", "dkhwqdmohhe")) + .withPortGroupNames( + Arrays.asList("unxmyevy", "gdeipnfizejwl", "iacndjzwh", "jodapqok"))))) + .withActions(Arrays.asList(new NetworkTapRuleAction().withType(TapRuleActionType.DROP) + .withTruncate("adxsewbempfa") + .withIsTimestampEnabled(BooleanEnumProperty.FALSE) + .withDestinationId("melyksygi") + .withMatchConfigurationName("clmslnunkqvz"))))) + .withDynamicMatchConfigurations( + Arrays.asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays.asList( + new IpGroupProperties().withName("dexquaw") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("fzetjiz", "hpnbm", "jvvyxtvvxnakzix")), + new IpGroupProperties().withName("aybf") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("whrmvlaknujmw", "nrzblxna", "hsmfndcbsyhludzj", + "kovohwvpr")))) + .withVlanGroups(Arrays + .asList(new VlanGroupProperties().withName("tdurmdtacntjna") + .withVlans(Arrays.asList("vqiiasbt", "skkfkuyikm", "hhqsxjbjkewrigl", "qtrefe")))) + .withPortGroups(Arrays.asList(new PortGroupProperties() + .withName("xcjffzwncvd") + .withPorts(Arrays.asList("onztpcjptnnt", "rcjqpzj")), + new PortGroupProperties().withName("pjrrhpgsjbioag") + .withPorts(Arrays.asList("qehmdqvaol")), + new PortGroupProperties().withName("xdfsfvkjc") + .withPorts(Arrays.asList("rsvxphtjnhptj", "rkd", "yzhimm")), + new PortGroupProperties() + .withName("tdtftmizuzjd") + .withPorts(Arrays.asList("yzcslazp", "kqoyimxpggk", "teagbgac")))), + new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList( + new IpGroupProperties().withName("uytv") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("pbybkisboif", "xglpwdjraurfshzn", "rttuhaaa")), + new IpGroupProperties().withName("dcdjmdkqtxfrmbe") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("wagehxui", "wesrtjaqgb", "kkncypmt", "vspsaneyvae")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("bnhrfbrjokjwq").withVlans(Arrays.asList("aqnilpp")), + new VlanGroupProperties().withName("aigazwf").withVlans(Arrays.asList("f")), + new VlanGroupProperties() + .withName("w") + .withVlans(Arrays.asList("eodtqfdrslzy", "qxse", "wycuhyt", "wgetfig")), + new VlanGroupProperties().withName("eqjxzizebjrahg") + .withVlans( + Arrays.asList("ubwggxzsshxliqm", "ckwh", "mdoiiyobqzwjal", "rsofxcacr")))) + .withPortGroups(Arrays.asList(new PortGroupProperties().withName("mrs") + .withPorts(Arrays.asList("ldprelsxfkzrz", "irjvqxvwkiocxo", "rjwbuocqflm", + "lrlqxbctatezyozd")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("nlsjxcscnitodmra") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("odnvltcvma", "puwkupbb", "hiclhyzhr")), + new IpGroupProperties().withName("dfwbifnnhlsf") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("tfcq", "mynbrpe", "pfijtezgx")), + new IpGroupProperties().withName("eszamad") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("nfu")), + new IpGroupProperties().withName("czktllxswt") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("irmnrijefmr", "wxcevdspt", "gffmwtblgmkokq", "i")))) + .withVlanGroups(Arrays.asList( + new VlanGroupProperties().withName("fwlnmlkff").withVlans(Arrays.asList("estbsli")), + new VlanGroupProperties().withName("dnccotelik") + .withVlans(Arrays.asList("tehhxtzxqdwbym", "qlngncrdorctysec", "ekh")))) + .withPortGroups(Arrays.asList(new PortGroupProperties().withName("hq") + .withPorts(Arrays.asList("vimmwc", "ozvlfymt")))), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList( + new IpGroupProperties().withName("xup") + .withIpAddressType(IPAddressType.IPV6) + .withIpPrefixes(Arrays.asList("jbcbkgnrf")), + new IpGroupProperties().withName("schjxncqzah") + .withIpAddressType(IPAddressType.IPV4) + .withIpPrefixes(Arrays.asList("do", "imorzolxosgiht")))) + .withVlanGroups(Arrays.asList(new VlanGroupProperties().withName("qbmxqf") + .withVlans(Arrays.asList("njqswshesgcsqos", "cxlngoufpi", "p")))) + .withPortGroups(Arrays.asList( + new PortGroupProperties().withName("zspfyvslaz").withPorts(Arrays.asList("lxgtdu")), + new PortGroupProperties().withName("ty") + .withPorts(Arrays.asList("drznlaxozqthkwxf", "gfzizyxduy", "nqzbrq")), + new PortGroupProperties().withName("k") + .withPorts(Arrays.asList("kviyjucamnsbqoit", "hmucji", "hcxyvehy")), + new PortGroupProperties().withName("elyqdvpqfbxg") + .withPorts(Arrays.asList("d", "sdmtxqlefnoh", "yw", "fopkyll")))))) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.ONE_TWENTY) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("e")); model = BinaryData.fromObject(model).toObject(NetworkTapRuleProperties.class); - Assertions.assertEquals("h", model.annotation()); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.configurationType()); - Assertions.assertEquals("igsioctqkm", model.tapRulesUrl()); - Assertions.assertEquals("xvzfffhtjnwos", model.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(4567273419330613691L, model.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("detsz", + Assertions.assertEquals("yjecrqkwakkch", model.annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, model.configurationType()); + Assertions.assertEquals("ulborcxuibsdq", model.tapRulesUrl()); + Assertions.assertEquals("lp", model.matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(281130679618784182L, model.matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, model.matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals("oqhbjqlqfbler", model.matchConfigurations().get(0).matchConditions().get(0).protocolTypes().get(0)); - Assertions.assertEquals("wjbct", + Assertions.assertEquals("shjucihbymjjvt", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlans().get(0)); - Assertions.assertEquals("slhwuusieckty", + Assertions.assertEquals("rxvjeazrahelhb", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().innerVlans().get(0)); - Assertions.assertEquals("gxwjwil", + Assertions.assertEquals("iieqam", model.matchConfigurations().get(0).matchConditions().get(0).vlanMatchCondition().vlanGroupNames().get(0)); Assertions.assertEquals(SourceDestinationType.SOURCE_IP, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().type()); Assertions.assertEquals(PrefixType.PREFIX, model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().prefixType()); - Assertions.assertEquals("kbkkteoze", + Assertions.assertEquals("wjg", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipPrefixValues().get(0)); - Assertions.assertEquals("lhtgmkn", + Assertions.assertEquals("cxzivxpmhz", model.matchConfigurations().get(0).matchConditions().get(0).ipCondition().ipGroupNames().get(0)); - Assertions.assertEquals(EncapsulationType.NONE, + Assertions.assertEquals(EncapsulationType.GTPV1, model.matchConfigurations().get(0).matchConditions().get(0).encapsulationType()); Assertions.assertEquals(PortType.SOURCE_PORT, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portType()); Assertions.assertEquals(Layer4Protocol.UDP, model.matchConfigurations().get(0).matchConditions().get(0).portCondition().layer4Protocol()); - Assertions.assertEquals("riomxeezwyhj", + Assertions.assertEquals("dtu", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().ports().get(0)); - Assertions.assertEquals("iqegm", + Assertions.assertEquals("vhnjvpmxnhtmz", model.matchConfigurations().get(0).matchConditions().get(0).portCondition().portGroupNames().get(0)); - Assertions.assertEquals(TapRuleActionType.MIRROR, model.matchConfigurations().get(0).actions().get(0).type()); - Assertions.assertEquals("x", model.matchConfigurations().get(0).actions().get(0).truncate()); + Assertions.assertEquals(TapRuleActionType.GOTO, model.matchConfigurations().get(0).actions().get(0).type()); + Assertions.assertEquals("trqxxwt", model.matchConfigurations().get(0).actions().get(0).truncate()); Assertions.assertEquals(BooleanEnumProperty.TRUE, model.matchConfigurations().get(0).actions().get(0).isTimestampEnabled()); - Assertions.assertEquals("yoipnfdb", model.matchConfigurations().get(0).actions().get(0).destinationId()); - Assertions.assertEquals("oscienezfvbe", + Assertions.assertEquals("jtsuhqh", model.matchConfigurations().get(0).actions().get(0).destinationId()); + Assertions.assertEquals("xtdyqavfxbqmzxsy", model.matchConfigurations().get(0).actions().get(0).matchConfigurationName()); - Assertions.assertEquals("ktjhffe", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); - Assertions.assertEquals(IpAddressType.IPV4, + Assertions.assertEquals("dexquaw", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).name()); + Assertions.assertEquals(IPAddressType.IPV4, model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipAddressType()); - Assertions.assertEquals("youergaghp", + Assertions.assertEquals("fzetjiz", model.dynamicMatchConfigurations().get(0).ipGroups().get(0).ipPrefixes().get(0)); - Assertions.assertEquals("oewyhxessmvrkd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); - Assertions.assertEquals("eqfbd", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); - Assertions.assertEquals("esbrujbjpppktl", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); - Assertions.assertEquals("bfm", model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals("tdurmdtacntjna", model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).name()); + Assertions.assertEquals("vqiiasbt", + model.dynamicMatchConfigurations().get(0).vlanGroups().get(0).vlans().get(0)); + Assertions.assertEquals("xcjffzwncvd", model.dynamicMatchConfigurations().get(0).portGroups().get(0).name()); + Assertions.assertEquals("onztpcjptnnt", + model.dynamicMatchConfigurations().get(0).portGroups().get(0).ports().get(0)); + Assertions.assertEquals(PollingIntervalInSeconds.ONE_TWENTY, model.pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, model.globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("e", model.globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java index 4e62aea23a34..21949143dfbe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateMockTests.java @@ -1,23 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +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.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; 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.NetworkTapRuleProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; @@ -34,66 +37,95 @@ public final class NetworkTapRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkTapId\":\"pyzxcp\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-03-28T19:43:37Z\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"yvaxwzbwxx\",\"matchConfigurations\":[{\"matchConfigurationName\":\"xsrrhr\",\"sequenceNumber\":431353177903491287,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"zuimpiybmybtihcg\",\"sequenceNumber\":8092509622305080555,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]}],\"annotation\":\"hxqnlmjvpm\"},\"location\":\"fibwvhwouhysr\",\"tags\":{\"yxpdzvgyujkxjge\":\"zjsnxzljxa\"},\"id\":\"zdbigitra\",\"name\":\"udyrsir\",\"type\":\"bpi\"}"; + = "{\"properties\":{\"annotation\":\"pclnm\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"dh\",\"matchConfigurations\":[{\"matchConfigurationName\":\"vozrdzrik\",\"sequenceNumber\":3395133181393915857,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"jgozo\",\"sequenceNumber\":3809918543398293316,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]}],\"networkTapId\":\"s\",\"pollingIntervalInSeconds\":90,\"lastSyncedTime\":\"2021-12-05T09:31:29Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"hvsfgywkinkhv\"},\"lastOperation\":{\"details\":\"gmebvn\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"qjj\",\"tags\":{\"tvcjd\":\"oxkcttpc\"},\"id\":\"mknkkhvcrjq\",\"name\":\"bmyftzbxfgosrbu\",\"type\":\"lqn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTapRule response = manager.networkTapRules() - .define("mkuquvcgvn") - .withRegion("edijdhzkwvuewe") - .withExistingResourceGroup("hoqpbfjfcbweabpt") - .withTags(mapOf("lxdknxctglz", "jels", "fsgwi", "cx", "wjudx", "yiw", "zcffchn", "fvn")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("s") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("wfrgdmbgbht") - .withSequenceNumber(6435381219829762785L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("abhlgrrskvtz") - .withSequenceNumber(2401975033262174312L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions( - Arrays.asList(new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations( - Arrays - .asList( + .define("jmsa") + .withRegion("lkyncjyafzzc") + .withExistingResourceGroup("vxpolato") + .withProperties(new NetworkTapRuleProperties().withAnnotation("muxlthyxryvwn") + .withConfigurationType(ConfigurationType.INLINE) + .withTapRulesUrl("ig") + .withMatchConfigurations(Arrays.asList( + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("cnqvbnybffc") + .withSequenceNumber(4211573682468462917L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) + .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), + new NetworkTapRuleAction(), new NetworkTapRuleAction())), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("pgvgog") + .withSequenceNumber(3850865181441650176L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), + new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) + .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("dgyqenicrznaml") + .withSequenceNumber(172146767963314300L) + .withIpAddressType(IPAddressType.IPV4) + .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), + new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) + .withActions(Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), + new NetworkTapRuleAction())), + new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("stowvgwvf") + .withSequenceNumber(8909662850014615304L) + .withIpAddressType(IPAddressType.IPV6) + .withMatchConditions( + Arrays.asList(new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) + .withActions(Arrays.asList(new NetworkTapRuleAction())))) + .withDynamicMatchConfigurations( + Arrays.asList( new CommonDynamicMatchConfiguration() .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) + .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), + new VlanGroupProperties(), new VlanGroupProperties())) + .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), + new PortGroupProperties())), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), + new IpGroupProperties())) + .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration().withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) + .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), + new IpGroupProperties(), new IpGroupProperties())) + .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) + .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), + new PortGroupProperties(), new PortGroupProperties())), + new CommonDynamicMatchConfiguration() + .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), + new IpGroupProperties(), new IpGroupProperties())) .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("thqnztuki") + new VlanGroupProperties(), new VlanGroupProperties())) + .withPortGroups(Arrays.asList(new PortGroupProperties())))) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIXTY) + .withGlobalNetworkTapRuleActions( + new GlobalNetworkTapRuleActionProperties().withEnableCount(BooleanEnumProperty.TRUE) + .withTruncate("yjvkcldonseka"))) + .withTags(mapOf("rduabqbverbj", "bbavod")) .create(); - Assertions.assertEquals("fibwvhwouhysr", response.location()); - Assertions.assertEquals("zjsnxzljxa", response.tags().get("yxpdzvgyujkxjge")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, response.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("yvaxwzbwxx", response.tapRulesUrl()); - Assertions.assertEquals("xsrrhr", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(431353177903491287L, response.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("hxqnlmjvpm", response.annotation()); + Assertions.assertEquals("qjj", response.location()); + Assertions.assertEquals("oxkcttpc", response.tags().get("tvcjd")); + Assertions.assertEquals("pclnm", response.properties().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, response.properties().configurationType()); + Assertions.assertEquals("dh", response.properties().tapRulesUrl()); + Assertions.assertEquals("vozrdzrik", + response.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(3395133181393915857L, + response.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, response.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(PollingIntervalInSeconds.NINETY, response.properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("hvsfgywkinkhv", response.properties().globalNetworkTapRuleActions().truncate()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java index a822db9ccebd..6445aa01474b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import java.nio.charset.StandardCharsets; @@ -24,27 +25,31 @@ public final class NetworkTapRulesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkTapId\":\"gcemjtiljxa\",\"pollingIntervalInSeconds\":30,\"lastSyncedTime\":\"2021-04-17T10:46:29Z\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"dxcmpdmdsypks\",\"matchConfigurations\":[{\"matchConfigurationName\":\"ehxjoupxehsbecxu\",\"sequenceNumber\":2810565747523667294,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{}]}],\"annotation\":\"i\"},\"location\":\"vucyackgkavpmg\",\"tags\":{\"jabpnxohagcojgmy\":\"ohfksixvwkpcesmu\",\"ehrq\":\"jdgm\",\"pbnjiweyuig\":\"gd\"},\"id\":\"zsebkbfykgmwurcx\",\"name\":\"jyxyunypf\",\"type\":\"vjgovbbn\"}"; + = "{\"properties\":{\"annotation\":\"eajyifeiiriomjd\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"btlxrdepqtzzhkp\",\"matchConfigurations\":[{\"matchConfigurationName\":\"vfno\",\"sequenceNumber\":7940018990713131589,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{}]},{\"matchConfigurationName\":\"x\",\"sequenceNumber\":1436570440721196794,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"networkTapId\":\"cwcp\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-03-26T15:48:48Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"False\",\"truncate\":\"ljsoasxjjklmpbg\"},\"lastOperation\":{\"details\":\"xfdxrcbnmbbhluv\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\"},\"location\":\"omzlreiwdskiegta\",\"tags\":{\"qo\":\"leptaa\",\"kmihggv\":\"xaodbhgxbadbor\",\"viynlslgxif\":\"hqwyxbat\"},\"id\":\"dsclqwkddgepu\",\"name\":\"ambzfxgshaq\",\"type\":\"ueq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTapRule response = manager.networkTapRules() - .getByResourceGroupWithResponse("flhhbupqovuw", "vqihmqhqjd", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("efojpnixdgqjkfvm", "n", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vucyackgkavpmg", response.location()); - Assertions.assertEquals("ohfksixvwkpcesmu", response.tags().get("jabpnxohagcojgmy")); - Assertions.assertEquals(PollingIntervalInSeconds.THREE_ZERO, response.pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.INLINE, response.configurationType()); - Assertions.assertEquals("dxcmpdmdsypks", response.tapRulesUrl()); - Assertions.assertEquals("ehxjoupxehsbecxu", response.matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2810565747523667294L, response.matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, response.matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("i", response.annotation()); + Assertions.assertEquals("omzlreiwdskiegta", response.location()); + Assertions.assertEquals("leptaa", response.tags().get("qo")); + Assertions.assertEquals("eajyifeiiriomjd", response.properties().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, response.properties().configurationType()); + Assertions.assertEquals("btlxrdepqtzzhkp", response.properties().tapRulesUrl()); + Assertions.assertEquals("vfno", response.properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(7940018990713131589L, + response.properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, response.properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(PollingIntervalInSeconds.SIXTY, response.properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, + response.properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("ljsoasxjjklmpbg", response.properties().globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java index 0e6d7facbc80..3b5f2040ac64 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import java.nio.charset.StandardCharsets; @@ -25,30 +26,34 @@ public final class NetworkTapRulesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapId\":\"qgmztlrubn\",\"pollingIntervalInSeconds\":30,\"lastSyncedTime\":\"2021-08-02T08:13:49Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"airoog\",\"matchConfigurations\":[{\"matchConfigurationName\":\"obdqiuppavqovijp\",\"sequenceNumber\":2060601150098446573,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"b\",\"sequenceNumber\":8549993605129343385,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"jefl\"},\"location\":\"ieeqjdfxx\",\"tags\":{\"rijbiterqfu\":\"duxkepga\",\"dd\":\"errcanlpf\",\"qawupqkvmy\":\"wpg\"},\"id\":\"ueefrxzwvcvtjd\",\"name\":\"dagwxjafbdvpcd\",\"type\":\"dbjzxrpxji\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"tunll\",\"configurationType\":\"File\",\"tapRulesUrl\":\"iyguuhylzbdimtd\",\"matchConfigurations\":[{\"matchConfigurationName\":\"f\",\"sequenceNumber\":9013582439115911449,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"xhbttkk\",\"sequenceNumber\":7146325214743009595,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"zjvkqjrbblhcmxx\",\"sequenceNumber\":8010724726903122903,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{},{},{},{}]}],\"networkTapId\":\"vagcsmrte\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-12-05T16:14:35Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"zysfjdco\"},\"lastOperation\":{\"details\":\"bpqelmszobt\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\"},\"location\":\"bgrdrumu\",\"tags\":{\"kwv\":\"wecdsybiazfvx\",\"byqqon\":\"eqly\"},\"id\":\"rekiojusmdodku\",\"name\":\"ycntaov\",\"type\":\"yykx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkTapRules().listByResourceGroup("jxr", com.azure.core.util.Context.NONE); + = manager.networkTapRules().listByResourceGroup("niagzmyxsoxqa", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ieeqjdfxx", response.iterator().next().location()); - Assertions.assertEquals("duxkepga", response.iterator().next().tags().get("rijbiterqfu")); - Assertions.assertEquals(PollingIntervalInSeconds.THREE_ZERO, - response.iterator().next().pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.INLINE, response.iterator().next().configurationType()); - Assertions.assertEquals("airoog", response.iterator().next().tapRulesUrl()); - Assertions.assertEquals("obdqiuppavqovijp", - response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(2060601150098446573L, - response.iterator().next().matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, - response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("jefl", response.iterator().next().annotation()); + Assertions.assertEquals("bgrdrumu", response.iterator().next().location()); + Assertions.assertEquals("wecdsybiazfvx", response.iterator().next().tags().get("kwv")); + Assertions.assertEquals("tunll", response.iterator().next().properties().annotation()); + Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().properties().configurationType()); + Assertions.assertEquals("iyguuhylzbdimtd", response.iterator().next().properties().tapRulesUrl()); + Assertions.assertEquals("f", + response.iterator().next().properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(9013582439115911449L, + response.iterator().next().properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV4, + response.iterator().next().properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(PollingIntervalInSeconds.SIXTY, + response.iterator().next().properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.iterator().next().properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("zysfjdco", + response.iterator().next().properties().globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java index 9b47ef6a1dfd..f906ec814d49 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; -import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IPAddressType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; import java.nio.charset.StandardCharsets; @@ -25,29 +26,33 @@ public final class NetworkTapRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkTapId\":\"upirvdonka\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-04-11T15:36:29Z\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Disabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"jhtcyznrhighnxh\",\"matchConfigurations\":[{\"matchConfigurationName\":\"nktsvwqdarjteq\",\"sequenceNumber\":3721982071130664130,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"sttximeztasflgme\",\"sequenceNumber\":6905114670976295777,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]}],\"annotation\":\"pleirjr\"},\"location\":\"k\",\"tags\":{\"bdukid\":\"dubmazlx\",\"kpardo\":\"qeyqrlgpkypb\",\"yhbzmgzsyt\":\"dtedxz\",\"sqsbq\":\"pfslrx\"},\"id\":\"q\",\"name\":\"pi\",\"type\":\"fstkdlyj\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"pkdsldy\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"vswlhj\",\"matchConfigurations\":[{\"matchConfigurationName\":\"ygszhpnatltjekq\",\"sequenceNumber\":2841017436125241980,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"bubzfay\",\"sequenceNumber\":3125510356690470861,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{}],\"actions\":[{}]},{\"matchConfigurationName\":\"erzsnfgmo\",\"sequenceNumber\":5678722840810138280,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"pkymq\",\"sequenceNumber\":5700826635671217990,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{}]}],\"networkTapId\":\"rmtuprqt\",\"pollingIntervalInSeconds\":90,\"lastSyncedTime\":\"2021-08-14T05:47:06Z\",\"globalNetworkTapRuleActions\":{\"enableCount\":\"True\",\"truncate\":\"ajkdejparjv\"},\"lastOperation\":{\"details\":\"zfjbd\"},\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"bwmrdl\",\"tags\":{\"bhgzffemryoiaobb\":\"lhwrikrul\",\"bliibxol\":\"cdlccqumvb\",\"ixr\":\"inxxj\"},\"id\":\"kwxcaagzlq\",\"name\":\"sgzgsgzlbunm\",\"type\":\"hacfiyrywfry\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkTapRules().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("k", response.iterator().next().location()); - Assertions.assertEquals("dubmazlx", response.iterator().next().tags().get("bdukid")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, - response.iterator().next().pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, response.iterator().next().configurationType()); - Assertions.assertEquals("jhtcyznrhighnxh", response.iterator().next().tapRulesUrl()); - Assertions.assertEquals("nktsvwqdarjteq", - response.iterator().next().matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3721982071130664130L, - response.iterator().next().matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV4, - response.iterator().next().matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("pleirjr", response.iterator().next().annotation()); + Assertions.assertEquals("bwmrdl", response.iterator().next().location()); + Assertions.assertEquals("lhwrikrul", response.iterator().next().tags().get("bhgzffemryoiaobb")); + Assertions.assertEquals("pkdsldy", response.iterator().next().properties().annotation()); + Assertions.assertEquals(ConfigurationType.INLINE, response.iterator().next().properties().configurationType()); + Assertions.assertEquals("vswlhj", response.iterator().next().properties().tapRulesUrl()); + Assertions.assertEquals("ygszhpnatltjekq", + response.iterator().next().properties().matchConfigurations().get(0).matchConfigurationName()); + Assertions.assertEquals(2841017436125241980L, + response.iterator().next().properties().matchConfigurations().get(0).sequenceNumber()); + Assertions.assertEquals(IPAddressType.IPV6, + response.iterator().next().properties().matchConfigurations().get(0).ipAddressType()); + Assertions.assertEquals(PollingIntervalInSeconds.NINETY, + response.iterator().next().properties().pollingIntervalInSeconds()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, + response.iterator().next().properties().globalNetworkTapRuleActions().enableCount()); + Assertions.assertEquals("ajkdejparjv", + response.iterator().next().properties().globalNetworkTapRuleActions().truncate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java deleted file mode 100644 index c41c3cfaf8f4..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListResultTests.java +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) 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.NetworkTapRuleInner; -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.NetworkTapRuleAction; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; -import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapRulesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapRulesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkTapId\":\"qh\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-05-19T12:21:06Z\",\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"vbvx\",\"matchConfigurations\":[{\"matchConfigurationName\":\"enlrjcsmwevgu\",\"sequenceNumber\":3641911805209378415,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"zcdeto\",\"sequenceNumber\":5633343192239688625,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{}],\"portGroups\":[{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"jyhzfaxskdvu\"},\"location\":\"umo\",\"tags\":{\"sorch\":\"gq\",\"kbmpw\":\"zrqoxzyhlbeqvh\",\"zgaefhawkmib\":\"slajgg\",\"wi\":\"y\"},\"id\":\"rnicupdyttqmi\",\"name\":\"vj\",\"type\":\"l\"},{\"properties\":{\"networkTapId\":\"ebmhhtuq\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-11-29T08:34:34Z\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"ngxebihexhnk\",\"matchConfigurations\":[{\"matchConfigurationName\":\"qcdol\",\"sequenceNumber\":1306450790437008316,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"ndaf\",\"sequenceNumber\":8346440145061268112,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"hpplz\",\"sequenceNumber\":6540366081194941470,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{},{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{},{},{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{}]},{\"ipGroups\":[{},{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]}],\"annotation\":\"wjvrlgqpwwlzpd\"},\"location\":\"rcbcdwhslxe\",\"tags\":{\"oprwkampyh\":\"adknmstb\"},\"id\":\"pbldz\",\"name\":\"iudrcycmwhuzym\",\"type\":\"lhihqkn\"},{\"properties\":{\"networkTapId\":\"kmnbzko\",\"pollingIntervalInSeconds\":60,\"lastSyncedTime\":\"2021-11-04T18:07:20Z\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"configurationType\":\"Inline\",\"tapRulesUrl\":\"xsyjofpgved\",\"matchConfigurations\":[{\"matchConfigurationName\":\"jnjgyb\",\"sequenceNumber\":3081568456009405224,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{},{}]},{\"matchConfigurationName\":\"l\",\"sequenceNumber\":4032761014302250041,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{}],\"actions\":[{},{}]},{\"matchConfigurationName\":\"ytslg\",\"sequenceNumber\":4807067230273446470,\"ipAddressType\":\"IPv4\",\"matchConditions\":[{},{},{},{}],\"actions\":[{},{},{}]},{\"matchConfigurationName\":\"kyqzjsdkpvnr\",\"sequenceNumber\":1950278585844333204,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{},{},{},{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{}]}],\"annotation\":\"flyuvbgtz\"},\"location\":\"qweuydyb\",\"tags\":{\"zeogeatr\":\"rvhpqsv\",\"rfcs\":\"nqnvnc\",\"zsqbibaaugicovj\":\"vjnkoiz\"},\"id\":\"mvwrmjxyvuodnx\",\"name\":\"zbassqfyy\",\"type\":\"wppeygk\"},{\"properties\":{\"networkTapId\":\"bloasyb\",\"pollingIntervalInSeconds\":90,\"lastSyncedTime\":\"2021-11-03T20:44:03Z\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\",\"configurationType\":\"File\",\"tapRulesUrl\":\"sqjsrvjnqtaqgxqb\",\"matchConfigurations\":[{\"matchConfigurationName\":\"incnrecjbiywev\",\"sequenceNumber\":8939098849713135757,\"ipAddressType\":\"IPv6\",\"matchConditions\":[{}],\"actions\":[{}]}],\"dynamicMatchConfigurations\":[{\"ipGroups\":[{}],\"vlanGroups\":[{},{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{}],\"vlanGroups\":[{},{}],\"portGroups\":[{},{},{},{}]},{\"ipGroups\":[{},{}],\"vlanGroups\":[{},{},{},{}],\"portGroups\":[{},{},{}]}],\"annotation\":\"vhgsulwvgseuf\"},\"location\":\"v\",\"tags\":{\"ilmciwu\":\"uz\",\"lbzdlbybpaxh\":\"yzekypyovl\"},\"id\":\"zyso\",\"name\":\"snwbhanzgesfhsha\",\"type\":\"pahnezp\"}],\"nextLink\":\"fyvynpmgg\"}") - .toObject(NetworkTapRulesListResult.class); - Assertions.assertEquals("umo", model.value().get(0).location()); - Assertions.assertEquals("gq", model.value().get(0).tags().get("sorch")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.value().get(0).pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.value().get(0).configurationType()); - Assertions.assertEquals("vbvx", model.value().get(0).tapRulesUrl()); - Assertions.assertEquals("enlrjcsmwevgu", - model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3641911805209378415L, - model.value().get(0).matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("jyhzfaxskdvu", model.value().get(0).annotation()); - Assertions.assertEquals("fyvynpmgg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapRulesListResult model - = new NetworkTapRulesListResult() - .withValue( - Arrays - .asList( - new NetworkTapRuleInner().withLocation("umo") - .withTags(mapOf("sorch", "gq", "kbmpw", "zrqoxzyhlbeqvh", "zgaefhawkmib", "slajgg", - "wi", "y")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("vbvx") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("enlrjcsmwevgu") - .withSequenceNumber(3641911805209378415L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("zcdeto") - .withSequenceNumber(5633343192239688625L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations(Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties())))) - .withAnnotation("jyhzfaxskdvu"), - new NetworkTapRuleInner().withLocation("rcbcdwhslxe") - .withTags(mapOf("oprwkampyh", "adknmstb")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("ngxebihexhnk") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("qcdol") - .withSequenceNumber(1306450790437008316L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ndaf") - .withSequenceNumber(8346440145061268112L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("hpplz") - .withSequenceNumber(6540366081194941470L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties(), - new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("wjvrlgqpwwlzpd"), - new NetworkTapRuleInner().withLocation("qweuydyb") - .withTags(mapOf("zeogeatr", "rvhpqsv", "rfcs", "nqnvnc", "zsqbibaaugicovj", "vjnkoiz")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.SIX_ZERO) - .withConfigurationType(ConfigurationType.INLINE) - .withTapRulesUrl("xsyjofpgved") - .withMatchConfigurations(Arrays.asList( - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("jnjgyb") - .withSequenceNumber(3081568456009405224L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("l") - .withSequenceNumber(4032761014302250041L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions( - Arrays.asList(new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("ytslg") - .withSequenceNumber(4807067230273446470L) - .withIpAddressType(IpAddressType.IPV4) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction(), - new NetworkTapRuleAction(), new NetworkTapRuleAction())), - new NetworkTapRuleMatchConfiguration().withMatchConfigurationName("kyqzjsdkpvnr") - .withSequenceNumber(1950278585844333204L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition(), new NetworkTapRuleMatchCondition(), - new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations( - Arrays.asList(new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties())))) - .withAnnotation("flyuvbgtz"), - new NetworkTapRuleInner().withLocation("v") - .withTags(mapOf("ilmciwu", "uz", "lbzdlbybpaxh", "yzekypyovl")) - .withPollingIntervalInSeconds(PollingIntervalInSeconds.NINE_ZERO) - .withConfigurationType(ConfigurationType.FILE) - .withTapRulesUrl("sqjsrvjnqtaqgxqb") - .withMatchConfigurations( - Arrays.asList(new NetworkTapRuleMatchConfiguration() - .withMatchConfigurationName("incnrecjbiywev") - .withSequenceNumber(8939098849713135757L) - .withIpAddressType(IpAddressType.IPV6) - .withMatchConditions(Arrays.asList(new NetworkTapRuleMatchCondition())) - .withActions(Arrays.asList(new NetworkTapRuleAction())))) - .withDynamicMatchConfigurations(Arrays.asList( - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups(Arrays.asList(new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList( - new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups( - Arrays.asList(new PortGroupProperties(), new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())), - new CommonDynamicMatchConfiguration() - .withIpGroups(Arrays.asList(new IpGroupProperties(), new IpGroupProperties())) - .withVlanGroups( - Arrays.asList(new VlanGroupProperties(), new VlanGroupProperties(), - new VlanGroupProperties(), new VlanGroupProperties())) - .withPortGroups(Arrays.asList(new PortGroupProperties(), - new PortGroupProperties(), new PortGroupProperties())))) - .withAnnotation("vhgsulwvgseuf"))) - .withNextLink("fyvynpmgg"); - model = BinaryData.fromObject(model).toObject(NetworkTapRulesListResult.class); - Assertions.assertEquals("umo", model.value().get(0).location()); - Assertions.assertEquals("gq", model.value().get(0).tags().get("sorch")); - Assertions.assertEquals(PollingIntervalInSeconds.SIX_ZERO, model.value().get(0).pollingIntervalInSeconds()); - Assertions.assertEquals(ConfigurationType.FILE, model.value().get(0).configurationType()); - Assertions.assertEquals("vbvx", model.value().get(0).tapRulesUrl()); - Assertions.assertEquals("enlrjcsmwevgu", - model.value().get(0).matchConfigurations().get(0).matchConfigurationName()); - Assertions.assertEquals(3641911805209378415L, - model.value().get(0).matchConfigurations().get(0).sequenceNumber()); - Assertions.assertEquals(IpAddressType.IPV6, model.value().get(0).matchConfigurations().get(0).ipAddressType()); - Assertions.assertEquals("jyhzfaxskdvu", model.value().get(0).annotation()); - Assertions.assertEquals("fyvynpmgg", model.nextLink()); - } - - // Use "Map.of" if available - @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/NetworkTapsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java index ff7272b372ff..12cc75a11dda 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateMockTests.java @@ -1,20 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationProperties; 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.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapProperties; import com.azure.resourcemanager.managednetworkfabric.models.PollingType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -29,63 +30,45 @@ public final class NetworkTapsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkPacketBrokerId\":\"j\",\"sourceTapRuleId\":\"kyxowno\",\"destinations\":[{\"name\":\"ussxiajicrs\",\"destinationType\":\"Direct\",\"destinationId\":\"xlopnccaxtp\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"ijlwr\"]},\"destinationTapRuleId\":\"abzjpgh\"},{\"name\":\"gpceqakl\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"rxix\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"nhsfjxtusbjxpuo\",\"kdpts\"]},\"destinationTapRuleId\":\"gtplonalpwaulkwu\"},{\"name\":\"sjwnwn\",\"destinationType\":\"Direct\",\"destinationId\":\"fgtmu\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"qvz\",\"ikxufuwcajyezlk\",\"iveftugiwsvlfp\",\"bpnrgnxwrfu\"]},\"destinationTapRuleId\":\"aysf\"}],\"pollingType\":\"Push\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"annotation\":\"cjclvbqovk\"},\"location\":\"eytphnazpgvfcubx\",\"tags\":{\"fuupqkrzvd\":\"hedbqrlbyhz\",\"hhpwxghwwfq\":\"pcevbkkgqfjwg\"},\"id\":\"wysmsqqmdajsqe\",\"name\":\"xftyifadsliifdr\",\"type\":\"sr\"}"; + = "{\"properties\":{\"annotation\":\"cxxfwpjpgqwbrz\",\"networkPacketBrokerId\":\"mgylmyc\",\"sourceTapRuleId\":\"horre\",\"destinations\":[{\"name\":\"iqwnq\",\"destinationType\":\"Direct\",\"destinationId\":\"zlcyhjh\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"iommis\",\"fmbvmajcmpohjdvf\",\"vbwawymahboi\"]},\"destinationTapRuleId\":\"iuyqdjkugcjssqpk\"},{\"name\":\"bryhvshkvup\",\"destinationType\":\"Direct\",\"destinationId\":\"qww\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"wuverya\",\"bjvv\"]},\"destinationTapRuleId\":\"gupshoofas\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"joor\"},\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"bcvtelmdr\",\"tags\":{\"smviaasd\":\"vghphlbkquhmbln\",\"povzespdip\":\"xsrglxljuyvk\",\"pdjomddadwosjxy\":\"xq\",\"tnriyhdbbj\":\"wvilky\"},\"id\":\"sjmc\",\"name\":\"brpwj\",\"type\":\"n\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTap response = manager.networkTaps() - .define("tanlvoorvzhd") - .withRegion("gnwhldctnwchuq") - .withExistingResourceGroup("ynvck") - .withNetworkPacketBrokerId("cq") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("egxlzd") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("tzkm") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("wosmnwsffia", "fd", "r"))) - .withDestinationTapRuleId("xir"), - new NetworkTapPropertiesDestinationsItem().withName("kmozkdqzhr") + .define("ocnwnjmiitlamf") + .withRegion("uxax") + .withExistingResourceGroup("pbxspvkcng") + .withProperties(new NetworkTapProperties().withAnnotation("lk") + .withNetworkPacketBrokerId("hjxwwqzsyetbff") + .withDestinations(Arrays.asList(new DestinationProperties().withName("tetfdpu") .withDestinationType(DestinationType.DIRECT) - .withDestinationId("vpyznjwm") + .withDestinationId("zdtjbesfum") .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("jbzzwsesqy", "ktvofgxorhsxcs"))) - .withDestinationTapRuleId("xcmepkpx"), - new NetworkTapPropertiesDestinationsItem().withName("xynkubwk") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("lnbyiowetwwjv") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.GRE) - .withNeighborGroupIds(Arrays.asList("vgebfeit", "a", "tecvttkgopdj"))) - .withDestinationTapRuleId("sicucqteciexscxh"), - new NetworkTapPropertiesDestinationsItem().withName("jjlypwgwbycfamui") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("pygothisirhh") - .withIsolationDomainProperties(new IsolationDomainProperties().withEncapsulation(Encapsulation.NONE) - .withNeighborGroupIds(Arrays.asList("gpymyerpusozaou", "jliwbnwdkgb", "joy", "ptnokdoqxkzeow"))) - .withDestinationTapRuleId("vje"))) - .withTags(mapOf("edrbzzb", "nmtnlcvlmrv")) - .withPollingType(PollingType.PUSH) - .withAnnotation("xxboauvkkc") + .withNeighborGroupIds(Arrays.asList("kvq"))) + .withDestinationTapRuleId("wsvivqk"))) + .withPollingType(PollingType.PULL)) + .withTags(mapOf("ufqxrlzi", "nymbjrsd", "idnewrvjgwnmxc", "osuzegmcmlzmfe", "orzozf", "gowdavpqyhax", + "ggoppmxcm", "gkwpbnefabgt")) .create(); - Assertions.assertEquals("eytphnazpgvfcubx", response.location()); - Assertions.assertEquals("hedbqrlbyhz", response.tags().get("fuupqkrzvd")); - Assertions.assertEquals("j", response.networkPacketBrokerId()); - Assertions.assertEquals("ussxiajicrs", response.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, response.destinations().get(0).destinationType()); - Assertions.assertEquals("xlopnccaxtp", response.destinations().get(0).destinationId()); + Assertions.assertEquals("bcvtelmdr", response.location()); + Assertions.assertEquals("vghphlbkquhmbln", response.tags().get("smviaasd")); + Assertions.assertEquals("cxxfwpjpgqwbrz", response.properties().annotation()); + Assertions.assertEquals("mgylmyc", response.properties().networkPacketBrokerId()); + Assertions.assertEquals("iqwnq", response.properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, response.properties().destinations().get(0).destinationType()); + Assertions.assertEquals("zlcyhjh", response.properties().destinations().get(0).destinationId()); Assertions.assertEquals(Encapsulation.NONE, - response.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("ijlwr", - response.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("abzjpgh", response.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PUSH, response.pollingType()); - Assertions.assertEquals("cjclvbqovk", response.annotation()); + response.properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("iommis", + response.properties().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("iuyqdjkugcjssqpk", response.properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, response.properties().pollingType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java index 92d0da88c105..a20a7344f2fd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupWithResponseMockTests.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; @@ -24,31 +24,32 @@ public final class NetworkTapsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkPacketBrokerId\":\"elsrymzvtzyf\",\"sourceTapRuleId\":\"bayhas\",\"destinations\":[{\"name\":\"lk\",\"destinationType\":\"Direct\",\"destinationId\":\"kqyezyzxkr\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"fuxystltkq\",\"ikoiiqajfwzubf\",\"oq\"]},\"destinationTapRuleId\":\"bueiydoqbruxl\"},{\"name\":\"txhednkzjt\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"pzrtseixpk\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"cmkwcyeljni\",\"dgzxbwn\",\"yihct\"]},\"destinationTapRuleId\":\"kmzozbk\"}],\"pollingType\":\"Push\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"annotation\":\"lm\"},\"location\":\"fyfyftkvzbdljyk\",\"tags\":{\"majjzplgtwfkflcv\":\"agfyi\",\"fqynmldhgzzohtag\":\"zkbebuafbddm\",\"fxzobovsvhbtdgxg\":\"yuhdqhqgrksypoo\"},\"id\":\"lmdeoub\",\"name\":\"fxiswemncjhmvvze\",\"type\":\"icmvbsjt\"}"; + = "{\"properties\":{\"annotation\":\"jlhgsuqm\",\"networkPacketBrokerId\":\"kyaovcbdsrxhp\",\"sourceTapRuleId\":\"xn\",\"destinations\":[{\"name\":\"j\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ingadkrkny\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"zqcjf\",\"myfg\"]},\"destinationTapRuleId\":\"uxqzfwgbqsvexzy\"},{\"name\":\"fwiav\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"utgxdlznfo\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"kylqpppp\",\"eikktretu\",\"sygzj\"]},\"destinationTapRuleId\":\"ax\"},{\"name\":\"fnrltanvb\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"otghxkrrpmgdoli\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"avdttt\",\"djqomzrqkjqcsh\",\"ypwmveyrcikedmo\",\"fjuqowuicvjy\"]},\"destinationTapRuleId\":\"zmleuqxhmrilwkc\"},{\"name\":\"usvp\",\"destinationType\":\"Direct\",\"destinationId\":\"a\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"fxdqqz\"]},\"destinationTapRuleId\":\"vgwqiwodhasl\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"rzxvffq\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"t\",\"tags\":{\"oepssoqdibygrqci\":\"l\",\"ksyypftrdic\":\"iwkxikxiqxlx\",\"atkliopgw\":\"trbq\"},\"id\":\"katccetyyv\",\"name\":\"kwobb\",\"type\":\"nsdp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkTap response = manager.networkTaps() - .getByResourceGroupWithResponse("dvbxqxo", "ix", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("zsegursbzm", "xwaxtnkvtzdvxsgd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fyfyftkvzbdljyk", response.location()); - Assertions.assertEquals("agfyi", response.tags().get("majjzplgtwfkflcv")); - Assertions.assertEquals("elsrymzvtzyf", response.networkPacketBrokerId()); - Assertions.assertEquals("lk", response.destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, response.destinations().get(0).destinationType()); - Assertions.assertEquals("kqyezyzxkr", response.destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.GRE, - response.destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("fuxystltkq", - response.destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("bueiydoqbruxl", response.destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PUSH, response.pollingType()); - Assertions.assertEquals("lm", response.annotation()); + Assertions.assertEquals("t", response.location()); + Assertions.assertEquals("l", response.tags().get("oepssoqdibygrqci")); + Assertions.assertEquals("jlhgsuqm", response.properties().annotation()); + Assertions.assertEquals("kyaovcbdsrxhp", response.properties().networkPacketBrokerId()); + Assertions.assertEquals("j", response.properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + response.properties().destinations().get(0).destinationType()); + Assertions.assertEquals("ingadkrkny", response.properties().destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.NONE, + response.properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("zqcjf", + response.properties().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); + Assertions.assertEquals("uxqzfwgbqsvexzy", response.properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, response.properties().pollingType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java index ecb24dde0983..b1c6e7078b05 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; @@ -25,31 +25,40 @@ public final class NetworkTapsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"zscgropuqgi\",\"sourceTapRuleId\":\"gkoci\",\"destinations\":[{\"name\":\"qlyoor\",\"destinationType\":\"Direct\",\"destinationId\":\"glq\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"yhx\",\"znbcpiadjslvx\"]},\"destinationTapRuleId\":\"lcd\"},{\"name\":\"ib\",\"destinationType\":\"Direct\",\"destinationId\":\"cghygmtbi\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"wff\"]},\"destinationTapRuleId\":\"mxqyjysrjpyokewv\"},{\"name\":\"zmsyezx\",\"destinationType\":\"Direct\",\"destinationId\":\"vhuovfotwv\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"dcodzdheknmcvm\",\"iundifuaht\",\"kccru\",\"rz\"]},\"destinationTapRuleId\":\"oqodya\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Failed\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"annotation\":\"loawslctilbxnny\"},\"location\":\"tudfhpelzavohvdb\",\"tags\":{\"uewxliqcbonqjo\":\"rc\",\"tit\":\"kcjcglvob\"},\"id\":\"xrbalvkfdq\",\"name\":\"lprqhxfq\",\"type\":\"qp\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"zkpjeegzhhfn\",\"networkPacketBrokerId\":\"qclepcklowuthfwp\",\"sourceTapRuleId\":\"mllbljehwhx\",\"destinations\":[{\"name\":\"ofneaqahz\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"napxhtqwsd\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"bfllfkeub\",\"iibuab\",\"vdwhvnj\",\"bu\"]},\"destinationTapRuleId\":\"dkqo\"}],\"pollingType\":\"Pull\",\"lastOperation\":{\"details\":\"inkgbkz\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"asklm\",\"tags\":{\"awljatvfddq\":\"clxwede\",\"xcqcwbxxvcvek\":\"pduttqjtszq\"},\"id\":\"jdruml\",\"name\":\"kdwwq\",\"type\":\"hlfvmwu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.networkTaps().listByResourceGroup("qwlbeqc", com.azure.core.util.Context.NONE); + = manager.networkTaps().listByResourceGroup("irt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tudfhpelzavohvdb", response.iterator().next().location()); - Assertions.assertEquals("rc", response.iterator().next().tags().get("uewxliqcbonqjo")); - Assertions.assertEquals("zscgropuqgi", response.iterator().next().networkPacketBrokerId()); - Assertions.assertEquals("qlyoor", response.iterator().next().destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, - response.iterator().next().destinations().get(0).destinationType()); - Assertions.assertEquals("glq", response.iterator().next().destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, - response.iterator().next().destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("yhx", - response.iterator().next().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("lcd", response.iterator().next().destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, response.iterator().next().pollingType()); - Assertions.assertEquals("loawslctilbxnny", response.iterator().next().annotation()); + Assertions.assertEquals("asklm", response.iterator().next().location()); + Assertions.assertEquals("clxwede", response.iterator().next().tags().get("awljatvfddq")); + Assertions.assertEquals("zkpjeegzhhfn", response.iterator().next().properties().annotation()); + Assertions.assertEquals("qclepcklowuthfwp", response.iterator().next().properties().networkPacketBrokerId()); + Assertions.assertEquals("ofneaqahz", response.iterator().next().properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, + response.iterator().next().properties().destinations().get(0).destinationType()); + Assertions.assertEquals("napxhtqwsd", + response.iterator().next().properties().destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + response.iterator().next().properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("bfllfkeub", + response.iterator() + .next() + .properties() + .destinations() + .get(0) + .isolationDomainProperties() + .neighborGroupIds() + .get(0)); + Assertions.assertEquals("dkqo", + response.iterator().next().properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PULL, response.iterator().next().properties().pollingType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java index 1673bf86e5c9..3f30cbc6fd17 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListMockTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; @@ -25,31 +25,39 @@ public final class NetworkTapsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"yrqlazfjltck\",\"sourceTapRuleId\":\"vdxhyfv\",\"destinations\":[{\"name\":\"exfdzpxalk\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"kzaiyrnwwo\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"oizuwwzcrig\"]},\"destinationTapRuleId\":\"belnqalbsoqxajsi\"}],\"pollingType\":\"Pull\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"RMA\",\"annotation\":\"bwxuypcuriwll\"},\"location\":\"clv\",\"tags\":{\"miysghhcmqdlkk\":\"qtzshwlwjxr\",\"dnxbssatpialrq\":\"bdekbvdulmka\"},\"id\":\"wcxxccf\",\"name\":\"fvoz\",\"type\":\"iyvrexitpz\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"rswsvtzotmwxqdfb\",\"networkPacketBrokerId\":\"anfexlawkeqj\",\"sourceTapRuleId\":\"bwrtmj\",\"destinations\":[{\"name\":\"bien\",\"destinationType\":\"Direct\",\"destinationId\":\"adykmvounb\",\"isolationDomainProperties\":{\"encapsulation\":\"GRE\",\"neighborGroupIds\":[\"rrgxqbknoxj\"]},\"destinationTapRuleId\":\"dwh\"},{\"name\":\"mwb\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"pajbiig\",\"isolationDomainProperties\":{\"encapsulation\":\"None\",\"neighborGroupIds\":[\"uzkwigifinoy\",\"dtlpshxjhan\",\"kooa\"]},\"destinationTapRuleId\":\"nk\"}],\"pollingType\":\"Push\",\"lastOperation\":{\"details\":\"fyoksstalj\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"MAT\"},\"location\":\"uymna\",\"tags\":{\"vaflsbyjgd\":\"scaanddlvccuv\",\"lgsnpvqczpkooaol\":\"vyclasdprknupfte\",\"wcs\":\"h\"},\"id\":\"ebtjg\",\"name\":\"euimtxmd\",\"type\":\"exar\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkTaps().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("clv", response.iterator().next().location()); - Assertions.assertEquals("qtzshwlwjxr", response.iterator().next().tags().get("miysghhcmqdlkk")); - Assertions.assertEquals("yrqlazfjltck", response.iterator().next().networkPacketBrokerId()); - Assertions.assertEquals("exfdzpxalk", response.iterator().next().destinations().get(0).name()); - Assertions.assertEquals(DestinationType.ISOLATION_DOMAIN, - response.iterator().next().destinations().get(0).destinationType()); - Assertions.assertEquals("kzaiyrnwwo", response.iterator().next().destinations().get(0).destinationId()); - Assertions.assertEquals(Encapsulation.NONE, - response.iterator().next().destinations().get(0).isolationDomainProperties().encapsulation()); - Assertions.assertEquals("oizuwwzcrig", - response.iterator().next().destinations().get(0).isolationDomainProperties().neighborGroupIds().get(0)); - Assertions.assertEquals("belnqalbsoqxajsi", - response.iterator().next().destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, response.iterator().next().pollingType()); - Assertions.assertEquals("bwxuypcuriwll", response.iterator().next().annotation()); + Assertions.assertEquals("uymna", response.iterator().next().location()); + Assertions.assertEquals("scaanddlvccuv", response.iterator().next().tags().get("vaflsbyjgd")); + Assertions.assertEquals("rswsvtzotmwxqdfb", response.iterator().next().properties().annotation()); + Assertions.assertEquals("anfexlawkeqj", response.iterator().next().properties().networkPacketBrokerId()); + Assertions.assertEquals("bien", response.iterator().next().properties().destinations().get(0).name()); + Assertions.assertEquals(DestinationType.DIRECT, + response.iterator().next().properties().destinations().get(0).destinationType()); + Assertions.assertEquals("adykmvounb", + response.iterator().next().properties().destinations().get(0).destinationId()); + Assertions.assertEquals(Encapsulation.GRE, + response.iterator().next().properties().destinations().get(0).isolationDomainProperties().encapsulation()); + Assertions.assertEquals("rrgxqbknoxj", + response.iterator() + .next() + .properties() + .destinations() + .get(0) + .isolationDomainProperties() + .neighborGroupIds() + .get(0)); + Assertions.assertEquals("dwh", + response.iterator().next().properties().destinations().get(0).destinationTapRuleId()); + Assertions.assertEquals(PollingType.PUSH, response.iterator().next().properties().pollingType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java deleted file mode 100644 index a72b5278eb96..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListResultTests.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 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.NetworkTapInner; -import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; -import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapsListResult; -import com.azure.resourcemanager.managednetworkfabric.models.PollingType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTapsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkTapsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"networkPacketBrokerId\":\"mhssfnwh\",\"sourceTapRuleId\":\"ah\",\"destinations\":[{\"name\":\"knfmkc\",\"destinationType\":\"Direct\",\"destinationId\":\"dgwuzron\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"hz\"},{\"name\":\"dn\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"dcikgxk\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"fzdjekebawnxzs\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Failed\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\",\"annotation\":\"j\"},\"location\":\"iwu\",\"tags\":{\"xsqtzngxbs\":\"kakrxifqnffo\",\"citlynkwfsaang\":\"lewguxcmmhipbvs\",\"c\":\"gb\",\"cgdnxqeonmzr\":\"mhidyliuajkln\"},\"id\":\"jaojpzngdrzige\",\"name\":\"wsadsqyu\",\"type\":\"dkhwqdmohhe\"},{\"properties\":{\"networkPacketBrokerId\":\"yuunx\",\"sourceTapRuleId\":\"evyigdeipnf\",\"destinations\":[{\"name\":\"jwlii\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"jzwhajod\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"o\"},{\"name\":\"dyncradxsewbe\",\"destinationType\":\"Direct\",\"destinationId\":\"pmqnmelyksygih\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"msln\"},{\"name\":\"kqvzlbbbajdexq\",\"destinationType\":\"Direct\",\"destinationId\":\"xizbfzet\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"w\"},{\"name\":\"nbmajvvyxtvvx\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ixbka\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"mlngfwhrm\"}],\"pollingType\":\"Pull\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\",\"annotation\":\"nrzblxna\"},\"location\":\"smfndcbsyhludzjk\",\"tags\":{\"rj\":\"ohwv\",\"urmd\":\"dvt\",\"ntjna\":\"a\"},\"id\":\"fhvqiias\",\"name\":\"twskkfkuyikmxhh\",\"type\":\"sxjbjkewrigl\"},{\"properties\":{\"networkPacketBrokerId\":\"qtrefe\",\"sourceTapRuleId\":\"flxcjffzwncvde\",\"destinations\":[{\"name\":\"n\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"jptnnt\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"jqpzj\"},{\"name\":\"pjrrhpgsjbioag\",\"destinationType\":\"IsolationDomain\",\"destinationId\":\"ehmdqvaolidxd\",\"isolationDomainProperties\":{},\"destinationTapRuleId\":\"vkjcim\"}],\"pollingType\":\"Push\",\"configurationState\":\"Accepted\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"annotation\":\"hptjlrkdcyzhimm\"},\"location\":\"tdtftmizuzjd\",\"tags\":{\"kqoyimxpggk\":\"yzcslazp\",\"qpjuytvude\":\"teagbgac\",\"ifm\":\"lpbybkisb\"},\"id\":\"glpwdjr\",\"name\":\"urfshzn\",\"type\":\"rttuhaaa\"}],\"nextLink\":\"dcdjmdkqtxfrmbe\"}") - .toObject(NetworkTapsListResult.class); - Assertions.assertEquals("iwu", model.value().get(0).location()); - Assertions.assertEquals("kakrxifqnffo", model.value().get(0).tags().get("xsqtzngxbs")); - Assertions.assertEquals("mhssfnwh", model.value().get(0).networkPacketBrokerId()); - Assertions.assertEquals("knfmkc", model.value().get(0).destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.value().get(0).destinations().get(0).destinationType()); - Assertions.assertEquals("dgwuzron", model.value().get(0).destinations().get(0).destinationId()); - Assertions.assertEquals("hz", model.value().get(0).destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.value().get(0).pollingType()); - Assertions.assertEquals("j", model.value().get(0).annotation()); - Assertions.assertEquals("dcdjmdkqtxfrmbe", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkTapsListResult model = new NetworkTapsListResult().withValue(Arrays.asList( - new NetworkTapInner().withLocation("iwu") - .withTags(mapOf("xsqtzngxbs", "kakrxifqnffo", "citlynkwfsaang", "lewguxcmmhipbvs", "c", "gb", - "cgdnxqeonmzr", "mhidyliuajkln")) - .withNetworkPacketBrokerId("mhssfnwh") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("knfmkc") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("dgwuzron") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("hz"), - new NetworkTapPropertiesDestinationsItem().withName("dn") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("dcikgxk") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("fzdjekebawnxzs"))) - .withPollingType(PollingType.PULL) - .withAnnotation("j"), - new NetworkTapInner().withLocation("smfndcbsyhludzjk") - .withTags(mapOf("rj", "ohwv", "urmd", "dvt", "ntjna", "a")) - .withNetworkPacketBrokerId("yuunx") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("jwlii") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("jzwhajod") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("o"), - new NetworkTapPropertiesDestinationsItem().withName("dyncradxsewbe") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("pmqnmelyksygih") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("msln"), - new NetworkTapPropertiesDestinationsItem().withName("kqvzlbbbajdexq") - .withDestinationType(DestinationType.DIRECT) - .withDestinationId("xizbfzet") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("w"), - new NetworkTapPropertiesDestinationsItem().withName("nbmajvvyxtvvx") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("ixbka") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("mlngfwhrm"))) - .withPollingType(PollingType.PULL) - .withAnnotation("nrzblxna"), - new NetworkTapInner().withLocation("tdtftmizuzjd") - .withTags(mapOf("kqoyimxpggk", "yzcslazp", "qpjuytvude", "teagbgac", "ifm", "lpbybkisb")) - .withNetworkPacketBrokerId("qtrefe") - .withDestinations(Arrays.asList( - new NetworkTapPropertiesDestinationsItem().withName("n") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("jptnnt") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("jqpzj"), - new NetworkTapPropertiesDestinationsItem().withName("pjrrhpgsjbioag") - .withDestinationType(DestinationType.ISOLATION_DOMAIN) - .withDestinationId("ehmdqvaolidxd") - .withIsolationDomainProperties(new IsolationDomainProperties()) - .withDestinationTapRuleId("vkjcim"))) - .withPollingType(PollingType.PUSH) - .withAnnotation("hptjlrkdcyzhimm"))) - .withNextLink("dcdjmdkqtxfrmbe"); - model = BinaryData.fromObject(model).toObject(NetworkTapsListResult.class); - Assertions.assertEquals("iwu", model.value().get(0).location()); - Assertions.assertEquals("kakrxifqnffo", model.value().get(0).tags().get("xsqtzngxbs")); - Assertions.assertEquals("mhssfnwh", model.value().get(0).networkPacketBrokerId()); - Assertions.assertEquals("knfmkc", model.value().get(0).destinations().get(0).name()); - Assertions.assertEquals(DestinationType.DIRECT, model.value().get(0).destinations().get(0).destinationType()); - Assertions.assertEquals("dgwuzron", model.value().get(0).destinations().get(0).destinationId()); - Assertions.assertEquals("hz", model.value().get(0).destinations().get(0).destinationTapRuleId()); - Assertions.assertEquals(PollingType.PULL, model.value().get(0).pollingType()); - Assertions.assertEquals("j", model.value().get(0).annotation()); - Assertions.assertEquals("dcdjmdkqtxfrmbe", model.nextLink()); - } - - // Use "Map.of" if available - @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 index 780e16486af2..9e722262cdbd 100644 --- 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 @@ -1,20 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; 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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; 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.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -23,88 +30,186 @@ public final class NetworkToNetworkInterconnectInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectInner model = BinaryData.fromString( - "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"False\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":521816147,\"interfaces\":[\"lxvhhyqqegatxgrz\",\"mg\",\"nmtsdixc\"]},\"optionBLayer3Configuration\":{\"peerASN\":4124749824798467009,\"vlanId\":1749933536,\"fabricASN\":6076642803513262837,\"primaryIpv4Prefix\":\"cjc\",\"primaryIpv6Prefix\":\"airwcqzoofj\",\"secondaryIpv4Prefix\":\"jsvepfbhtleberp\",\"secondaryIpv6Prefix\":\"jeknfqnw\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1336097952,\"multiplier\":661705859},\"ipv4Routes\":[{\"prefix\":\"xgkrh\",\"nextHop\":[\"ehycpn\",\"wawonoehrguql\",\"fwafbjz\",\"pyrgu\"]},{\"prefix\":\"fazbkoc\",\"nextHop\":[\"gvthrmxkbcjww\",\"xomraw\",\"pkeboozflyac\",\"gaedaoiq\"]}],\"ipv6Routes\":[{\"prefix\":\"gdtwgabd\",\"nextHop\":[\"kuz\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ecooyvhtuqbp\",\"importIpv6RoutePolicyId\":\"nii\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gagdvcdqh\",\"exportIpv6RoutePolicyId\":\"zbpyf\"},\"egressAclId\":\"fdfp\",\"ingressAclId\":\"ncwmhjob\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"MAT\"},\"id\":\"cqhyftcvbz\",\"name\":\"gwhgkgsoau\",\"type\":\"orssatfyb\"}") + "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"False\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":365792411,\"interfaces\":[\"kepo\",\"ehqqylm\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"wjwdsdlzmkxer\",\"primaryIpv6Prefix\":\"xoteehkhowg\",\"secondaryIpv4Prefix\":\"vvh\",\"secondaryIpv6Prefix\":\"wpcbapnpxr\",\"peerASN\":2088408418928204748,\"vlanId\":1391003200,\"fabricASN\":1071652329193183412,\"peLoopbackIpAddress\":[\"fey\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":1285628178},{\"maximumRoutes\":2139341948}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1533008089,\"multiplier\":2110472543},\"ipv4Routes\":[{\"prefix\":\"jnmzp\",\"nextHop\":[\"lavxjfiuofpiei\",\"zlvssq\",\"wjopackyhydvik\"]}],\"ipv6Routes\":[{\"prefix\":\"gpmillxgjs\",\"nextHop\":[\"zwgsoriobije\",\"ydyeuy\",\"hbo\",\"ayrgwy\"]},{\"prefix\":\"ri\",\"nextHop\":[\"dweoftnorwaigsi\",\"ctqkmvjanx\"]},{\"prefix\":\"zfffhtjnwo\",\"nextHop\":[\"tfjxtvlx\",\"zqfcwrriomxee\"]},{\"prefix\":\"wyhjmbjiqegmxdbs\",\"nextHop\":[\"cwhpy\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":232805233,\"multiplier\":28200988},\"ipv4Routes\":[{\"prefix\":\"anzbjekwuyckyvn\",\"nextHop\":[\"smuffiwjb\"]},{\"prefix\":\"tvbpzujqj\",\"nextHop\":[\"tdx\",\"osc\"]}],\"ipv6Routes\":[{\"prefix\":\"wuusiecktybh\",\"nextHop\":[\"xidhhxomil\",\"dxjxdu\",\"xwjwilm\",\"rslaatep\"]},{\"prefix\":\"wuj\",\"nextHop\":[\"gxqgqwlxrhgtvhv\",\"qqy\",\"bkkteo\"]},{\"prefix\":\"ejogmkor\",\"nextHop\":[\"m\"]},{\"prefix\":\"mcofn\",\"nextHop\":[\"lbsnosnqliw\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"ojfetyalh\",\"importIpv6RoutePolicyId\":\"mknazgbjbhrpgiq\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"cucrcm\",\"exportIpv6RoutePolicyId\":\"ixpqj\"},\"egressAclId\":\"ifhb\",\"ingressAclId\":\"ldtt\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"aihtgsiqikvllrh\",\"nextHop\":[\"mgl\"]},{\"prefix\":\"k\",\"nextHop\":[\"km\",\"rawrqkzawbunmp\",\"klwzlw\"]},{\"prefix\":\"epr\",\"nextHop\":[\"jzltkaszfjs\",\"scbduxapgrcqebmv\"]},{\"prefix\":\"djomlnwsbvvdl\",\"nextHop\":[\"lxkqesdfeds\",\"gzancoinmphy\",\"cqidkltvdhqnufbx\"]}],\"ipv6Routes\":[{\"prefix\":\"i\",\"nextHop\":[\"toj\",\"vfnybydh\",\"ihaouwudhua\",\"rhjkehw\"]},{\"prefix\":\"umo\",\"nextHop\":[\"ircamqprlo\",\"rugejcvjkjy\",\"zcmtagelajdyolj\"]}]},\"lastOperation\":{\"details\":\"xqfmzsizzhravrcj\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"RMA\"},\"id\":\"cxhnqxgzxlerm\",\"name\":\"merghski\",\"type\":\"hnp\"}") .toObject(NetworkToNetworkInterconnectInner.class); - Assertions.assertEquals(NniType.CE, model.nniType()); - Assertions.assertEquals(IsManagementType.FALSE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(521816147, model.layer2Configuration().mtu()); - Assertions.assertEquals("lxvhhyqqegatxgrz", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("cjc", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("airwcqzoofj", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("jsvepfbhtleberp", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jeknfqnw", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(4124749824798467009L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1749933536, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1336097952, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(661705859, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xgkrh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehycpn", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("gdtwgabd", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kuz", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ecooyvhtuqbp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nii", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gagdvcdqh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("zbpyf", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fdfp", model.egressAclId()); - Assertions.assertEquals("ncwmhjob", model.ingressAclId()); + Assertions.assertEquals(NniType.CE, model.properties().nniType()); + Assertions.assertEquals(IsManagementType.FALSE, model.properties().isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.properties().useOptionB()); + Assertions.assertEquals(365792411, model.properties().layer2Configuration().mtu()); + Assertions.assertEquals("kepo", model.properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("wjwdsdlzmkxer", model.properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("xoteehkhowg", model.properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("vvh", model.properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("wpcbapnpxr", model.properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2088408418928204748L, model.properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(1391003200, model.properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("fey", model.properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1285628178, + model.properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1533008089, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2110472543, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("jnmzp", model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("lavxjfiuofpiei", + model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gpmillxgjs", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zwgsoriobije", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(232805233, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(28200988, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("anzbjekwuyckyvn", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("smuffiwjb", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wuusiecktybh", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xidhhxomil", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ojfetyalh", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("mknazgbjbhrpgiq", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("cucrcm", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ixpqj", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ifhb", model.properties().egressAclId()); + Assertions.assertEquals("ldtt", model.properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.properties().microBfdState()); + Assertions.assertEquals("aihtgsiqikvllrh", + model.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("mgl", + model.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("i", + model.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("toj", + model.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkToNetworkInterconnectInner model = new NetworkToNetworkInterconnectInner().withNniType(NniType.CE) - .withIsManagementType(IsManagementType.FALSE) - .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withMtu(521816147) - .withInterfaces(Arrays.asList("lxvhhyqqegatxgrz", "mg", "nmtsdixc"))) - .withOptionBLayer3Configuration( - new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration().withPrimaryIpv4Prefix("cjc") - .withPrimaryIpv6Prefix("airwcqzoofj") - .withSecondaryIpv4Prefix("jsvepfbhtleberp") - .withSecondaryIpv6Prefix("jeknfqnw") - .withPeerAsn(4124749824798467009L) - .withVlanId(1749933536)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1336097952).withMultiplier(661705859)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("xgkrh") - .withNextHop(Arrays.asList("ehycpn", "wawonoehrguql", "fwafbjz", "pyrgu")), - new StaticRouteProperties().withPrefix("fazbkoc") - .withNextHop(Arrays.asList("gvthrmxkbcjww", "xomraw", "pkeboozflyac", "gaedaoiq")))) - .withIpv6Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("gdtwgabd").withNextHop(Arrays.asList("kuz"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("ecooyvhtuqbp") - .withImportIpv6RoutePolicyId("nii")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("gagdvcdqh") - .withExportIpv6RoutePolicyId("zbpyf")) - .withEgressAclId("fdfp") - .withIngressAclId("ncwmhjob"); + NetworkToNetworkInterconnectInner model = new NetworkToNetworkInterconnectInner() + .withProperties(new NetworkToNetworkInterconnectProperties().withNniType(NniType.CE) + .withIsManagementType(IsManagementType.FALSE) + .withUseOptionB(BooleanEnumProperty.FALSE) + .withLayer2Configuration( + new Layer2Configuration().withMtu(365792411).withInterfaces(Arrays.asList("kepo", "ehqqylm"))) + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("wjwdsdlzmkxer") + .withPrimaryIpv6Prefix("xoteehkhowg") + .withSecondaryIpv4Prefix("vvh") + .withSecondaryIpv6Prefix("wpcbapnpxr") + .withPeerASN(2088408418928204748L) + .withVlanId(1391003200) + .withPeLoopbackIpAddress(Arrays.asList("fey")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1285628178), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(2139341948)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1533008089).withMultiplier(2110472543)) + .withIpv4Routes(Arrays.asList(new StaticRouteProperties().withPrefix("jnmzp") + .withNextHop(Arrays.asList("lavxjfiuofpiei", "zlvssq", "wjopackyhydvik")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("gpmillxgjs") + .withNextHop(Arrays.asList("zwgsoriobije", "ydyeuy", "hbo", "ayrgwy")), + new StaticRouteProperties().withPrefix("ri") + .withNextHop(Arrays.asList("dweoftnorwaigsi", "ctqkmvjanx")), + new StaticRouteProperties().withPrefix("zfffhtjnwo") + .withNextHop(Arrays.asList("tfjxtvlx", "zqfcwrriomxee")), + new StaticRouteProperties().withPrefix("wyhjmbjiqegmxdbs") + .withNextHop(Arrays.asList("cwhpy"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(232805233).withMultiplier(28200988)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("anzbjekwuyckyvn") + .withNextHop(Arrays.asList("smuffiwjb")), + new StaticRouteProperties().withPrefix("tvbpzujqj").withNextHop(Arrays.asList("tdx", "osc")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("wuusiecktybh") + .withNextHop(Arrays.asList("xidhhxomil", "dxjxdu", "xwjwilm", "rslaatep")), + new StaticRouteProperties().withPrefix("wuj") + .withNextHop(Arrays.asList("gxqgqwlxrhgtvhv", "qqy", "bkkteo")), + new StaticRouteProperties().withPrefix("ejogmkor").withNextHop(Arrays.asList("m")), + new StaticRouteProperties().withPrefix("mcofn").withNextHop(Arrays.asList("lbsnosnqliw"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("ojfetyalh") + .withImportIpv6RoutePolicyId("mknazgbjbhrpgiq")) + .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("cucrcm") + .withExportIpv6RoutePolicyId("ixpqj")) + .withEgressAclId("ifhb") + .withIngressAclId("ldtt") + .withMicroBfdState(MicroBfdState.DISABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("aihtgsiqikvllrh").withNextHop(Arrays.asList("mgl")), + new StaticRouteProperties().withPrefix("k") + .withNextHop(Arrays.asList("km", "rawrqkzawbunmp", "klwzlw")), + new StaticRouteProperties().withPrefix("epr") + .withNextHop(Arrays.asList("jzltkaszfjs", "scbduxapgrcqebmv")), + new StaticRouteProperties().withPrefix("djomlnwsbvvdl") + .withNextHop(Arrays.asList("lxkqesdfeds", "gzancoinmphy", "cqidkltvdhqnufbx")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("i") + .withNextHop(Arrays.asList("toj", "vfnybydh", "ihaouwudhua", "rhjkehw")), + new StaticRouteProperties().withPrefix("umo") + .withNextHop(Arrays.asList("ircamqprlo", "rugejcvjkjy", "zcmtagelajdyolj")))))); model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectInner.class); - Assertions.assertEquals(NniType.CE, model.nniType()); - Assertions.assertEquals(IsManagementType.FALSE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(521816147, model.layer2Configuration().mtu()); - Assertions.assertEquals("lxvhhyqqegatxgrz", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("cjc", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("airwcqzoofj", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("jsvepfbhtleberp", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jeknfqnw", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(4124749824798467009L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1749933536, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1336097952, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(661705859, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xgkrh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("ehycpn", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("gdtwgabd", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("kuz", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ecooyvhtuqbp", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("nii", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("gagdvcdqh", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("zbpyf", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("fdfp", model.egressAclId()); - Assertions.assertEquals("ncwmhjob", model.ingressAclId()); + Assertions.assertEquals(NniType.CE, model.properties().nniType()); + Assertions.assertEquals(IsManagementType.FALSE, model.properties().isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.properties().useOptionB()); + Assertions.assertEquals(365792411, model.properties().layer2Configuration().mtu()); + Assertions.assertEquals("kepo", model.properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("wjwdsdlzmkxer", model.properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("xoteehkhowg", model.properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("vvh", model.properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("wpcbapnpxr", model.properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2088408418928204748L, model.properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(1391003200, model.properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("fey", model.properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1285628178, + model.properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1533008089, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(2110472543, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("jnmzp", model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("lavxjfiuofpiei", + model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gpmillxgjs", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zwgsoriobije", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(232805233, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(28200988, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("anzbjekwuyckyvn", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("smuffiwjb", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wuusiecktybh", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("xidhhxomil", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ojfetyalh", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("mknazgbjbhrpgiq", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("cucrcm", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ixpqj", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ifhb", model.properties().egressAclId()); + Assertions.assertEquals("ldtt", model.properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.properties().microBfdState()); + Assertions.assertEquals("aihtgsiqikvllrh", + model.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("mgl", + model.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("i", + model.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("toj", + model.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectListResultTests.java new file mode 100644 index 000000000000..d717c09fcb29 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectListResultTests.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.NetworkToNetworkInterconnectListResult; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import org.junit.jupiter.api.Assertions; + +public final class NetworkToNetworkInterconnectListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkToNetworkInterconnectListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"False\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":1309173294,\"interfaces\":[\"tsmpchgg\",\"y\",\"lgf\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"igfgfrrkdkncz\",\"primaryIpv6Prefix\":\"rywnvo\",\"secondaryIpv4Prefix\":\"vmd\",\"secondaryIpv6Prefix\":\"dlhqvbkarbpyhssr\",\"peerASN\":460208987088904358,\"vlanId\":1830386032,\"fabricASN\":5437323524964960618,\"peLoopbackIpAddress\":[\"maccebxxopyi\",\"yvspeslhwyy\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{},{},{},{}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":569525014,\"multiplier\":1616905255},\"ipv4Routes\":[{\"prefix\":\"k\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ddtpfcudv\",\"nextHop\":[]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":455556171,\"multiplier\":1708847678},\"ipv4Routes\":[{\"prefix\":\"nxhgk\",\"nextHop\":[]},{\"prefix\":\"rdw\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"pecwzvcm\",\"nextHop\":[]},{\"prefix\":\"p\",\"nextHop\":[]},{\"prefix\":\"dluday\",\"nextHop\":[]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"didwmtffbvtzldzc\",\"importIpv6RoutePolicyId\":\"bagwnlzu\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vlghfrbzakpjtcqr\",\"exportIpv6RoutePolicyId\":\"pojpsucmximcw\"},\"egressAclId\":\"ynqjgsat\",\"ingressAclId\":\"vscbgngcrusxhir\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"vkkjbjolpyoklkv\",\"nextHop\":[]},{\"prefix\":\"znad\",\"nextHop\":[]},{\"prefix\":\"hmlieoigowxxb\",\"nextHop\":[]},{\"prefix\":\"tpsyi\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"mqwtqszzgy\",\"nextHop\":[]},{\"prefix\":\"sikawanvmwd\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"qcrbkompnbnfgywe\"},\"configurationState\":\"Accepted\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\"},\"id\":\"ahiwfryawkc\",\"name\":\"kapitskshfyftt\",\"type\":\"bjepzwhj\"},{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":404680340,\"interfaces\":[\"zhblivw\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"udymymbhdosmbng\",\"primaryIpv6Prefix\":\"lgxz\",\"secondaryIpv4Prefix\":\"vxd\",\"secondaryIpv6Prefix\":\"exatmdmnrsen\",\"peerASN\":4507907337292007585,\"vlanId\":1889915293,\"fabricASN\":4967859727006499768,\"peLoopbackIpAddress\":[\"iploisjkzsoxznnt\",\"gkvyoh\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{},{}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":2147008649,\"multiplier\":571688899},\"ipv4Routes\":[{\"prefix\":\"zghximkgfmx\",\"nextHop\":[]},{\"prefix\":\"q\",\"nextHop\":[]},{\"prefix\":\"jnpyriwnto\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"mmqmtsjkyj\",\"nextHop\":[]},{\"prefix\":\"exwdonbexf\",\"nextHop\":[]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":10275099,\"multiplier\":1824586356},\"ipv4Routes\":[{\"prefix\":\"zgrnqtlfozuum\",\"nextHop\":[]},{\"prefix\":\"tgjqg\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ntns\",\"nextHop\":[]},{\"prefix\":\"xz\",\"nextHop\":[]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"kanbcla\",\"importIpv6RoutePolicyId\":\"f\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"vtemaspmanydscdk\",\"exportIpv6RoutePolicyId\":\"dpwjcbhaahntof\"},\"egressAclId\":\"fh\",\"ingressAclId\":\"ixo\",\"microBfdState\":\"Enabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"iv\",\"nextHop\":[]},{\"prefix\":\"ujybsrwz\",\"nextHop\":[]},{\"prefix\":\"mr\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"dhmfppinm\",\"nextHop\":[]},{\"prefix\":\"ikesmkwtzgfr\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"hxerxlobkdbtq\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"Enabled\"},\"id\":\"yholhjns\",\"name\":\"bggicnqwlctmw\",\"type\":\"blxk\"},{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"False\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":1997415988,\"interfaces\":[\"jigcwtspanb\",\"xasevchefpgee\",\"yy\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"holaem\",\"primaryIpv6Prefix\":\"gimmrimaabsqqlo\",\"secondaryIpv4Prefix\":\"z\",\"secondaryIpv6Prefix\":\"wcahdkmbjsmihr\",\"peerASN\":5676397228939764182,\"vlanId\":978057585,\"fabricASN\":7274017648773806891,\"peLoopbackIpAddress\":[\"fczglkvbg\",\"kbsvbwy\",\"tygnbknh\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1872643071,\"multiplier\":1122563469},\"ipv4Routes\":[{\"prefix\":\"dzkucszghdoaqip\",\"nextHop\":[]},{\"prefix\":\"nxclfrsbzrnmuv\",\"nextHop\":[]},{\"prefix\":\"vp\",\"nextHop\":[]},{\"prefix\":\"ofddtbfmek\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"ginxdvmaoy\",\"nextHop\":[]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":942613956,\"multiplier\":585966810},\"ipv4Routes\":[{\"prefix\":\"nofxlttxoqx\",\"nextHop\":[]},{\"prefix\":\"dnzujsj\",\"nextHop\":[]},{\"prefix\":\"rkrpskcjhmmofb\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"dqtkykpaxnlsfg\",\"nextHop\":[]},{\"prefix\":\"yscaccptbzetxygx\",\"nextHop\":[]},{\"prefix\":\"iceecvjwy\",\"nextHop\":[]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"oxmpzzwahdrdvha\",\"importIpv6RoutePolicyId\":\"kx\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zfgxmbry\",\"exportIpv6RoutePolicyId\":\"wibios\"},\"egressAclId\":\"sykqfd\",\"ingressAclId\":\"drtx\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"mrcokzzertkounz\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"whuby\",\"nextHop\":[]},{\"prefix\":\"fpopikzeb\",\"nextHop\":[]},{\"prefix\":\"nnf\",\"nextHop\":[]},{\"prefix\":\"wt\",\"nextHop\":[]}]},\"lastOperation\":{\"details\":\"w\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Failed\",\"administrativeState\":\"Enabled\"},\"id\":\"gpmgfjculo\",\"name\":\"hhylx\",\"type\":\"evfiyymotu\"}],\"nextLink\":\"ybwjmtftc\"}") + .toObject(NetworkToNetworkInterconnectListResult.class); + Assertions.assertEquals(NniType.CE, model.value().get(0).properties().nniType()); + Assertions.assertEquals(IsManagementType.FALSE, model.value().get(0).properties().isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).properties().useOptionB()); + Assertions.assertEquals(1309173294, model.value().get(0).properties().layer2Configuration().mtu()); + Assertions.assertEquals("tsmpchgg", + model.value().get(0).properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("igfgfrrkdkncz", + model.value().get(0).properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("rywnvo", + model.value().get(0).properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("vmd", + model.value().get(0).properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("dlhqvbkarbpyhssr", + model.value().get(0).properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(460208987088904358L, + model.value().get(0).properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(1830386032, model.value().get(0).properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("maccebxxopyi", + model.value().get(0).properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.value().get(0).properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(569525014, + model.value() + .get(0) + .properties() + .npbStaticRouteConfiguration() + .bfdConfiguration() + .intervalInMilliSeconds()); + Assertions.assertEquals(1616905255, + model.value().get(0).properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("k", + model.value().get(0).properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ddtpfcudv", + model.value().get(0).properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals(455556171, + model.value().get(0).properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1708847678, + model.value().get(0).properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("nxhgk", + model.value().get(0).properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("pecwzvcm", + model.value().get(0).properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("didwmtffbvtzldzc", + model.value().get(0).properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("bagwnlzu", + model.value().get(0).properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("vlghfrbzakpjtcqr", + model.value().get(0).properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("pojpsucmximcw", + model.value().get(0).properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ynqjgsat", model.value().get(0).properties().egressAclId()); + Assertions.assertEquals("vscbgngcrusxhir", model.value().get(0).properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, model.value().get(0).properties().microBfdState()); + Assertions.assertEquals("vkkjbjolpyoklkv", + model.value().get(0).properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("mqwtqszzgy", + model.value().get(0).properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ybwjmtftc", model.nextLink()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java new file mode 100644 index 000000000000..fce206366324 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchPropertiesTests.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkToNetworkInterconnectPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkToNetworkInterconnectPatchProperties model = BinaryData.fromString( + "{\"layer2Configuration\":{\"mtu\":1130706436,\"interfaces\":[\"uauzmz\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"trfzhhezvh\",\"primaryIpv6Prefix\":\"dxdyyrudma\",\"secondaryIpv4Prefix\":\"wtvdkxb\",\"secondaryIpv6Prefix\":\"sgfenffdxb\",\"peerASN\":2744221647133602099,\"vlanId\":2093873491,\"fabricASN\":1947400494791330388,\"peLoopbackIpAddress\":[\"ija\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":1282548558},{\"maximumRoutes\":1061615342}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":327179713,\"multiplier\":93401651},\"ipv4Routes\":[{\"prefix\":\"uhcuh\",\"nextHop\":[\"zlxiwyopgarpfctw\",\"apczdojqyv\",\"esipiysnjq\"]},{\"prefix\":\"owa\",\"nextHop\":[\"c\",\"dazabundtse\",\"kaupwhlz\"]},{\"prefix\":\"ckremgjlmsvdorsi\",\"nextHop\":[\"x\",\"yrkqa\",\"ofajfreprfvmkin\"]}],\"ipv6Routes\":[{\"prefix\":\"yrqsh\",\"nextHop\":[\"bcejopylbl\",\"sp\"]},{\"prefix\":\"r\",\"nextHop\":[\"spimtcvvf\",\"rdytzfslxizhq\",\"kmgobliqe\",\"cdiiisklbonx\"]},{\"prefix\":\"upjxvtrkfkgenjqn\",\"nextHop\":[\"jwkosnyxigf\",\"ujjcxgdqmrlhn\",\"kwopswnyinxupr\"]},{\"prefix\":\"xyxwjezbfqplo\",\"nextHop\":[\"ekd\",\"pv\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":358368783,\"multiplier\":127693177},\"ipv4Routes\":[{\"prefix\":\"ujnjktv\",\"nextHop\":[\"efcjisepkdbxot\",\"bja\"]},{\"prefix\":\"pqoclannmxynlsuq\",\"nextHop\":[\"zstrktgvpatrg\",\"jktfinf\"]}],\"ipv6Routes\":[{\"prefix\":\"smmc\",\"nextHop\":[\"wk\",\"icruo\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"jflsgaojb\",\"importIpv6RoutePolicyId\":\"pqsdoc\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pujzfl\",\"exportIpv6RoutePolicyId\":\"dsgxcelujiswlluu\"},\"egressAclId\":\"hfwlfxzfwugeup\",\"ingressAclId\":\"necexkgrvfps\",\"microBfdState\":\"Enabled\"}") + .toObject(NetworkToNetworkInterconnectPatchProperties.class); + Assertions.assertEquals(1130706436, model.layer2Configuration().mtu()); + Assertions.assertEquals("uauzmz", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("trfzhhezvh", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("dxdyyrudma", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("wtvdkxb", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("sgfenffdxb", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2744221647133602099L, model.optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(2093873491, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("ija", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1282548558, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(327179713, + model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(93401651, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("uhcuh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zlxiwyopgarpfctw", + model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("yrqsh", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("bcejopylbl", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(358368783, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(127693177, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ujnjktv", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("efcjisepkdbxot", + model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("smmc", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("wk", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("jflsgaojb", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("pqsdoc", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("pujzfl", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dsgxcelujiswlluu", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("hfwlfxzfwugeup", model.egressAclId()); + Assertions.assertEquals("necexkgrvfps", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkToNetworkInterconnectPatchProperties model = new NetworkToNetworkInterconnectPatchProperties() + .withLayer2Configuration( + new Layer2ConfigurationPatch().withMtu(1130706436).withInterfaces(Arrays.asList("uauzmz"))) + .withOptionBLayer3Configuration( + new OptionBLayer3ConfigurationPatchProperties().withPrimaryIpv4Prefix("trfzhhezvh") + .withPrimaryIpv6Prefix("dxdyyrudma") + .withSecondaryIpv4Prefix("wtvdkxb") + .withSecondaryIpv6Prefix("sgfenffdxb") + .withPeerASN(2744221647133602099L) + .withVlanId(2093873491) + .withPeLoopbackIpAddress(Arrays.asList("ija")) + .withBmpConfiguration( + new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1282548558), + new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1061615342)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(327179713).withMultiplier(93401651)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("uhcuh") + .withNextHop(Arrays.asList("zlxiwyopgarpfctw", "apczdojqyv", "esipiysnjq")), + new StaticRoutePatchProperties().withPrefix("owa") + .withNextHop(Arrays.asList("c", "dazabundtse", "kaupwhlz")), + new StaticRoutePatchProperties().withPrefix("ckremgjlmsvdorsi") + .withNextHop(Arrays.asList("x", "yrkqa", "ofajfreprfvmkin")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("yrqsh").withNextHop(Arrays.asList("bcejopylbl", "sp")), + new StaticRoutePatchProperties().withPrefix("r") + .withNextHop(Arrays.asList("spimtcvvf", "rdytzfslxizhq", "kmgobliqe", "cdiiisklbonx")), + new StaticRoutePatchProperties().withPrefix("upjxvtrkfkgenjqn") + .withNextHop(Arrays.asList("jwkosnyxigf", "ujjcxgdqmrlhn", "kwopswnyinxupr")), + new StaticRoutePatchProperties().withPrefix("xyxwjezbfqplo") + .withNextHop(Arrays.asList("ekd", "pv"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(358368783).withMultiplier(127693177)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("ujnjktv") + .withNextHop(Arrays.asList("efcjisepkdbxot", "bja")), + new StaticRoutePatchProperties().withPrefix("pqoclannmxynlsuq") + .withNextHop(Arrays.asList("zstrktgvpatrg", "jktfinf")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("smmc").withNextHop(Arrays.asList("wk", "icruo"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId("jflsgaojb") + .withImportIpv6RoutePolicyId("pqsdoc")) + .withExportRoutePolicy(new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId("pujzfl") + .withExportIpv6RoutePolicyId("dsgxcelujiswlluu")) + .withEgressAclId("hfwlfxzfwugeup") + .withIngressAclId("necexkgrvfps") + .withMicroBfdState(MicroBfdState.ENABLED); + model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectPatchProperties.class); + Assertions.assertEquals(1130706436, model.layer2Configuration().mtu()); + Assertions.assertEquals("uauzmz", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("trfzhhezvh", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("dxdyyrudma", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("wtvdkxb", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("sgfenffdxb", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2744221647133602099L, model.optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(2093873491, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("ija", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(1282548558, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(327179713, + model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(93401651, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("uhcuh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zlxiwyopgarpfctw", + model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("yrqsh", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("bcejopylbl", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(358368783, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(127693177, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ujnjktv", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("efcjisepkdbxot", + model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("smmc", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("wk", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("jflsgaojb", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("pqsdoc", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("pujzfl", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("dsgxcelujiswlluu", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("hfwlfxzfwugeup", model.egressAclId()); + Assertions.assertEquals("necexkgrvfps", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java index e154a0b13f0c..4654068df52e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchTests.java @@ -1,18 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ExportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2ConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; -import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,84 +26,144 @@ public final class NetworkToNetworkInterconnectPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectPatch model = BinaryData.fromString( - "{\"properties\":{\"layer2Configuration\":{\"mtu\":1051917063,\"interfaces\":[\"gdusxurs\",\"ivuxcjkcoqwczs\"]},\"optionBLayer3Configuration\":{\"peerASN\":3699317337579230590,\"vlanId\":2024380694,\"fabricASN\":7884409884949688580,\"primaryIpv4Prefix\":\"aangqtnhjrfdmfdv\",\"primaryIpv6Prefix\":\"aexxjfwtgdfkka\",\"secondaryIpv4Prefix\":\"gvmuafmczf\",\"secondaryIpv6Prefix\":\"yuepsvpltidajjvy\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":607736449,\"multiplier\":250828837},\"ipv4Routes\":[{\"prefix\":\"xo\",\"nextHop\":[\"elsy\",\"svfnkwm\",\"gjjekrkn\"]},{\"prefix\":\"drugjqyc\",\"nextHop\":[\"txkrdtulcrcjdk\"]},{\"prefix\":\"otcsu\",\"nextHop\":[\"zoonsv\",\"bch\",\"xfpwhd\",\"sl\"]},{\"prefix\":\"klglmnnkkwa\",\"nextHop\":[\"shwy\",\"xrid\",\"tb\"]}],\"ipv6Routes\":[{\"prefix\":\"jmkgxqwqueuuylzt\",\"nextHop\":[\"iizevjykofvez\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"hkqtwqlepjj\",\"importIpv6RoutePolicyId\":\"c\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"wz\",\"exportIpv6RoutePolicyId\":\"togffjwajnrtwz\"},\"egressAclId\":\"qkifmxawostfz\",\"ingressAclId\":\"hrkmjqncfv\"},\"id\":\"cnhemvwfnq\",\"name\":\"wypvndrwbgo\",\"type\":\"tggrss\"}") + "{\"id\":\"qj\",\"type\":\"uepm\",\"properties\":{\"layer2Configuration\":{\"mtu\":1326711879,\"interfaces\":[\"mpftxefvulblm\",\"tuxy\",\"rhfcaeooifqdyw\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"obhahqmomf\",\"primaryIpv6Prefix\":\"o\",\"secondaryIpv4Prefix\":\"fr\",\"secondaryIpv6Prefix\":\"gbmxldjmz\",\"peerASN\":2072388353611173106,\"vlanId\":2014117233,\"fabricASN\":3911367174230806355,\"peLoopbackIpAddress\":[\"rbq\",\"ygpnyhgdzuqsca\",\"qyvoupr\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":201905197}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":650349270,\"multiplier\":1628022621},\"ipv4Routes\":[{\"prefix\":\"pfduiol\",\"nextHop\":[\"yqvpbfjpo\",\"z\",\"cfzlu\",\"zdquurbo\"]}],\"ipv6Routes\":[{\"prefix\":\"hvzielbp\",\"nextHop\":[\"qu\",\"ywzcqyggmnw\"]},{\"prefix\":\"vhbn\",\"nextHop\":[\"iwyejtobdr\"]},{\"prefix\":\"pnrehkunsb\",\"nextHop\":[\"hhlwtpk\",\"egea\",\"tbzkgtzqn\",\"qsttewuvcysjeuf\"]},{\"prefix\":\"x\",\"nextHop\":[\"pditfnonpi\",\"uxlvrhprrvbwonl\",\"qflvtlrvbst\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":263838368,\"multiplier\":1936927997},\"ipv4Routes\":[{\"prefix\":\"lnrj\",\"nextHop\":[\"zdbuzici\"]},{\"prefix\":\"ppoqvgpnewuhwfwj\",\"nextHop\":[\"xuoxtfnres\"]}],\"ipv6Routes\":[{\"prefix\":\"pg\",\"nextHop\":[\"ncjmgvsnvbtq\",\"xfmj\",\"mjnhjlu\",\"llbsupubdxc\"]},{\"prefix\":\"dlhzwhcu\",\"nextHop\":[\"bosjjfd\",\"zhrjqfyaytvsly\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"gniuar\",\"importIpv6RoutePolicyId\":\"jiwgsxfaio\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"gujjgn\",\"exportIpv6RoutePolicyId\":\"rzxbarcbp\"},\"egressAclId\":\"fzqsymjwenjcytes\",\"ingressAclId\":\"u\",\"microBfdState\":\"Enabled\"}}") .toObject(NetworkToNetworkInterconnectPatch.class); - Assertions.assertEquals(1051917063, model.layer2Configuration().mtu()); - Assertions.assertEquals("gdusxurs", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aangqtnhjrfdmfdv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("aexxjfwtgdfkka", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gvmuafmczf", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("yuepsvpltidajjvy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(3699317337579230590L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(2024380694, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(607736449, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(250828837, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xo", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("elsy", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jmkgxqwqueuuylzt", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("iizevjykofvez", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hkqtwqlepjj", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("c", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wz", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("togffjwajnrtwz", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qkifmxawostfz", model.egressAclId()); - Assertions.assertEquals("hrkmjqncfv", model.ingressAclId()); + Assertions.assertEquals(1326711879, model.properties().layer2Configuration().mtu()); + Assertions.assertEquals("mpftxefvulblm", model.properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("obhahqmomf", model.properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("o", model.properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("fr", model.properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("gbmxldjmz", model.properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2072388353611173106L, model.properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(2014117233, model.properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("rbq", model.properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(201905197, + model.properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(650349270, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1628022621, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("pfduiol", + model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("yqvpbfjpo", + model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("hvzielbp", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("qu", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(263838368, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1936927997, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lnrj", model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zdbuzici", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("pg", model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ncjmgvsnvbtq", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gniuar", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("jiwgsxfaio", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("gujjgn", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("rzxbarcbp", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("fzqsymjwenjcytes", model.properties().egressAclId()); + Assertions.assertEquals("u", model.properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.properties().microBfdState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkToNetworkInterconnectPatch model = new NetworkToNetworkInterconnectPatch() - .withLayer2Configuration(new Layer2Configuration().withMtu(1051917063) - .withInterfaces(Arrays.asList("gdusxurs", "ivuxcjkcoqwczs"))) - .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("aangqtnhjrfdmfdv") - .withPrimaryIpv6Prefix("aexxjfwtgdfkka") - .withSecondaryIpv4Prefix("gvmuafmczf") - .withSecondaryIpv6Prefix("yuepsvpltidajjvy") - .withPeerAsn(3699317337579230590L) - .withVlanId(2024380694)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(607736449).withMultiplier(250828837)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("xo") - .withNextHop(Arrays.asList("elsy", "svfnkwm", "gjjekrkn")), - new StaticRouteProperties().withPrefix("drugjqyc").withNextHop(Arrays.asList("txkrdtulcrcjdk")), - new StaticRouteProperties().withPrefix("otcsu") - .withNextHop(Arrays.asList("zoonsv", "bch", "xfpwhd", "sl")), - new StaticRouteProperties().withPrefix("klglmnnkkwa") - .withNextHop(Arrays.asList("shwy", "xrid", "tb")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("jmkgxqwqueuuylzt") - .withNextHop(Arrays.asList("iizevjykofvez"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("hkqtwqlepjj") - .withImportIpv6RoutePolicyId("c")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("wz") - .withExportIpv6RoutePolicyId("togffjwajnrtwz")) - .withEgressAclId("qkifmxawostfz") - .withIngressAclId("hrkmjqncfv"); + NetworkToNetworkInterconnectPatch model + = new NetworkToNetworkInterconnectPatch().withProperties(new NetworkToNetworkInterconnectPatchProperties() + .withLayer2Configuration(new Layer2ConfigurationPatch().withMtu(1326711879) + .withInterfaces(Arrays.asList("mpftxefvulblm", "tuxy", "rhfcaeooifqdyw"))) + .withOptionBLayer3Configuration( + new OptionBLayer3ConfigurationPatchProperties().withPrimaryIpv4Prefix("obhahqmomf") + .withPrimaryIpv6Prefix("o") + .withSecondaryIpv4Prefix("fr") + .withSecondaryIpv6Prefix("gbmxldjmz") + .withPeerASN(2072388353611173106L) + .withVlanId(2014117233) + .withPeLoopbackIpAddress(Arrays.asList("rbq", "ygpnyhgdzuqsca", "qyvoupr")) + .withBmpConfiguration( + new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(201905197)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(650349270).withMultiplier(1628022621)) + .withIpv4Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("pfduiol") + .withNextHop(Arrays.asList("yqvpbfjpo", "z", "cfzlu", "zdquurbo")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("hvzielbp") + .withNextHop(Arrays.asList("qu", "ywzcqyggmnw")), + new StaticRoutePatchProperties().withPrefix("vhbn").withNextHop(Arrays.asList("iwyejtobdr")), + new StaticRoutePatchProperties().withPrefix("pnrehkunsb") + .withNextHop(Arrays.asList("hhlwtpk", "egea", "tbzkgtzqn", "qsttewuvcysjeuf")), + new StaticRoutePatchProperties().withPrefix("x") + .withNextHop(Arrays.asList("pditfnonpi", "uxlvrhprrvbwonl", "qflvtlrvbst"))))) + .withStaticRouteConfiguration(new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(263838368).withMultiplier(1936927997)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("lnrj").withNextHop(Arrays.asList("zdbuzici")), + new StaticRoutePatchProperties().withPrefix("ppoqvgpnewuhwfwj") + .withNextHop(Arrays.asList("xuoxtfnres")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("pg") + .withNextHop(Arrays.asList("ncjmgvsnvbtq", "xfmj", "mjnhjlu", "llbsupubdxc")), + new StaticRoutePatchProperties().withPrefix("dlhzwhcu") + .withNextHop(Arrays.asList("bosjjfd", "zhrjqfyaytvsly"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformationPatch().withImportIpv4RoutePolicyId("gniuar") + .withImportIpv6RoutePolicyId("jiwgsxfaio")) + .withExportRoutePolicy(new ExportRoutePolicyInformationPatch().withExportIpv4RoutePolicyId("gujjgn") + .withExportIpv6RoutePolicyId("rzxbarcbp")) + .withEgressAclId("fzqsymjwenjcytes") + .withIngressAclId("u") + .withMicroBfdState(MicroBfdState.ENABLED)); model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectPatch.class); - Assertions.assertEquals(1051917063, model.layer2Configuration().mtu()); - Assertions.assertEquals("gdusxurs", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aangqtnhjrfdmfdv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("aexxjfwtgdfkka", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gvmuafmczf", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("yuepsvpltidajjvy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(3699317337579230590L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(2024380694, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(607736449, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(250828837, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("xo", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("elsy", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jmkgxqwqueuuylzt", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("iizevjykofvez", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("hkqtwqlepjj", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("c", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("wz", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("togffjwajnrtwz", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("qkifmxawostfz", model.egressAclId()); - Assertions.assertEquals("hrkmjqncfv", model.ingressAclId()); + Assertions.assertEquals(1326711879, model.properties().layer2Configuration().mtu()); + Assertions.assertEquals("mpftxefvulblm", model.properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("obhahqmomf", model.properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("o", model.properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("fr", model.properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("gbmxldjmz", model.properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(2072388353611173106L, model.properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(2014117233, model.properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("rbq", model.properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(201905197, + model.properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(650349270, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1628022621, + model.properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("pfduiol", + model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("yqvpbfjpo", + model.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("hvzielbp", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("qu", + model.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(263838368, + model.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1936927997, + model.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("lnrj", model.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zdbuzici", + model.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("pg", model.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ncjmgvsnvbtq", + model.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gniuar", model.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("jiwgsxfaio", model.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("gujjgn", model.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("rzxbarcbp", model.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("fzqsymjwenjcytes", model.properties().egressAclId()); + Assertions.assertEquals("u", model.properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.properties().microBfdState()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java deleted file mode 100644 index 0ece8ce55d5d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPatchablePropertiesTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 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.NetworkToNetworkInterconnectPatchableProperties; -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.NpbStaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectPatchableProperties model = BinaryData.fromString( - "{\"layer2Configuration\":{\"mtu\":531102382,\"interfaces\":[\"injmuymve\"]},\"optionBLayer3Configuration\":{\"peerASN\":1336534665211813170,\"vlanId\":292634348,\"fabricASN\":1543166083084223809,\"primaryIpv4Prefix\":\"aictdscnkzzohn\",\"primaryIpv6Prefix\":\"d\",\"secondaryIpv4Prefix\":\"zeqozre\",\"secondaryIpv6Prefix\":\"bzq\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1141758238,\"multiplier\":407529894},\"ipv4Routes\":[{\"prefix\":\"exozonynp\",\"nextHop\":[\"eudpab\"]}],\"ipv6Routes\":[{\"prefix\":\"uwzosgyjxvcvaso\",\"nextHop\":[\"r\"]},{\"prefix\":\"xzv\",\"nextHop\":[\"b\",\"wgzygbaduvecovsd\",\"hzrtd\"]},{\"prefix\":\"akrlimzfvppkeqsi\",\"nextHop\":[\"mclngygnhrko\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"dta\",\"importIpv6RoutePolicyId\":\"opggorwjoqtrotp\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pofyrlmwkptsk\",\"exportIpv6RoutePolicyId\":\"jgvhxcc\"},\"egressAclId\":\"kakmkookbputmgvm\",\"ingressAclId\":\"akmlwktfowzkroyr\"}") - .toObject(NetworkToNetworkInterconnectPatchableProperties.class); - Assertions.assertEquals(531102382, model.layer2Configuration().mtu()); - Assertions.assertEquals("injmuymve", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aictdscnkzzohn", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("d", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("zeqozre", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("bzq", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(1336534665211813170L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(292634348, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1141758238, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(407529894, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("exozonynp", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eudpab", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("uwzosgyjxvcvaso", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("r", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("dta", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("opggorwjoqtrotp", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pofyrlmwkptsk", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jgvhxcc", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("kakmkookbputmgvm", model.egressAclId()); - Assertions.assertEquals("akmlwktfowzkroyr", model.ingressAclId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectPatchableProperties model = new NetworkToNetworkInterconnectPatchableProperties() - .withLayer2Configuration( - new Layer2Configuration().withMtu(531102382).withInterfaces(Arrays.asList("injmuymve"))) - .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("aictdscnkzzohn") - .withPrimaryIpv6Prefix("d") - .withSecondaryIpv4Prefix("zeqozre") - .withSecondaryIpv6Prefix("bzq") - .withPeerAsn(1336534665211813170L) - .withVlanId(292634348)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1141758238).withMultiplier(407529894)) - .withIpv4Routes(Arrays - .asList(new StaticRouteProperties().withPrefix("exozonynp").withNextHop(Arrays.asList("eudpab")))) - .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("uwzosgyjxvcvaso").withNextHop(Arrays.asList("r")), - new StaticRouteProperties().withPrefix("xzv") - .withNextHop(Arrays.asList("b", "wgzygbaduvecovsd", "hzrtd")), - new StaticRouteProperties().withPrefix("akrlimzfvppkeqsi") - .withNextHop(Arrays.asList("mclngygnhrko"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("dta") - .withImportIpv6RoutePolicyId("opggorwjoqtrotp")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("pofyrlmwkptsk") - .withExportIpv6RoutePolicyId("jgvhxcc")) - .withEgressAclId("kakmkookbputmgvm") - .withIngressAclId("akmlwktfowzkroyr"); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectPatchableProperties.class); - Assertions.assertEquals(531102382, model.layer2Configuration().mtu()); - Assertions.assertEquals("injmuymve", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("aictdscnkzzohn", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("d", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("zeqozre", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("bzq", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(1336534665211813170L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(292634348, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1141758238, - model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(407529894, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("exozonynp", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("eudpab", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("uwzosgyjxvcvaso", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("r", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("dta", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("opggorwjoqtrotp", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pofyrlmwkptsk", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("jgvhxcc", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("kakmkookbputmgvm", model.egressAclId()); - Assertions.assertEquals("akmlwktfowzkroyr", model.ingressAclId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.java deleted file mode 100644 index 8879f8835456..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests.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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectPropertiesOptionBLayer3ConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration model = BinaryData.fromString( - "{\"peerASN\":6409376053625835562,\"vlanId\":1958871772,\"fabricASN\":2516191824460277136,\"primaryIpv4Prefix\":\"jf\",\"primaryIpv6Prefix\":\"lqhxkasmcolmu\",\"secondaryIpv4Prefix\":\"yvaosdkluwz\",\"secondaryIpv6Prefix\":\"ygz\"}") - .toObject(NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.class); - Assertions.assertEquals("jf", model.primaryIpv4Prefix()); - Assertions.assertEquals("lqhxkasmcolmu", model.primaryIpv6Prefix()); - Assertions.assertEquals("yvaosdkluwz", model.secondaryIpv4Prefix()); - Assertions.assertEquals("ygz", model.secondaryIpv6Prefix()); - Assertions.assertEquals(6409376053625835562L, model.peerAsn()); - Assertions.assertEquals(1958871772, model.vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration model - = new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration().withPrimaryIpv4Prefix("jf") - .withPrimaryIpv6Prefix("lqhxkasmcolmu") - .withSecondaryIpv4Prefix("yvaosdkluwz") - .withSecondaryIpv6Prefix("ygz") - .withPeerAsn(6409376053625835562L) - .withVlanId(1958871772); - model = BinaryData.fromObject(model) - .toObject(NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.class); - Assertions.assertEquals("jf", model.primaryIpv4Prefix()); - Assertions.assertEquals("lqhxkasmcolmu", model.primaryIpv6Prefix()); - Assertions.assertEquals("yvaosdkluwz", model.secondaryIpv4Prefix()); - Assertions.assertEquals("ygz", model.secondaryIpv6Prefix()); - Assertions.assertEquals(6409376053625835562L, model.peerAsn()); - Assertions.assertEquals(1958871772, model.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 index 0c62cb0f6cb8..69bfa0508146 100644 --- 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 @@ -1,20 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; 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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; 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.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -23,97 +29,165 @@ public final class NetworkToNetworkInterconnectPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkToNetworkInterconnectProperties model = BinaryData.fromString( - "{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1239120549,\"interfaces\":[\"qna\"]},\"optionBLayer3Configuration\":{\"peerASN\":5874584824497919701,\"vlanId\":656596398,\"fabricASN\":1053496185156483112,\"primaryIpv4Prefix\":\"opbtsixhgv\",\"primaryIpv6Prefix\":\"xmndztgsqjayqmar\",\"secondaryIpv4Prefix\":\"eibpgbrhbjdqkn\",\"secondaryIpv6Prefix\":\"nmotpuwnnoh\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":14114597,\"multiplier\":735481406},\"ipv4Routes\":[{\"prefix\":\"ypwyiulayno\",\"nextHop\":[\"gkfh\",\"xttpfs\",\"wgsghqucumldd\",\"uqmllfeothxu\"]},{\"prefix\":\"rigrjdljlkq\",\"nextHop\":[\"krbzkuas\",\"axklpruulh\",\"l\",\"oizwxvs\"]},{\"prefix\":\"ksgfyyskyekg\",\"nextHop\":[\"xczvfcckwrtwle\"]},{\"prefix\":\"yveszr\",\"nextHop\":[\"hpdhwynctaczcnjf\",\"bbfnvjxitzovnkr\",\"iklsmni\",\"qlcoqksyiibhyx\"]}],\"ipv6Routes\":[{\"prefix\":\"bu\",\"nextHop\":[\"vqdorbccqcd\",\"thojvlirknucos\",\"wrdtnagzlgpy\"]},{\"prefix\":\"ixihzqj\",\"nextHop\":[\"smuydqfttk\",\"cybdueurgm\",\"dcpks\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"jermhzic\",\"importIpv6RoutePolicyId\":\"fdjhyaaknyukibxi\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"phzwxqte\",\"exportIpv6RoutePolicyId\":\"iilhvtozyagj\"},\"egressAclId\":\"xkbylhyyxgffklv\",\"ingressAclId\":\"rwtrdgscnvqeonsg\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"}") + "{\"nniType\":\"NPB\",\"isManagementType\":\"False\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":1918685512,\"interfaces\":[\"jqnvtsdyd\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"pafyalo\",\"primaryIpv6Prefix\":\"wz\",\"secondaryIpv4Prefix\":\"znyufpqzs\",\"secondaryIpv6Prefix\":\"fgufyjfdkqiy\",\"peerASN\":6616121153223179630,\"vlanId\":838011131,\"fabricASN\":5923690504820200485,\"peLoopbackIpAddress\":[\"symzqhrqpf\",\"lpe\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":222737683},{\"maximumRoutes\":2051698673}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1606979715,\"multiplier\":128403689},\"ipv4Routes\":[{\"prefix\":\"ejlwbk\",\"nextHop\":[\"jzobdwbcpras\",\"kuhydtnaczkfwfat\",\"awp\"]},{\"prefix\":\"nskivdwgt\",\"nextHop\":[\"umecsaaq\",\"oqbd\",\"uy\"]},{\"prefix\":\"sbskowkrbhz\",\"nextHop\":[\"bkhtmqowiu\"]},{\"prefix\":\"sfgqgucyhfaimqv\",\"nextHop\":[\"uozkgyf\",\"eoehgfmqmskkixvl\",\"jxplh\"]}],\"ipv6Routes\":[{\"prefix\":\"asyntv\",\"nextHop\":[\"yielb\"]},{\"prefix\":\"rvvbqvknmpecqxg\",\"nextHop\":[\"asi\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1709688838,\"multiplier\":1611996375},\"ipv4Routes\":[{\"prefix\":\"qpjnxjk\",\"nextHop\":[\"ups\",\"yo\",\"weuiyx\"]},{\"prefix\":\"wkztsmsfbevyl\",\"nextHop\":[\"nfhkqytkztado\",\"gfzdgjfcycrsvl\",\"yyhigqkzjuqw\"]},{\"prefix\":\"ajquzxpixhyoi\",\"nextHop\":[\"f\",\"bgsosc\",\"enezfvbennmfkbpj\",\"rtek\"]},{\"prefix\":\"wnthropmduds\",\"nextHop\":[\"urz\",\"vktjhffecqkoq\"]}],\"ipv6Routes\":[{\"prefix\":\"ergaghpuzx\",\"nextHop\":[\"yehhfdyldhg\",\"edzfzqiyuqhtdere\"]},{\"prefix\":\"n\",\"nextHop\":[\"a\",\"zwhpjlwyxedz\",\"mxrfomckew\"]},{\"prefix\":\"my\",\"nextHop\":[\"opxfjjtpdyzo\",\"txfp\"]},{\"prefix\":\"ofhgnuyw\",\"nextHop\":[\"ygv\",\"dgaaqwvkgjpy\",\"pmpv\",\"nogehlufbort\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"kk\",\"importIpv6RoutePolicyId\":\"xzsvbxxyji\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"o\",\"exportIpv6RoutePolicyId\":\"ocl\"},\"egressAclId\":\"ioewyhxes\",\"ingressAclId\":\"vrkdpsqeq\",\"microBfdState\":\"Enabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ses\",\"nextHop\":[\"ujbjppp\",\"tlpd\",\"bfm\"]},{\"prefix\":\"hieatnejr\",\"nextHop\":[\"inzqplgtkiho\"]},{\"prefix\":\"ikzsrzfffji\",\"nextHop\":[\"fbpntogke\"]}],\"ipv6Routes\":[{\"prefix\":\"khbmcarmoyfxxk\",\"nextHop\":[\"kuqdndxlykhkg\",\"apvd\"]}]},\"lastOperation\":{\"details\":\"peerscd\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Enabled\"}") .toObject(NetworkToNetworkInterconnectProperties.class); - Assertions.assertEquals(NniType.CE, model.nniType()); - Assertions.assertEquals(IsManagementType.TRUE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1239120549, model.layer2Configuration().mtu()); - Assertions.assertEquals("qna", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("opbtsixhgv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("xmndztgsqjayqmar", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("eibpgbrhbjdqkn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("nmotpuwnnoh", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5874584824497919701L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(656596398, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(14114597, + Assertions.assertEquals(NniType.NPB, model.nniType()); + Assertions.assertEquals(IsManagementType.FALSE, model.isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.useOptionB()); + Assertions.assertEquals(1918685512, model.layer2Configuration().mtu()); + Assertions.assertEquals("jqnvtsdyd", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("pafyalo", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("wz", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("znyufpqzs", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("fgufyjfdkqiy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(6616121153223179630L, model.optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(838011131, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("symzqhrqpf", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(222737683, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1606979715, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(735481406, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("ypwyiulayno", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gkfh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("bu", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("vqdorbccqcd", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jermhzic", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("fdjhyaaknyukibxi", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("phzwxqte", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("iilhvtozyagj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xkbylhyyxgffklv", model.egressAclId()); - Assertions.assertEquals("rwtrdgscnvqeonsg", model.ingressAclId()); + Assertions.assertEquals(128403689, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ejlwbk", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jzobdwbcpras", + model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("asyntv", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("yielb", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1709688838, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1611996375, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("qpjnxjk", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ups", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ergaghpuzx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("yehhfdyldhg", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("kk", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("xzsvbxxyji", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("o", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ocl", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ioewyhxes", model.egressAclId()); + Assertions.assertEquals("vrkdpsqeq", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + Assertions.assertEquals("ses", model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ujbjppp", + model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("khbmcarmoyfxxk", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("kuqdndxlykhkg", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkToNetworkInterconnectProperties model = new NetworkToNetworkInterconnectProperties() - .withNniType(NniType.CE) - .withIsManagementType(IsManagementType.TRUE) - .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withMtu(1239120549).withInterfaces(Arrays.asList("qna"))) - .withOptionBLayer3Configuration(new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() - .withPrimaryIpv4Prefix("opbtsixhgv") - .withPrimaryIpv6Prefix("xmndztgsqjayqmar") - .withSecondaryIpv4Prefix("eibpgbrhbjdqkn") - .withSecondaryIpv6Prefix("nmotpuwnnoh") - .withPeerAsn(5874584824497919701L) - .withVlanId(656596398)) + .withNniType(NniType.NPB) + .withIsManagementType(IsManagementType.FALSE) + .withUseOptionB(BooleanEnumProperty.FALSE) + .withLayer2Configuration( + new Layer2Configuration().withMtu(1918685512).withInterfaces(Arrays.asList("jqnvtsdyd"))) + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("pafyalo") + .withPrimaryIpv6Prefix("wz") + .withSecondaryIpv4Prefix("znyufpqzs") + .withSecondaryIpv6Prefix("fgufyjfdkqiy") + .withPeerASN(6616121153223179630L) + .withVlanId(838011131) + .withPeLoopbackIpAddress(Arrays.asList("symzqhrqpf", "lpe")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(222737683), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(2051698673)))) .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(14114597).withMultiplier(735481406)) + new BfdConfiguration().withIntervalInMilliSeconds(1606979715).withMultiplier(128403689)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("ypwyiulayno") - .withNextHop(Arrays.asList("gkfh", "xttpfs", "wgsghqucumldd", "uqmllfeothxu")), - new StaticRouteProperties().withPrefix("rigrjdljlkq") - .withNextHop(Arrays.asList("krbzkuas", "axklpruulh", "l", "oizwxvs")), - new StaticRouteProperties().withPrefix("ksgfyyskyekg").withNextHop(Arrays.asList("xczvfcckwrtwle")), - new StaticRouteProperties().withPrefix("yveszr") - .withNextHop( - Arrays.asList("hpdhwynctaczcnjf", "bbfnvjxitzovnkr", "iklsmni", "qlcoqksyiibhyx")))) + new StaticRouteProperties().withPrefix("ejlwbk") + .withNextHop(Arrays.asList("jzobdwbcpras", "kuhydtnaczkfwfat", "awp")), + new StaticRouteProperties().withPrefix("nskivdwgt") + .withNextHop(Arrays.asList("umecsaaq", "oqbd", "uy")), + new StaticRouteProperties().withPrefix("sbskowkrbhz").withNextHop(Arrays.asList("bkhtmqowiu")), + new StaticRouteProperties().withPrefix("sfgqgucyhfaimqv") + .withNextHop(Arrays.asList("uozkgyf", "eoehgfmqmskkixvl", "jxplh")))) + .withIpv6Routes( + Arrays.asList(new StaticRouteProperties().withPrefix("asyntv").withNextHop(Arrays.asList("yielb")), + new StaticRouteProperties().withPrefix("rvvbqvknmpecqxg").withNextHop(Arrays.asList("asi"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1709688838).withMultiplier(1611996375)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("qpjnxjk").withNextHop(Arrays.asList("ups", "yo", "weuiyx")), + new StaticRouteProperties().withPrefix("wkztsmsfbevyl") + .withNextHop(Arrays.asList("nfhkqytkztado", "gfzdgjfcycrsvl", "yyhigqkzjuqw")), + new StaticRouteProperties().withPrefix("ajquzxpixhyoi") + .withNextHop(Arrays.asList("f", "bgsosc", "enezfvbennmfkbpj", "rtek")), + new StaticRouteProperties().withPrefix("wnthropmduds") + .withNextHop(Arrays.asList("urz", "vktjhffecqkoq")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("bu") - .withNextHop(Arrays.asList("vqdorbccqcd", "thojvlirknucos", "wrdtnagzlgpy")), - new StaticRouteProperties().withPrefix("ixihzqj") - .withNextHop(Arrays.asList("smuydqfttk", "cybdueurgm", "dcpks"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("jermhzic") - .withImportIpv6RoutePolicyId("fdjhyaaknyukibxi")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("phzwxqte") - .withExportIpv6RoutePolicyId("iilhvtozyagj")) - .withEgressAclId("xkbylhyyxgffklv") - .withIngressAclId("rwtrdgscnvqeonsg"); + new StaticRouteProperties().withPrefix("ergaghpuzx") + .withNextHop(Arrays.asList("yehhfdyldhg", "edzfzqiyuqhtdere")), + new StaticRouteProperties().withPrefix("n") + .withNextHop(Arrays.asList("a", "zwhpjlwyxedz", "mxrfomckew")), + new StaticRouteProperties().withPrefix("my").withNextHop(Arrays.asList("opxfjjtpdyzo", "txfp")), + new StaticRouteProperties().withPrefix("ofhgnuyw") + .withNextHop(Arrays.asList("ygv", "dgaaqwvkgjpy", "pmpv", "nogehlufbort"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("kk") + .withImportIpv6RoutePolicyId("xzsvbxxyji")) + .withExportRoutePolicy( + new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("o").withExportIpv6RoutePolicyId("ocl")) + .withEgressAclId("ioewyhxes") + .withIngressAclId("vrkdpsqeq") + .withMicroBfdState(MicroBfdState.ENABLED) + .withConditionalDefaultRouteConfiguration( + new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("ses") + .withNextHop(Arrays.asList("ujbjppp", "tlpd", "bfm")), + new StaticRouteProperties().withPrefix("hieatnejr").withNextHop(Arrays.asList("inzqplgtkiho")), + new StaticRouteProperties().withPrefix("ikzsrzfffji").withNextHop(Arrays.asList("fbpntogke")))) + .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("khbmcarmoyfxxk") + .withNextHop(Arrays.asList("kuqdndxlykhkg", "apvd"))))); model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectProperties.class); - Assertions.assertEquals(NniType.CE, model.nniType()); - Assertions.assertEquals(IsManagementType.TRUE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1239120549, model.layer2Configuration().mtu()); - Assertions.assertEquals("qna", model.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("opbtsixhgv", model.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("xmndztgsqjayqmar", model.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("eibpgbrhbjdqkn", model.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("nmotpuwnnoh", model.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5874584824497919701L, model.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(656596398, model.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(14114597, + Assertions.assertEquals(NniType.NPB, model.nniType()); + Assertions.assertEquals(IsManagementType.FALSE, model.isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.useOptionB()); + Assertions.assertEquals(1918685512, model.layer2Configuration().mtu()); + Assertions.assertEquals("jqnvtsdyd", model.layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("pafyalo", model.optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("wz", model.optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("znyufpqzs", model.optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("fgufyjfdkqiy", model.optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(6616121153223179630L, model.optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(838011131, model.optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("symzqhrqpf", model.optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + model.optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(222737683, model.optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1606979715, model.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(735481406, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("ypwyiulayno", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gkfh", model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("bu", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("vqdorbccqcd", - model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("jermhzic", model.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("fdjhyaaknyukibxi", model.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("phzwxqte", model.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("iilhvtozyagj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("xkbylhyyxgffklv", model.egressAclId()); - Assertions.assertEquals("rwtrdgscnvqeonsg", model.ingressAclId()); + Assertions.assertEquals(128403689, model.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ejlwbk", model.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("jzobdwbcpras", + model.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("asyntv", model.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("yielb", model.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1709688838, + model.staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1611996375, model.staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("qpjnxjk", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ups", model.staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("ergaghpuzx", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("yehhfdyldhg", model.staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("kk", model.importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("xzsvbxxyji", model.importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("o", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("ocl", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("ioewyhxes", model.egressAclId()); + Assertions.assertEquals("vrkdpsqeq", model.ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, model.microBfdState()); + Assertions.assertEquals("ses", model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ujbjppp", + model.conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("khbmcarmoyfxxk", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("kuqdndxlykhkg", + model.conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } 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 index 9ed4337ba334..2d97a86ab06e 100644 --- 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 @@ -1,25 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ConditionalDefaultRouteProperties; 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.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRouteConfiguration; 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.OptionBLayer3PrefixLimitProperties; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -32,76 +39,141 @@ public final class NetworkToNetworkInterconnectsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1256241884,\"interfaces\":[\"npftkgm\",\"mvxbiubzgh\"]},\"optionBLayer3Configuration\":{\"peerASN\":5097067213361369198,\"vlanId\":117467872,\"fabricASN\":5506702297759334648,\"primaryIpv4Prefix\":\"usnaqsvruuh\",\"primaryIpv6Prefix\":\"cppmmwhjerlurgi\",\"secondaryIpv4Prefix\":\"nbxlep\",\"secondaryIpv6Prefix\":\"c\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":504409694,\"multiplier\":1654510108},\"ipv4Routes\":[{\"prefix\":\"uv\",\"nextHop\":[\"oiihrfcowlas\",\"wifywxjjylaq\",\"xevfdarvj\"]},{\"prefix\":\"wgkynxlwrjgot\",\"nextHop\":[\"mcktkal\",\"piybfnkylzri\",\"nqlwogq\"]}],\"ipv6Routes\":[{\"prefix\":\"uaiuvemqcb\",\"nextHop\":[\"ivexiathm\",\"ryywyfcenkbfxqc\",\"pggeciradmx\"]},{\"prefix\":\"kbutb\",\"nextHop\":[\"cxzayvcse\",\"dhrodyiit\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"djtgo\",\"importIpv6RoutePolicyId\":\"ybseckgaxm\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"zj\",\"exportIpv6RoutePolicyId\":\"tfstdwqdvzc\"},\"egressAclId\":\"kvw\",\"ingressAclId\":\"tkreisojhuswm\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"wav\",\"name\":\"mqpaalwidt\",\"type\":\"bwedjrikzppgij\"}"; + = "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"False\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1450527917,\"interfaces\":[\"aavjk\",\"e\",\"q\",\"sviysbvo\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"ia\",\"primaryIpv6Prefix\":\"lqclft\",\"secondaryIpv4Prefix\":\"eouxpdnl\",\"secondaryIpv6Prefix\":\"nbckohnr\",\"peerASN\":4118102764198980577,\"vlanId\":921661865,\"fabricASN\":1786556573999290584,\"peLoopbackIpAddress\":[\"rwxf\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":743093541},{\"maximumRoutes\":2048531281},{\"maximumRoutes\":1309246293},{\"maximumRoutes\":1753140075}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1034326448,\"multiplier\":1793078757},\"ipv4Routes\":[{\"prefix\":\"kwnzot\",\"nextHop\":[\"vhu\",\"dlo\"]},{\"prefix\":\"cqsylkkq\",\"nextHop\":[\"mmweljc\"]},{\"prefix\":\"uegym\",\"nextHop\":[\"nsmnjitxughlb\",\"bwoda\",\"ipgshk\"]},{\"prefix\":\"oecmbyo\",\"nextHop\":[\"vbvfchfuxuqp\",\"debokzdshhhdix\",\"zapzibm\"]}],\"ipv6Routes\":[{\"prefix\":\"zzkzvfywspaja\",\"nextHop\":[\"hvpkt\",\"nmhxtmzz\",\"autsrvsbknvouy\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1823719833,\"multiplier\":227985696},\"ipv4Routes\":[{\"prefix\":\"ichjkwctlsohrt\",\"nextHop\":[\"vvcbt\"]},{\"prefix\":\"giwc\",\"nextHop\":[\"yaoyzjfgv\",\"au\",\"mnabgrsnfzmthie\",\"uflazfot\"]}],\"ipv6Routes\":[{\"prefix\":\"umamdorgl\",\"nextHop\":[\"khdsfgjb\"]},{\"prefix\":\"ybdukbglniw\",\"nextHop\":[\"mysce\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"oexkon\",\"importIpv6RoutePolicyId\":\"ac\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"ehsmvvxkcte\",\"exportIpv6RoutePolicyId\":\"af\"},\"egressAclId\":\"iffaj\",\"ingressAclId\":\"wby\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"ylbbugojdzcluy\",\"nextHop\":[\"i\",\"kinykjxqsspeqg\",\"dpizjqpjztu\"]},{\"prefix\":\"diverkwmafyxo\",\"nextHop\":[\"kvutedetx\",\"kqud\"]},{\"prefix\":\"dwcwj\",\"nextHop\":[\"dbkcehxahnq\",\"bav\"]}],\"ipv6Routes\":[{\"prefix\":\"fefbbvitln\",\"nextHop\":[\"afufwr\",\"rbndruz\"]},{\"prefix\":\"nstl\",\"nextHop\":[\"mdcctemv\",\"ajyitpyzgwihk\"]}]},\"lastOperation\":{\"details\":\"rzaqubryhvb\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"pjozgryocgwkph\",\"name\":\"lyznbbcimxznfoak\",\"type\":\"jwiswzn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkToNetworkInterconnect response = manager.networkToNetworkInterconnects() - .define("dcabnnxhcxcts") - .withExistingNetworkFabric("zqnbs", "ujcmtc") - .withUseOptionB(BooleanEnumProperty.FALSE) - .withNniType(NniType.CE) - .withIsManagementType(IsManagementType.FALSE) - .withLayer2Configuration(new Layer2Configuration().withMtu(350719333) - .withInterfaces(Arrays.asList("xaknwkjzvqpsym", "upyjtrxxzwds", "qhye", "nakdmtpjksdlulyt"))) - .withOptionBLayer3Configuration(new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() - .withPrimaryIpv4Prefix("vukvupuplug") - .withPrimaryIpv6Prefix("ynv") - .withSecondaryIpv4Prefix("vctqda") - .withSecondaryIpv6Prefix("dsfpzpjbsilbnr") - .withPeerAsn(5457969906808324083L) - .withVlanId(386929467)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(248672969).withMultiplier(276846830)) - .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("rgfb") - .withNextHop(Arrays.asList("szwkbcstzuwbgae", "maxdwxrwq")), - new StaticRouteProperties().withPrefix("bvwsd").withNextHop(Arrays.asList("kxyrlkgjhomywl")), - new StaticRouteProperties().withPrefix("pghhuluqyfvgpq") - .withNextHop(Arrays.asList("iqmbriskmbuihtq", "vyqmmczuguvlieeg")), - new StaticRouteProperties().withPrefix("nqwhfjoxse") - .withNextHop(Arrays.asList("scgqcr", "aucftotedhjxdl")))) - .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("f").withNextHop(Arrays.asList("jqvjyqmpmsknaxrh"))))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("qufudpypboq") - .withImportIpv6RoutePolicyId("fxfpwmaj")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("ijfdjjrvsvhmsmri") - .withExportIpv6RoutePolicyId("dnbwlbqntdderrx")) - .withEgressAclId("wuzpsvcm") - .withIngressAclId("fstyyysq") + .define("fbkazylayabrdnov") + .withExistingNetworkFabric("dlpc", "xpxxnyhivhyujqx") + .withProperties(new NetworkToNetworkInterconnectProperties().withNniType(NniType.NPB) + .withIsManagementType(IsManagementType.FALSE) + .withUseOptionB(BooleanEnumProperty.TRUE) + .withLayer2Configuration(new Layer2Configuration().withMtu(792790767) + .withInterfaces(Arrays.asList("rk", "ci", "hwwhyejhwbdf"))) + .withOptionBLayer3Configuration(new OptionBLayer3Configuration().withPrimaryIpv4Prefix("zwkmrjfsqbc") + .withPrimaryIpv6Prefix("a") + .withSecondaryIpv4Prefix("veqowqodispa") + .withSecondaryIpv6Prefix("wiicfsbjhhadndo") + .withPeerASN(7061165601968264013L) + .withVlanId(289688250) + .withPeLoopbackIpAddress(Arrays.asList("pbieehp")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED)) + .withPrefixLimits( + Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(2046845874), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(42207770)))) + .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(863284200).withMultiplier(2051432477)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("gqiismaggkt") + .withNextHop(Arrays.asList("ykrbkkcx", "mjkronxmtrhw")), + new StaticRouteProperties().withPrefix("dfnc") + .withNextHop(Arrays.asList("tyszhzlvkm", "r", "vdbzarmepb", "ogtfp")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("xsyohfrl") + .withNextHop(Arrays.asList("nkgnychuzhn", "wtbhjgli", "oeodgnu", "ewfgtwmmfixtya")), + new StaticRouteProperties().withPrefix("vexjqdjkonbgegw") + .withNextHop(Arrays.asList("gkrppmvnoqt", "qciqawhkdk", "aqspbdscotidik")), + new StaticRouteProperties().withPrefix("mtmjkfmrjngrjsq") + .withNextHop(Arrays.asList("rhabhhp"))))) + .withStaticRouteConfiguration(new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1391199779).withMultiplier(265638934)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("gxvnmtjmuxr") + .withNextHop(Arrays.asList("udwruo", "mt")), + new StaticRouteProperties().withPrefix("fqcyycxl") + .withNextHop(Arrays.asList("kfjgj", "wfssgiebq", "uscm")), + new StaticRouteProperties().withPrefix("e").withNextHop(Arrays.asList("iwzoup", "amdgff")), + new StaticRouteProperties().withPrefix("x") + .withNextHop(Arrays.asList("soorwfdtjps", "wlpcxljzzc", "rgtua")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("oca") + .withNextHop(Arrays.asList("xvhjrpbnr", "lgels", "nenjtxuuwdmrqa", "lbyjahbzbtl")), + new StaticRouteProperties().withPrefix("acbwmvphmjyzice") + .withNextHop(Arrays.asList("lazcgwnibnduqgj", "b"))))) + .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("iaocrwuhumgw") + .withImportIpv6RoutePolicyId("ugnvhtgwa")) + .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("okoxqboz") + .withExportIpv6RoutePolicyId("xzwinrguk")) + .withEgressAclId("bov") + .withIngressAclId("ltqlqufkrnrbnjkc") + .withMicroBfdState(MicroBfdState.DISABLED) + .withConditionalDefaultRouteConfiguration(new ConditionalDefaultRouteProperties() + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("yputawdmdikuf").withNextHop(Arrays.asList("v")), + new StaticRouteProperties().withPrefix("kujz") + .withNextHop(Arrays.asList("yldxkzhvfojcvnhp", "buiywky")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("acbeauvldbd") + .withNextHop(Arrays.asList("guifqjtoxzxbljpz", "uugdarfumitjai", "smokfdyb")), + new StaticRouteProperties().withPrefix("y") + .withNextHop(Arrays.asList("gmjrvrsq", "jcozrwry", "cttvxkxgffpvv", "wvvnxoqaaqjblwq")), + new StaticRouteProperties().withPrefix("wtev") + .withNextHop(Arrays.asList("ugcwtsztxosw", "frymqqf", "sqfcxdleo")))))) .create(); - Assertions.assertEquals(NniType.CE, response.nniType()); - Assertions.assertEquals(IsManagementType.TRUE, response.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.useOptionB()); - Assertions.assertEquals(1256241884, response.layer2Configuration().mtu()); - Assertions.assertEquals("npftkgm", response.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("usnaqsvruuh", response.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("cppmmwhjerlurgi", response.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("nbxlep", response.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("c", response.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5097067213361369198L, response.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(117467872, response.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(504409694, - response.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1654510108, response.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("uv", response.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("oiihrfcowlas", - response.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("uaiuvemqcb", response.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ivexiathm", - response.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("djtgo", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("ybseckgaxm", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("zj", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("tfstdwqdvzc", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("kvw", response.egressAclId()); - Assertions.assertEquals("tkreisojhuswm", response.ingressAclId()); + Assertions.assertEquals(NniType.CE, response.properties().nniType()); + Assertions.assertEquals(IsManagementType.FALSE, response.properties().isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.properties().useOptionB()); + Assertions.assertEquals(1450527917, response.properties().layer2Configuration().mtu()); + Assertions.assertEquals("aavjk", response.properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("ia", response.properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("lqclft", response.properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("eouxpdnl", response.properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("nbckohnr", response.properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(4118102764198980577L, response.properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(921661865, response.properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("rwxf", + response.properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(743093541, + response.properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1034326448, + response.properties().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1793078757, + response.properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("kwnzot", + response.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("vhu", + response.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("zzkzvfywspaja", + response.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("hvpkt", + response.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1823719833, + response.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(227985696, + response.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ichjkwctlsohrt", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("vvcbt", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("umamdorgl", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("khdsfgjb", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("oexkon", response.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("ac", response.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("ehsmvvxkcte", response.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("af", response.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("iffaj", response.properties().egressAclId()); + Assertions.assertEquals("wby", response.properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, response.properties().microBfdState()); + Assertions.assertEquals("ylbbugojdzcluy", + response.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("i", + response.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("fefbbvitln", + response.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("afufwr", + response.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } 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 index 0cd063c8c8bd..eaade93ad58e 100644 --- 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import java.nio.charset.StandardCharsets; @@ -24,43 +26,76 @@ public final class NetworkToNetworkInterconnectsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":351886188,\"interfaces\":[\"nofkwhgyzwf\",\"fdbvooelmikdsqq\"]},\"optionBLayer3Configuration\":{\"peerASN\":5964055036515197618,\"vlanId\":1150172749,\"fabricASN\":6749661156074905652,\"primaryIpv4Prefix\":\"qmlmwjwsmnwb\",\"primaryIpv6Prefix\":\"cvemmriyz\",\"secondaryIpv4Prefix\":\"quesxplcsinbulo\",\"secondaryIpv6Prefix\":\"xhcynnmv\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1962708584,\"multiplier\":2038824069},\"ipv4Routes\":[{\"prefix\":\"idsjqc\",\"nextHop\":[\"z\"]},{\"prefix\":\"rtfdlgp\",\"nextHop\":[\"yjl\",\"kalbcyuwahwzagv\",\"idzcephn\",\"nuhgy\"]},{\"prefix\":\"zkhi\",\"nextHop\":[\"rwpekiprjb\",\"ertj\"]},{\"prefix\":\"airpwj\",\"nextHop\":[\"giwsywp\",\"jtvqopugrsergiuz\",\"qefzypult\",\"mcbcen\"]}],\"ipv6Routes\":[{\"prefix\":\"huepikwcxoasgukq\",\"nextHop\":[\"iy\",\"bfvkiwmqnwm\"]},{\"prefix\":\"tcctirgyu\",\"nextHop\":[\"x\"]},{\"prefix\":\"zhdmcg\",\"nextHop\":[\"brybfarkhko\",\"c\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"wmoyhd\",\"importIpv6RoutePolicyId\":\"jhqnzc\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"pxoy\",\"exportIpv6RoutePolicyId\":\"mjn\"},\"egressAclId\":\"wu\",\"ingressAclId\":\"yxfknj\",\"configurationState\":\"Provisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\"},\"id\":\"avntvklkw\",\"name\":\"isn\",\"type\":\"paymk\"}"; + = "{\"properties\":{\"nniType\":\"CE\",\"isManagementType\":\"True\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":265390367,\"interfaces\":[\"fkneckvyrvdszri\",\"pejhyrzzxqtcg\",\"wmh\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"city\",\"primaryIpv6Prefix\":\"yir\",\"secondaryIpv4Prefix\":\"ingnfunhtzgxsyi\",\"secondaryIpv6Prefix\":\"opkudhjztbwzjb\",\"peerASN\":84073607461599315,\"vlanId\":1530749280,\"fabricASN\":4259250102054003114,\"peLoopbackIpAddress\":[\"qzdbzlkdsbekvprk\",\"pvxi\",\"qcnv\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":2057597596},{\"maximumRoutes\":248428442},{\"maximumRoutes\":1592205851},{\"maximumRoutes\":1639195301}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1767092024,\"multiplier\":1982848049},\"ipv4Routes\":[{\"prefix\":\"dwlraeplp\",\"nextHop\":[\"ecrizkabafdlsiza\"]},{\"prefix\":\"bsgpdbhbdx\",\"nextHop\":[\"sox\",\"uwuungdvvddrcpqu\",\"inlgttvon\",\"rpeli\"]}],\"ipv6Routes\":[{\"prefix\":\"tmtkcqixgqx\",\"nextHop\":[\"pevthuvupdsafqag\"]},{\"prefix\":\"wqumecqyianjmv\",\"nextHop\":[\"odkq\",\"fhuxoxqtgzvzc\",\"mwfogjrhmtbpnhjo\",\"lvfzwt\"]},{\"prefix\":\"rmp\",\"nextHop\":[\"pyqe\"]},{\"prefix\":\"sginpixhulfjl\",\"nextHop\":[\"hv\",\"bkwrvtflotji\",\"viswixlvnwzn\",\"xa\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":534297451,\"multiplier\":1366747338},\"ipv4Routes\":[{\"prefix\":\"kpelyg\",\"nextHop\":[\"wmajllatbl\",\"hcfhw\",\"ithxna\",\"nssvrkzslyliog\"]},{\"prefix\":\"wshrmcpbm\",\"nextHop\":[\"hqtthsb\",\"lwkq\"]},{\"prefix\":\"tqrnreyjfmnrwe\",\"nextHop\":[\"tunjdc\",\"ugvsjfpsyqvgaay\"]},{\"prefix\":\"fk\",\"nextHop\":[\"hiwmklj\",\"kgxcewzg\",\"xz\"]}],\"ipv6Routes\":[{\"prefix\":\"crcctted\",\"nextHop\":[\"zbvsjuths\",\"s\"]},{\"prefix\":\"filnc\",\"nextHop\":[\"nkpxefmpzdwer\",\"ckzxdlupgtp\",\"mndzbfoia\",\"pglntnsiuxy\"]},{\"prefix\":\"tjwsdxyzgrrllz\",\"nextHop\":[\"gomhenqnov\",\"mk\",\"bxvexusjfjuphjju\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"vjtgpyoat\",\"importIpv6RoutePolicyId\":\"si\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"mmxjdkvyzilrlf\",\"exportIpv6RoutePolicyId\":\"wvvxj\"},\"egressAclId\":\"uskmbqyfecns\",\"ingressAclId\":\"ewfuwg\",\"microBfdState\":\"Disabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"zibhwybwmeb\",\"nextHop\":[\"zwcfdtxkurppw\",\"s\",\"xhornvy\",\"xjkdsqe\"]}],\"ipv6Routes\":[{\"prefix\":\"dqttiqwixsdx\",\"nextHop\":[\"lw\",\"vahbwhrguqet\",\"bqhyszflzj\",\"dciwxlgg\"]}]},\"lastOperation\":{\"details\":\"ayfklbg\"},\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"RMA\"},\"id\":\"msqznvkhjtrashn\",\"name\":\"ofiykloeqxccpqb\",\"type\":\"ubehzip\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkToNetworkInterconnect response = manager.networkToNetworkInterconnects() - .getWithResponse("ampqepef", "mubplzoepeqlhb", "y", com.azure.core.util.Context.NONE) + .getWithResponse("sffpizef", "jgblehxpeuahvxf", "zcevf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(NniType.CE, response.nniType()); - Assertions.assertEquals(IsManagementType.TRUE, response.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.useOptionB()); - Assertions.assertEquals(351886188, response.layer2Configuration().mtu()); - Assertions.assertEquals("nofkwhgyzwf", response.layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("qmlmwjwsmnwb", response.optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("cvemmriyz", response.optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("quesxplcsinbulo", response.optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("xhcynnmv", response.optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(5964055036515197618L, response.optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1150172749, response.optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1962708584, - response.npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(2038824069, response.npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("idsjqc", response.npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("z", response.npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("huepikwcxoasgukq", - response.npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("iy", response.npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("wmoyhd", response.importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("jhqnzc", response.importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("pxoy", response.exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("mjn", response.exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("wu", response.egressAclId()); - Assertions.assertEquals("yxfknj", response.ingressAclId()); + Assertions.assertEquals(NniType.CE, response.properties().nniType()); + Assertions.assertEquals(IsManagementType.TRUE, response.properties().isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, response.properties().useOptionB()); + Assertions.assertEquals(265390367, response.properties().layer2Configuration().mtu()); + Assertions.assertEquals("fkneckvyrvdszri", response.properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("city", response.properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("yir", response.properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("ingnfunhtzgxsyi", + response.properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("opkudhjztbwzjb", + response.properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(84073607461599315L, response.properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(1530749280, response.properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("qzdbzlkdsbekvprk", + response.properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.properties().optionBLayer3Configuration().bmpConfiguration().configurationState()); + Assertions.assertEquals(2057597596, + response.properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1767092024, + response.properties().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1982848049, + response.properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("dwlraeplp", + response.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ecrizkabafdlsiza", + response.properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("tmtkcqixgqx", + response.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pevthuvupdsafqag", + response.properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(534297451, + response.properties().staticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1366747338, + response.properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("kpelyg", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("wmajllatbl", + response.properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("crcctted", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("zbvsjuths", + response.properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("vjtgpyoat", response.properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("si", response.properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("mmxjdkvyzilrlf", response.properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("wvvxj", response.properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("uskmbqyfecns", response.properties().egressAclId()); + Assertions.assertEquals("ewfuwg", response.properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.DISABLED, response.properties().microBfdState()); + Assertions.assertEquals("zibhwybwmeb", + response.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("zwcfdtxkurppw", + response.properties().conditionalDefaultRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("dqttiqwixsdx", + response.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("lw", + response.properties().conditionalDefaultRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java index b59618d50c30..567a48aa5c73 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricMockTests.java @@ -1,18 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; +import com.azure.resourcemanager.managednetworkfabric.models.MicroBfdState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NniType; import java.nio.charset.StandardCharsets; @@ -25,50 +27,125 @@ public final class NetworkToNetworkInterconnectsListByNetworkFabricMockTests { @Test public void testListByNetworkFabric() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"True\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":856171902,\"interfaces\":[\"xxregykjmpadbz\"]},\"optionBLayer3Configuration\":{\"peerASN\":8569700774121890571,\"vlanId\":1427677061,\"fabricASN\":187712996489181130,\"primaryIpv4Prefix\":\"tyd\",\"primaryIpv6Prefix\":\"grpqua\",\"secondaryIpv4Prefix\":\"gjqqbactffxdb\",\"secondaryIpv6Prefix\":\"ihumw\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1611726934,\"multiplier\":1092461654},\"ipv4Routes\":[{\"prefix\":\"izqqihvb\",\"nextHop\":[\"fq\",\"qdd\",\"ynpgomzmkj\",\"ajlfpsvrljlhe\"]},{\"prefix\":\"cccpxbnwitaf\",\"nextHop\":[\"evpt\",\"itghz\",\"wvkpar\"]},{\"prefix\":\"kplqftqcxqmbs\",\"nextHop\":[\"cykgulellfwrmsux\"]},{\"prefix\":\"qbmqo\",\"nextHop\":[\"xlpkdsnbq\",\"ymsdlraduhgwaxz\",\"rppoy\"]}],\"ipv6Routes\":[{\"prefix\":\"ribeskkopbk\",\"nextHop\":[\"ibmbtmorikcze\",\"qtiqxgwsfrlyvzl\",\"jydg\"]},{\"prefix\":\"doqgrucw\",\"nextHop\":[\"yjudhgwjqegly\",\"nrruwsqp\",\"yxkm\",\"mgexqcilfiulgnn\"]},{\"prefix\":\"xwdpmc\",\"nextHop\":[\"qvvzxgbamqrb\",\"snptmmvdpavcj\",\"byjuwhizcbqj\",\"mhwdtunpc\"]},{\"prefix\":\"kd\",\"nextHop\":[\"fouwkoltjdauuj\",\"ltyhddzeykud\",\"zrimyehplmq\",\"oduk\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"znqqkqxkdglse\",\"importIpv6RoutePolicyId\":\"krbyy\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"jg\",\"exportIpv6RoutePolicyId\":\"wgokrllbecannvxo\"},\"egressAclId\":\"dcftptfc\",\"ingressAclId\":\"pmfw\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"id\":\"ihifo\",\"name\":\"ocmgadhmqyufp\",\"type\":\"owweylszrtngiqc\"}]}"; + = "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"isManagementType\":\"False\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"mtu\":1262800261,\"interfaces\":[\"kgpwd\",\"zzkzi\",\"pjnhhiofcnyzqz\",\"lddngqwmlleg\"]},\"optionBLayer3Configuration\":{\"primaryIpv4Prefix\":\"magsyljww\",\"primaryIpv6Prefix\":\"qh\",\"secondaryIpv4Prefix\":\"lajmik\",\"secondaryIpv6Prefix\":\"nrjkjop\",\"peerASN\":3158552428451905624,\"vlanId\":1709979715,\"fabricASN\":6604570164168684740,\"peLoopbackIpAddress\":[\"doalldglzdkxf\"],\"bmpConfiguration\":{\"configurationState\":\"Enabled\"},\"prefixLimits\":[{\"maximumRoutes\":387504453},{\"maximumRoutes\":448123853},{\"maximumRoutes\":65524371},{\"maximumRoutes\":1320639154}]},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1519684556,\"multiplier\":505899023},\"ipv4Routes\":[{\"prefix\":\"ztghdwrvffjpw\",\"nextHop\":[\"lfyftg\",\"e\",\"cplxid\"]},{\"prefix\":\"uxzzhldaxvi\",\"nextHop\":[\"uwacfqnwvrbb\"]},{\"prefix\":\"gi\",\"nextHop\":[\"zrpqe\",\"rdldvxcjjhjnp\",\"tazfyxe\",\"klywdlxm\"]},{\"prefix\":\"oqmamascqqtq\",\"nextHop\":[\"ntnlyrp\"]}],\"ipv6Routes\":[{\"prefix\":\"wiaxsucforgc\",\"nextHop\":[\"ip\",\"nroizz\"]},{\"prefix\":\"knybfsoayatqk\",\"nextHop\":[\"uxpldzkvbebdj\",\"aoggdpjjkoxl\",\"cjdooyx\"]},{\"prefix\":\"ozzo\",\"nextHop\":[\"djhqqlbwid\",\"bdftbxruu\"]}]},\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":967001786,\"multiplier\":479849125},\"ipv4Routes\":[{\"prefix\":\"kucarwnpw\",\"nextHop\":[\"hlabttxfitt\",\"eaxqyhflnl\",\"tacsslellfukqur\"]},{\"prefix\":\"tcf\",\"nextHop\":[\"t\",\"xyrsle\",\"hozsmjjsvymoz\"]},{\"prefix\":\"yyyvlxmspjqafsxv\",\"nextHop\":[\"uazoblxxks\",\"utizpv\"]}],\"ipv6Routes\":[{\"prefix\":\"gxsdolodfod\",\"nextHop\":[\"haogewdhlnarjtu\",\"arjiriccu\",\"q\"]},{\"prefix\":\"jvrzdjgmgfayvbsi\",\"nextHop\":[\"nvpzdbzpizgau\",\"vcuwfybxorr\"]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"msqarbtrkdno\",\"importIpv6RoutePolicyId\":\"ijpjiudnustbmox\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"kd\",\"exportIpv6RoutePolicyId\":\"bhuepuvrlxzqz\"},\"egressAclId\":\"frhyxlwq\",\"ingressAclId\":\"usqmer\",\"microBfdState\":\"Enabled\",\"conditionalDefaultRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"memkyouwmj\",\"nextHop\":[\"mkchjdxrbbhukx\",\"qhyrbeqpg\"]},{\"prefix\":\"desnesgnxd\",\"nextHop\":[\"xtefv\"]}],\"ipv6Routes\":[{\"prefix\":\"toqcezmznoejqduy\",\"nextHop\":[\"zjyzajdpbn\",\"pzx\",\"opryutxasnigh\",\"xi\"]},{\"prefix\":\"hiihg\",\"nextHop\":[\"qheitt\",\"mipfudzntb\"]},{\"prefix\":\"gugwhkwypbqnxpoh\",\"nextHop\":[\"kmbajy\"]},{\"prefix\":\"egsbuqdpzhq\",\"nextHop\":[\"zzut\",\"tidsxrexba\",\"gbmemopyp\"]}]},\"lastOperation\":{\"details\":\"mowucjznno\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"UnderMaintenance\"},\"id\":\"wsrmegph\",\"name\":\"j\",\"type\":\"fkjd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkToNetworkInterconnects() - .listByNetworkFabric("totktd", "ewwlkry", com.azure.core.util.Context.NONE); + .listByNetworkFabric("iafsuuvoqq", "eoinxko", com.azure.core.util.Context.NONE); - Assertions.assertEquals(NniType.NPB, response.iterator().next().nniType()); - Assertions.assertEquals(IsManagementType.TRUE, response.iterator().next().isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, response.iterator().next().useOptionB()); - Assertions.assertEquals(856171902, response.iterator().next().layer2Configuration().mtu()); - Assertions.assertEquals("xxregykjmpadbz", response.iterator().next().layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("tyd", response.iterator().next().optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("grpqua", response.iterator().next().optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gjqqbactffxdb", - response.iterator().next().optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("ihumw", response.iterator().next().optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(8569700774121890571L, - response.iterator().next().optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1427677061, response.iterator().next().optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(1611726934, - response.iterator().next().npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1092461654, - response.iterator().next().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("izqqihvb", - response.iterator().next().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("fq", - response.iterator().next().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("ribeskkopbk", - response.iterator().next().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("ibmbtmorikcze", - response.iterator().next().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("znqqkqxkdglse", - response.iterator().next().importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("krbyy", response.iterator().next().importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("jg", response.iterator().next().exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("wgokrllbecannvxo", - response.iterator().next().exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("dcftptfc", response.iterator().next().egressAclId()); - Assertions.assertEquals("pmfw", response.iterator().next().ingressAclId()); + Assertions.assertEquals(NniType.NPB, response.iterator().next().properties().nniType()); + Assertions.assertEquals(IsManagementType.FALSE, response.iterator().next().properties().isManagementType()); + Assertions.assertEquals(BooleanEnumProperty.TRUE, response.iterator().next().properties().useOptionB()); + Assertions.assertEquals(1262800261, response.iterator().next().properties().layer2Configuration().mtu()); + Assertions.assertEquals("kgpwd", + response.iterator().next().properties().layer2Configuration().interfaces().get(0)); + Assertions.assertEquals("magsyljww", + response.iterator().next().properties().optionBLayer3Configuration().primaryIpv4Prefix()); + Assertions.assertEquals("qh", + response.iterator().next().properties().optionBLayer3Configuration().primaryIpv6Prefix()); + Assertions.assertEquals("lajmik", + response.iterator().next().properties().optionBLayer3Configuration().secondaryIpv4Prefix()); + Assertions.assertEquals("nrjkjop", + response.iterator().next().properties().optionBLayer3Configuration().secondaryIpv6Prefix()); + Assertions.assertEquals(3158552428451905624L, + response.iterator().next().properties().optionBLayer3Configuration().peerASN()); + Assertions.assertEquals(1709979715, + response.iterator().next().properties().optionBLayer3Configuration().vlanId()); + Assertions.assertEquals("doalldglzdkxf", + response.iterator().next().properties().optionBLayer3Configuration().peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.ENABLED, + response.iterator() + .next() + .properties() + .optionBLayer3Configuration() + .bmpConfiguration() + .configurationState()); + Assertions.assertEquals(387504453, + response.iterator().next().properties().optionBLayer3Configuration().prefixLimits().get(0).maximumRoutes()); + Assertions.assertEquals(1519684556, + response.iterator() + .next() + .properties() + .npbStaticRouteConfiguration() + .bfdConfiguration() + .intervalInMilliSeconds()); + Assertions.assertEquals(505899023, + response.iterator().next().properties().npbStaticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("ztghdwrvffjpw", + response.iterator().next().properties().npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("lfyftg", + response.iterator().next().properties().npbStaticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("wiaxsucforgc", + response.iterator().next().properties().npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("ip", + response.iterator().next().properties().npbStaticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(967001786, + response.iterator() + .next() + .properties() + .staticRouteConfiguration() + .bfdConfiguration() + .intervalInMilliSeconds()); + Assertions.assertEquals(479849125, + response.iterator().next().properties().staticRouteConfiguration().bfdConfiguration().multiplier()); + Assertions.assertEquals("kucarwnpw", + response.iterator().next().properties().staticRouteConfiguration().ipv4Routes().get(0).prefix()); + Assertions.assertEquals("hlabttxfitt", + response.iterator().next().properties().staticRouteConfiguration().ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("gxsdolodfod", + response.iterator().next().properties().staticRouteConfiguration().ipv6Routes().get(0).prefix()); + Assertions.assertEquals("haogewdhlnarjtu", + response.iterator().next().properties().staticRouteConfiguration().ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("msqarbtrkdno", + response.iterator().next().properties().importRoutePolicy().importIpv4RoutePolicyId()); + Assertions.assertEquals("ijpjiudnustbmox", + response.iterator().next().properties().importRoutePolicy().importIpv6RoutePolicyId()); + Assertions.assertEquals("kd", + response.iterator().next().properties().exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("bhuepuvrlxzqz", + response.iterator().next().properties().exportRoutePolicy().exportIpv6RoutePolicyId()); + Assertions.assertEquals("frhyxlwq", response.iterator().next().properties().egressAclId()); + Assertions.assertEquals("usqmer", response.iterator().next().properties().ingressAclId()); + Assertions.assertEquals(MicroBfdState.ENABLED, response.iterator().next().properties().microBfdState()); + Assertions.assertEquals("memkyouwmj", + response.iterator() + .next() + .properties() + .conditionalDefaultRouteConfiguration() + .ipv4Routes() + .get(0) + .prefix()); + Assertions.assertEquals("mkchjdxrbbhukx", + response.iterator() + .next() + .properties() + .conditionalDefaultRouteConfiguration() + .ipv4Routes() + .get(0) + .nextHop() + .get(0)); + Assertions.assertEquals("toqcezmznoejqduy", + response.iterator() + .next() + .properties() + .conditionalDefaultRouteConfiguration() + .ipv6Routes() + .get(0) + .prefix()); + Assertions.assertEquals("zjyzajdpbn", + response.iterator() + .next() + .properties() + .conditionalDefaultRouteConfiguration() + .ipv6Routes() + .get(0) + .nextHop() + .get(0)); } } 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 87e7ec701b4d..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 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.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.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectsList; -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; -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\",\"isManagementType\":\"True\",\"useOptionB\":\"False\",\"layer2Configuration\":{\"mtu\":129229845,\"interfaces\":[\"tgz\",\"xxlfejlzuql\"]},\"optionBLayer3Configuration\":{\"peerASN\":7855788189819438729,\"vlanId\":1357246745,\"fabricASN\":7344268812658971716,\"primaryIpv4Prefix\":\"mit\",\"primaryIpv6Prefix\":\"qlhchwhrktjle\",\"secondaryIpv4Prefix\":\"ibfiplhxfnsm\",\"secondaryIpv6Prefix\":\"jow\"},\"npbStaticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":96286060,\"multiplier\":715436858},\"ipv4Routes\":[{\"prefix\":\"mhn\",\"nextHop\":[]},{\"prefix\":\"lzbuwodmachbkvn\",\"nextHop\":[]},{\"prefix\":\"pbjrmvgoqplehm\",\"nextHop\":[]},{\"prefix\":\"mkzdllczdprwnhk\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"goxsstci\",\"nextHop\":[]},{\"prefix\":\"rak\",\"nextHop\":[]},{\"prefix\":\"rrynjcwmhly\",\"nextHop\":[]},{\"prefix\":\"gnukxrkemjpe\",\"nextHop\":[]}]},\"importRoutePolicy\":{\"importIpv4RoutePolicyId\":\"rlzaudg\",\"importIpv6RoutePolicyId\":\"f\"},\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"akkuc\",\"exportIpv6RoutePolicyId\":\"wnhczbutou\"},\"egressAclId\":\"jtirjwayhicqq\",\"ingressAclId\":\"v\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"MAT\"},\"id\":\"zedv\",\"name\":\"iabvnsrgek\",\"type\":\"yqxadyfhbmw\"}],\"nextLink\":\"ojqttbsp\"}") - .toObject(NetworkToNetworkInterconnectsList.class); - Assertions.assertEquals(NniType.NPB, model.value().get(0).nniType()); - Assertions.assertEquals(IsManagementType.TRUE, model.value().get(0).isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).useOptionB()); - Assertions.assertEquals(129229845, model.value().get(0).layer2Configuration().mtu()); - Assertions.assertEquals("tgz", model.value().get(0).layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("mit", model.value().get(0).optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("qlhchwhrktjle", model.value().get(0).optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("ibfiplhxfnsm", - model.value().get(0).optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jow", model.value().get(0).optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(7855788189819438729L, model.value().get(0).optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1357246745, model.value().get(0).optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(96286060, - model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(715436858, - model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("mhn", model.value().get(0).npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("goxsstci", - model.value().get(0).npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("rlzaudg", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("f", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("akkuc", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("wnhczbutou", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("jtirjwayhicqq", model.value().get(0).egressAclId()); - Assertions.assertEquals("v", model.value().get(0).ingressAclId()); - Assertions.assertEquals("ojqttbsp", 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(IsManagementType.TRUE) - .withUseOptionB(BooleanEnumProperty.FALSE) - .withLayer2Configuration( - new Layer2Configuration().withMtu(129229845).withInterfaces(Arrays.asList("tgz", "xxlfejlzuql"))) - .withOptionBLayer3Configuration( - new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration().withPrimaryIpv4Prefix("mit") - .withPrimaryIpv6Prefix("qlhchwhrktjle") - .withSecondaryIpv4Prefix("ibfiplhxfnsm") - .withSecondaryIpv6Prefix("jow") - .withPeerAsn(7855788189819438729L) - .withVlanId(1357246745)) - .withNpbStaticRouteConfiguration(new NpbStaticRouteConfiguration() - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(96286060).withMultiplier(715436858)) - .withIpv4Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("mhn").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("lzbuwodmachbkvn").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("pbjrmvgoqplehm").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("mkzdllczdprwnhk").withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("goxsstci").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("rak").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("rrynjcwmhly").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("gnukxrkemjpe").withNextHop(Arrays.asList())))) - .withImportRoutePolicy(new ImportRoutePolicyInformation().withImportIpv4RoutePolicyId("rlzaudg") - .withImportIpv6RoutePolicyId("f")) - .withExportRoutePolicy(new ExportRoutePolicyInformation().withExportIpv4RoutePolicyId("akkuc") - .withExportIpv6RoutePolicyId("wnhczbutou")) - .withEgressAclId("jtirjwayhicqq") - .withIngressAclId("v"))) - .withNextLink("ojqttbsp"); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectsList.class); - Assertions.assertEquals(NniType.NPB, model.value().get(0).nniType()); - Assertions.assertEquals(IsManagementType.TRUE, model.value().get(0).isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).useOptionB()); - Assertions.assertEquals(129229845, model.value().get(0).layer2Configuration().mtu()); - Assertions.assertEquals("tgz", model.value().get(0).layer2Configuration().interfaces().get(0)); - Assertions.assertEquals("mit", model.value().get(0).optionBLayer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("qlhchwhrktjle", model.value().get(0).optionBLayer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("ibfiplhxfnsm", - model.value().get(0).optionBLayer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("jow", model.value().get(0).optionBLayer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals(7855788189819438729L, model.value().get(0).optionBLayer3Configuration().peerAsn()); - Assertions.assertEquals(1357246745, model.value().get(0).optionBLayer3Configuration().vlanId()); - Assertions.assertEquals(96286060, - model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(715436858, - model.value().get(0).npbStaticRouteConfiguration().bfdConfiguration().multiplier()); - Assertions.assertEquals("mhn", model.value().get(0).npbStaticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("goxsstci", - model.value().get(0).npbStaticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("rlzaudg", model.value().get(0).importRoutePolicy().importIpv4RoutePolicyId()); - Assertions.assertEquals("f", model.value().get(0).importRoutePolicy().importIpv6RoutePolicyId()); - Assertions.assertEquals("akkuc", model.value().get(0).exportRoutePolicy().exportIpv4RoutePolicyId()); - Assertions.assertEquals("wnhczbutou", model.value().get(0).exportRoutePolicy().exportIpv6RoutePolicyId()); - Assertions.assertEquals("jtirjwayhicqq", model.value().get(0).egressAclId()); - Assertions.assertEquals("v", model.value().get(0).ingressAclId()); - Assertions.assertEquals("ojqttbsp", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBfdAdministrativeStateRequestTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBfdAdministrativeStateRequestTests.java new file mode 100644 index 000000000000..a60611314f0c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBfdAdministrativeStateRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBfdAdministrativeStateRequest; +import com.azure.resourcemanager.managednetworkfabric.models.RouteType; +import org.junit.jupiter.api.Assertions; + +public final class NniBfdAdministrativeStateRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniBfdAdministrativeStateRequest model + = BinaryData.fromString("{\"routeType\":\"Static\",\"administrativeState\":\"RMA\"}") + .toObject(NniBfdAdministrativeStateRequest.class); + Assertions.assertEquals(RouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.RMA, model.administrativeState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniBfdAdministrativeStateRequest model = new NniBfdAdministrativeStateRequest().withRouteType(RouteType.STATIC) + .withAdministrativeState(BfdAdministrativeState.RMA); + model = BinaryData.fromObject(model).toObject(NniBfdAdministrativeStateRequest.class); + Assertions.assertEquals(RouteType.STATIC, model.routeType()); + Assertions.assertEquals(BfdAdministrativeState.RMA, model.administrativeState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java new file mode 100644 index 000000000000..7f0a4a9165ac --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPatchPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class NniBmpPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniBmpPatchProperties model + = BinaryData.fromString("{\"configurationState\":\"Enabled\"}").toObject(NniBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniBmpPatchProperties model = new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(NniBmpPatchProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java new file mode 100644 index 000000000000..a9a42df7ddf9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniBmpPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; +import org.junit.jupiter.api.Assertions; + +public final class NniBmpPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniBmpProperties model + = BinaryData.fromString("{\"configurationState\":\"Enabled\"}").toObject(NniBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniBmpProperties model = new NniBmpProperties().withConfigurationState(BmpConfigurationState.ENABLED); + model = BinaryData.fromObject(model).toObject(NniBmpProperties.class); + Assertions.assertEquals(BmpConfigurationState.ENABLED, model.configurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java new file mode 100644 index 000000000000..58582114ebd3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRouteConfigurationTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.NniStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NniStaticRouteConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniStaticRouteConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1677805514,\"multiplier\":1332463500},\"ipv4Routes\":[{\"prefix\":\"sieeail\",\"nextHop\":[\"qmqfydeotmfxl\",\"d\",\"g\"]},{\"prefix\":\"gnamkuuyiu\",\"nextHop\":[\"afixlxicwgpthd\",\"fmfzcfasfodropa\",\"v\"]},{\"prefix\":\"gt\",\"nextHop\":[\"us\",\"wgqrntaum\",\"rcjlvkrkegtyczup\",\"iyxlzmiydde\"]}],\"ipv6Routes\":[{\"prefix\":\"qvabmhvsexduet\",\"nextHop\":[\"pfczewxtrl\",\"bpxya\"]},{\"prefix\":\"kjpirgzxvbczw\",\"nextHop\":[\"egbthm\",\"ritjbu\"]},{\"prefix\":\"ggrunozfvualjt\",\"nextHop\":[\"ivsdw\",\"n\",\"krfihscjv\"]}]}") + .toObject(NniStaticRouteConfiguration.class); + Assertions.assertEquals(1677805514, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1332463500, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("sieeail", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qmqfydeotmfxl", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("qvabmhvsexduet", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pfczewxtrl", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniStaticRouteConfiguration model = new NniStaticRouteConfiguration() + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1677805514).withMultiplier(1332463500)) + .withIpv4Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("sieeail").withNextHop(Arrays.asList("qmqfydeotmfxl", "d", "g")), + new StaticRouteProperties().withPrefix("gnamkuuyiu") + .withNextHop(Arrays.asList("afixlxicwgpthd", "fmfzcfasfodropa", "v")), + new StaticRouteProperties().withPrefix("gt") + .withNextHop(Arrays.asList("us", "wgqrntaum", "rcjlvkrkegtyczup", "iyxlzmiydde")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("qvabmhvsexduet") + .withNextHop(Arrays.asList("pfczewxtrl", "bpxya")), + new StaticRouteProperties().withPrefix("kjpirgzxvbczw").withNextHop(Arrays.asList("egbthm", "ritjbu")), + new StaticRouteProperties().withPrefix("ggrunozfvualjt") + .withNextHop(Arrays.asList("ivsdw", "n", "krfihscjv")))); + model = BinaryData.fromObject(model).toObject(NniStaticRouteConfiguration.class); + Assertions.assertEquals(1677805514, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1332463500, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("sieeail", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("qmqfydeotmfxl", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("qvabmhvsexduet", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pfczewxtrl", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..14537f499bf1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NniStaticRoutePatchConfigurationTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NniStaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NniStaticRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NniStaticRoutePatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":4555781,\"multiplier\":446374421},\"ipv4Routes\":[{\"prefix\":\"jixxfsfpcrtn\",\"nextHop\":[\"uefxxijtebdveywe\",\"krhlolmc\",\"wepf\",\"sv\"]},{\"prefix\":\"bv\",\"nextHop\":[\"dljnpetl\",\"n\"]}],\"ipv6Routes\":[{\"prefix\":\"tawevxehu\",\"nextHop\":[\"dxljzvdovbrble\"]},{\"prefix\":\"lprdaqccddcbnygd\",\"nextHop\":[\"cxwbp\"]}]}") + .toObject(NniStaticRoutePatchConfiguration.class); + Assertions.assertEquals(4555781, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(446374421, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("jixxfsfpcrtn", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("uefxxijtebdveywe", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("tawevxehu", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dxljzvdovbrble", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NniStaticRoutePatchConfiguration model = new NniStaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(4555781).withMultiplier(446374421)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("jixxfsfpcrtn") + .withNextHop(Arrays.asList("uefxxijtebdveywe", "krhlolmc", "wepf", "sv")), + new StaticRoutePatchProperties().withPrefix("bv").withNextHop(Arrays.asList("dljnpetl", "n")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("tawevxehu").withNextHop(Arrays.asList("dxljzvdovbrble")), + new StaticRoutePatchProperties().withPrefix("lprdaqccddcbnygd").withNextHop(Arrays.asList("cxwbp")))); + model = BinaryData.fromObject(model).toObject(NniStaticRoutePatchConfiguration.class); + Assertions.assertEquals(4555781, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(446374421, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("jixxfsfpcrtn", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("uefxxijtebdveywe", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("tawevxehu", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("dxljzvdovbrble", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java new file mode 100644 index 000000000000..c39f32118783 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationPatchTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfigurationPatch; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NpbStaticRouteConfigurationPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NpbStaticRouteConfigurationPatch model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":944136407,\"multiplier\":1918010429},\"ipv4Routes\":[{\"prefix\":\"oa\",\"nextHop\":[\"ukuicjuftekioo\",\"nd\",\"ewfhvpxjh\",\"zubfjzabbwz\"]}],\"ipv6Routes\":[{\"prefix\":\"uaixcdckix\",\"nextHop\":[\"saigavkmvyxzer\"]},{\"prefix\":\"jrk\",\"nextHop\":[\"jbyetjxryoptaei\",\"whlbecgihzbpem\",\"rrabovrwwxywp\",\"hspbo\"]},{\"prefix\":\"hifppskpeswyhhm\",\"nextHop\":[\"juajxwwvcmmp\",\"glyuqvcmla\",\"xbzbqufpnezs\",\"zaymld\"]},{\"prefix\":\"orhyogzmsimehtc\",\"nextHop\":[\"wdhtqqhyhnimxtn\",\"ugisnomwnwngho\"]}]}") + .toObject(NpbStaticRouteConfigurationPatch.class); + Assertions.assertEquals(944136407, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1918010429, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("oa", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ukuicjuftekioo", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("uaixcdckix", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("saigavkmvyxzer", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NpbStaticRouteConfigurationPatch model = new NpbStaticRouteConfigurationPatch() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(944136407).withMultiplier(1918010429)) + .withIpv4Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("oa") + .withNextHop(Arrays.asList("ukuicjuftekioo", "nd", "ewfhvpxjh", "zubfjzabbwz")))) + .withIpv6Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("uaixcdckix").withNextHop(Arrays.asList("saigavkmvyxzer")), + new StaticRoutePatchProperties().withPrefix("jrk") + .withNextHop(Arrays.asList("jbyetjxryoptaei", "whlbecgihzbpem", "rrabovrwwxywp", "hspbo")), + new StaticRoutePatchProperties().withPrefix("hifppskpeswyhhm") + .withNextHop(Arrays.asList("juajxwwvcmmp", "glyuqvcmla", "xbzbqufpnezs", "zaymld")), + new StaticRoutePatchProperties().withPrefix("orhyogzmsimehtc") + .withNextHop(Arrays.asList("wdhtqqhyhnimxtn", "ugisnomwnwngho")))); + model = BinaryData.fromObject(model).toObject(NpbStaticRouteConfigurationPatch.class); + Assertions.assertEquals(944136407, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1918010429, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("oa", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("ukuicjuftekioo", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("uaixcdckix", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("saigavkmvyxzer", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java index c58cb7d7ce98..c475e99ce4cc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NpbStaticRouteConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,34 +15,34 @@ public final class NpbStaticRouteConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NpbStaticRouteConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":703140986,\"multiplier\":468071165},\"ipv4Routes\":[{\"prefix\":\"gbzxmbtplefoioy\",\"nextHop\":[\"oxznvgvd\",\"muuv\"]},{\"prefix\":\"awsxmrszbknimxlp\",\"nextHop\":[\"rxrzutylcur\",\"aqmnbxqaehtd\",\"jmbnvynf\",\"ooeactedc\"]}],\"ipv6Routes\":[{\"prefix\":\"kakddidahzllrqm\",\"nextHop\":[\"pbyxroiduyqy\",\"ffmnoiics\",\"dyhbrjj\"]}]}") + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1677946319,\"multiplier\":938097009},\"ipv4Routes\":[{\"prefix\":\"jojlle\",\"nextHop\":[\"dpmtonvhgn\",\"tmeplhbpj\"]}],\"ipv6Routes\":[{\"prefix\":\"mumm\",\"nextHop\":[\"vavucg\",\"iuaiqpm\"]},{\"prefix\":\"ufzhrchx\",\"nextHop\":[\"uzdmhv\",\"lvivj\"]},{\"prefix\":\"xmlitqdsjip\",\"nextHop\":[\"iscotyx\",\"riifefn\"]}]}") .toObject(NpbStaticRouteConfiguration.class); - Assertions.assertEquals(703140986, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(468071165, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("gbzxmbtplefoioy", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("oxznvgvd", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kakddidahzllrqm", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("pbyxroiduyqy", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1677946319, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(938097009, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("jojlle", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("dpmtonvhgn", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("mumm", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("vavucg", model.ipv6Routes().get(0).nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NpbStaticRouteConfiguration model = new NpbStaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(703140986).withMultiplier(468071165)) + new BfdConfiguration().withIntervalInMilliSeconds(1677946319).withMultiplier(938097009)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("gbzxmbtplefoioy") - .withNextHop(Arrays.asList("oxznvgvd", "muuv")), - new StaticRouteProperties().withPrefix("awsxmrszbknimxlp") - .withNextHop(Arrays.asList("rxrzutylcur", "aqmnbxqaehtd", "jmbnvynf", "ooeactedc")))) - .withIpv6Routes(Arrays.asList(new StaticRouteProperties().withPrefix("kakddidahzllrqm") - .withNextHop(Arrays.asList("pbyxroiduyqy", "ffmnoiics", "dyhbrjj")))); + new StaticRouteProperties().withPrefix("jojlle").withNextHop(Arrays.asList("dpmtonvhgn", "tmeplhbpj")))) + .withIpv6Routes(Arrays.asList( + new StaticRouteProperties().withPrefix("mumm").withNextHop(Arrays.asList("vavucg", "iuaiqpm")), + new StaticRouteProperties().withPrefix("ufzhrchx").withNextHop(Arrays.asList("uzdmhv", "lvivj")), + new StaticRouteProperties().withPrefix("xmlitqdsjip") + .withNextHop(Arrays.asList("iscotyx", "riifefn")))); model = BinaryData.fromObject(model).toObject(NpbStaticRouteConfiguration.class); - Assertions.assertEquals(703140986, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(468071165, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("gbzxmbtplefoioy", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("oxznvgvd", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kakddidahzllrqm", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("pbyxroiduyqy", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(1677946319, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(938097009, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("jojlle", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("dpmtonvhgn", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("mumm", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("vavucg", model.ipv6Routes().get(0).nextHop().get(0)); } } 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 index 3bbd27d82a04..792ba3fabaea 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,13 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"hgd\",\"resource\":\"ubwggxzsshxliqm\",\"operation\":\"kwhfmdoiiyobqzwj\",\"description\":\"wrsofxcacrm\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .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 index 8ddb517501e3..ca513acfe84f 100644 --- 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 @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"lzs\",\"isDataAction\":true,\"display\":{\"provider\":\"fdrslzymqx\",\"resource\":\"rwycu\",\"operation\":\"tjwgetfigwn\",\"description\":\"jxzi\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"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 index d681cd32e1af..987a79d177ba 100644 --- 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 @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OperationListResult; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"owagehxuihwes\",\"isDataAction\":true,\"display\":{\"provider\":\"gblkkncyp\",\"resource\":\"evspsaney\",\"operation\":\"erpiobnhrfbrj\",\"description\":\"jwqdmr\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"pqcaigazwfwlrfd\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); + Assertions.assertEquals("kfo", model.nextLink()); } } 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 index cb6c073a7573..3171662a8bf2 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.Operation; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"spbibsnxmfooinp\",\"isDataAction\":true,\"display\":{\"provider\":\"gcuwgkmqcb\",\"resource\":\"wtfuxktsxnik\",\"operation\":\"ittfmlp\",\"description\":\"tep\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"evzcrrwnk\",\"isDataAction\":true,\"display\":{\"provider\":\"ymxsfqeaxdqelu\",\"resource\":\"saqhvia\",\"operation\":\"q\",\"description\":\"uhv\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); 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 8527b66fa24f..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.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.BfdConfiguration; -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\":387260273,\"vlanId\":1121842631,\"peerASN\":3961448692771285787,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":113330919,\"multiplier\":1820596748}}") - .toObject(OptionAProperties.class); - Assertions.assertEquals(387260273, model.mtu()); - Assertions.assertEquals(1121842631, model.vlanId()); - Assertions.assertEquals(3961448692771285787L, model.peerAsn()); - Assertions.assertEquals(113330919, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1820596748, model.bfdConfiguration().multiplier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionAProperties model = new OptionAProperties().withMtu(387260273) - .withVlanId(1121842631) - .withPeerAsn(3961448692771285787L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(113330919).withMultiplier(1820596748)); - model = BinaryData.fromObject(model).toObject(OptionAProperties.class); - Assertions.assertEquals(387260273, model.mtu()); - Assertions.assertEquals(1121842631, model.vlanId()); - Assertions.assertEquals(3961448692771285787L, model.peerAsn()); - Assertions.assertEquals(113330919, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1820596748, model.bfdConfiguration().multiplier()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java new file mode 100644 index 000000000000..8550a4d0b284 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationPatchPropertiesTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OptionBLayer3ConfigurationPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OptionBLayer3ConfigurationPatchProperties model = BinaryData.fromString( + "{\"primaryIpv4Prefix\":\"bejqfbifopfjx\",\"primaryIpv6Prefix\":\"drpazqjkrfmbw\",\"secondaryIpv4Prefix\":\"fcuuugtjigpg\",\"secondaryIpv6Prefix\":\"iawohfmhn\",\"peerASN\":8230475629506248429,\"vlanId\":124401453,\"fabricASN\":6367458302490544841,\"peLoopbackIpAddress\":[\"nhaidzrpvsgloi\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":48038787},{\"maximumRoutes\":385419072},{\"maximumRoutes\":1897243806}]}") + .toObject(OptionBLayer3ConfigurationPatchProperties.class); + Assertions.assertEquals("bejqfbifopfjx", model.primaryIpv4Prefix()); + Assertions.assertEquals("drpazqjkrfmbw", model.primaryIpv6Prefix()); + Assertions.assertEquals("fcuuugtjigpg", model.secondaryIpv4Prefix()); + Assertions.assertEquals("iawohfmhn", model.secondaryIpv6Prefix()); + Assertions.assertEquals(8230475629506248429L, model.peerASN()); + Assertions.assertEquals(124401453, model.vlanId()); + Assertions.assertEquals("nhaidzrpvsgloi", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(48038787, model.prefixLimits().get(0).maximumRoutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OptionBLayer3ConfigurationPatchProperties model = new OptionBLayer3ConfigurationPatchProperties() + .withPrimaryIpv4Prefix("bejqfbifopfjx") + .withPrimaryIpv6Prefix("drpazqjkrfmbw") + .withSecondaryIpv4Prefix("fcuuugtjigpg") + .withSecondaryIpv6Prefix("iawohfmhn") + .withPeerASN(8230475629506248429L) + .withVlanId(124401453) + .withPeLoopbackIpAddress(Arrays.asList("nhaidzrpvsgloi")) + .withBmpConfiguration(new NniBmpPatchProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(48038787), + new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(385419072), + new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(1897243806))); + model = BinaryData.fromObject(model).toObject(OptionBLayer3ConfigurationPatchProperties.class); + Assertions.assertEquals("bejqfbifopfjx", model.primaryIpv4Prefix()); + Assertions.assertEquals("drpazqjkrfmbw", model.primaryIpv6Prefix()); + Assertions.assertEquals("fcuuugtjigpg", model.secondaryIpv4Prefix()); + Assertions.assertEquals("iawohfmhn", model.secondaryIpv6Prefix()); + Assertions.assertEquals(8230475629506248429L, model.peerASN()); + Assertions.assertEquals(124401453, model.vlanId()); + Assertions.assertEquals("nhaidzrpvsgloi", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(48038787, model.prefixLimits().get(0).maximumRoutes()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java index 37902b1d30f2..6021f2c5ff9f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3ConfigurationTests.java @@ -1,41 +1,57 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BmpConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NniBmpProperties; import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OptionBLayer3ConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OptionBLayer3Configuration model = BinaryData.fromString( - "{\"peerASN\":4947142165522560944,\"vlanId\":1587213878,\"fabricASN\":7583012268187491181,\"primaryIpv4Prefix\":\"obguqisqsqk\",\"primaryIpv6Prefix\":\"mioyjpn\",\"secondaryIpv4Prefix\":\"viqcpszp\",\"secondaryIpv6Prefix\":\"vqdvrdmvxyrxdhg\"}") + "{\"primaryIpv4Prefix\":\"dtncmsps\",\"primaryIpv6Prefix\":\"mameub\",\"secondaryIpv4Prefix\":\"iqmlfvhlqcskkqj\",\"secondaryIpv6Prefix\":\"pt\",\"peerASN\":7379253150640970557,\"vlanId\":1599831965,\"fabricASN\":3853242009771860920,\"peLoopbackIpAddress\":[\"drqmrp\"],\"bmpConfiguration\":{\"configurationState\":\"Disabled\"},\"prefixLimits\":[{\"maximumRoutes\":1966621671},{\"maximumRoutes\":1635836069},{\"maximumRoutes\":109176310},{\"maximumRoutes\":977517444}]}") .toObject(OptionBLayer3Configuration.class); - Assertions.assertEquals("obguqisqsqk", model.primaryIpv4Prefix()); - Assertions.assertEquals("mioyjpn", model.primaryIpv6Prefix()); - Assertions.assertEquals("viqcpszp", model.secondaryIpv4Prefix()); - Assertions.assertEquals("vqdvrdmvxyrxdhg", model.secondaryIpv6Prefix()); - Assertions.assertEquals(4947142165522560944L, model.peerAsn()); - Assertions.assertEquals(1587213878, model.vlanId()); + Assertions.assertEquals("dtncmsps", model.primaryIpv4Prefix()); + Assertions.assertEquals("mameub", model.primaryIpv6Prefix()); + Assertions.assertEquals("iqmlfvhlqcskkqj", model.secondaryIpv4Prefix()); + Assertions.assertEquals("pt", model.secondaryIpv6Prefix()); + Assertions.assertEquals(7379253150640970557L, model.peerASN()); + Assertions.assertEquals(1599831965, model.vlanId()); + Assertions.assertEquals("drqmrp", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(1966621671, model.prefixLimits().get(0).maximumRoutes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OptionBLayer3Configuration model = new OptionBLayer3Configuration().withPrimaryIpv4Prefix("obguqisqsqk") - .withPrimaryIpv6Prefix("mioyjpn") - .withSecondaryIpv4Prefix("viqcpszp") - .withSecondaryIpv6Prefix("vqdvrdmvxyrxdhg") - .withPeerAsn(4947142165522560944L) - .withVlanId(1587213878); + OptionBLayer3Configuration model = new OptionBLayer3Configuration().withPrimaryIpv4Prefix("dtncmsps") + .withPrimaryIpv6Prefix("mameub") + .withSecondaryIpv4Prefix("iqmlfvhlqcskkqj") + .withSecondaryIpv6Prefix("pt") + .withPeerASN(7379253150640970557L) + .withVlanId(1599831965) + .withPeLoopbackIpAddress(Arrays.asList("drqmrp")) + .withBmpConfiguration(new NniBmpProperties().withConfigurationState(BmpConfigurationState.DISABLED)) + .withPrefixLimits(Arrays.asList(new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1966621671), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1635836069), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(109176310), + new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(977517444))); model = BinaryData.fromObject(model).toObject(OptionBLayer3Configuration.class); - Assertions.assertEquals("obguqisqsqk", model.primaryIpv4Prefix()); - Assertions.assertEquals("mioyjpn", model.primaryIpv6Prefix()); - Assertions.assertEquals("viqcpszp", model.secondaryIpv4Prefix()); - Assertions.assertEquals("vqdvrdmvxyrxdhg", model.secondaryIpv6Prefix()); - Assertions.assertEquals(4947142165522560944L, model.peerAsn()); - Assertions.assertEquals(1587213878, model.vlanId()); + Assertions.assertEquals("dtncmsps", model.primaryIpv4Prefix()); + Assertions.assertEquals("mameub", model.primaryIpv6Prefix()); + Assertions.assertEquals("iqmlfvhlqcskkqj", model.secondaryIpv4Prefix()); + Assertions.assertEquals("pt", model.secondaryIpv6Prefix()); + Assertions.assertEquals(7379253150640970557L, model.peerASN()); + Assertions.assertEquals(1599831965, model.vlanId()); + Assertions.assertEquals("drqmrp", model.peLoopbackIpAddress().get(0)); + Assertions.assertEquals(BmpConfigurationState.DISABLED, model.bmpConfiguration().configurationState()); + Assertions.assertEquals(1966621671, model.prefixLimits().get(0).maximumRoutes()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..841f43e14868 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class OptionBLayer3PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OptionBLayer3PrefixLimitPatchProperties model = BinaryData.fromString("{\"maximumRoutes\":2035745663}") + .toObject(OptionBLayer3PrefixLimitPatchProperties.class); + Assertions.assertEquals(2035745663, model.maximumRoutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OptionBLayer3PrefixLimitPatchProperties model + = new OptionBLayer3PrefixLimitPatchProperties().withMaximumRoutes(2035745663); + model = BinaryData.fromObject(model).toObject(OptionBLayer3PrefixLimitPatchProperties.class); + Assertions.assertEquals(2035745663, model.maximumRoutes()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..d0de80653643 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBLayer3PrefixLimitPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties; +import org.junit.jupiter.api.Assertions; + +public final class OptionBLayer3PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OptionBLayer3PrefixLimitProperties model = BinaryData.fromString("{\"maximumRoutes\":1297064297}") + .toObject(OptionBLayer3PrefixLimitProperties.class); + Assertions.assertEquals(1297064297, model.maximumRoutes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OptionBLayer3PrefixLimitProperties model + = new OptionBLayer3PrefixLimitProperties().withMaximumRoutes(1297064297); + model = BinaryData.fromObject(model).toObject(OptionBLayer3PrefixLimitProperties.class); + Assertions.assertEquals(1297064297, model.maximumRoutes()); + } +} 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 7fe342a18da0..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.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.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; -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\":[\"bcakzn\",\"okh\",\"itwhrjsdmmazdnck\",\"dbjp\"],\"exportRouteTargets\":[\"zqpxzbawkikcd\",\"fhbssdpjeyoqxded\",\"cfiwhagxsurejq\",\"shzz\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"lcxiqqzjko\"],\"importIpv6RouteTargets\":[\"pnamgl\",\"ouigdmfivjqte\",\"dqqigdydkghpc\"],\"exportIpv4RouteTargets\":[\"qirvtk\",\"yhhmvfxl\",\"pjajodmkrrwe\"],\"exportIpv6RouteTargets\":[\"vqokql\",\"jqgir\"]}}") - .toObject(OptionBProperties.class); - Assertions.assertEquals("bcakzn", model.importRouteTargets().get(0)); - Assertions.assertEquals("zqpxzbawkikcd", model.exportRouteTargets().get(0)); - Assertions.assertEquals("lcxiqqzjko", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("pnamgl", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("qirvtk", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vqokql", model.routeTargets().exportIpv6RouteTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionBProperties model - = new OptionBProperties().withImportRouteTargets(Arrays.asList("bcakzn", "okh", "itwhrjsdmmazdnck", "dbjp")) - .withExportRouteTargets(Arrays.asList("zqpxzbawkikcd", "fhbssdpjeyoqxded", "cfiwhagxsurejq", "shzz")) - .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("lcxiqqzjko")) - .withImportIpv6RouteTargets(Arrays.asList("pnamgl", "ouigdmfivjqte", "dqqigdydkghpc")) - .withExportIpv4RouteTargets(Arrays.asList("qirvtk", "yhhmvfxl", "pjajodmkrrwe")) - .withExportIpv6RouteTargets(Arrays.asList("vqokql", "jqgir"))); - model = BinaryData.fromObject(model).toObject(OptionBProperties.class); - Assertions.assertEquals("bcakzn", model.importRouteTargets().get(0)); - Assertions.assertEquals("zqpxzbawkikcd", model.exportRouteTargets().get(0)); - Assertions.assertEquals("lcxiqqzjko", model.routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("pnamgl", model.routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("qirvtk", model.routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("vqokql", model.routeTargets().exportIpv6RouteTargets().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java new file mode 100644 index 000000000000..28bf771c1c05 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PoliceRateConfigurationPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BitRate; +import com.azure.resourcemanager.managednetworkfabric.models.BitRateUnit; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSize; +import com.azure.resourcemanager.managednetworkfabric.models.BurstSizeUnit; +import com.azure.resourcemanager.managednetworkfabric.models.PoliceRateConfigurationProperties; +import org.junit.jupiter.api.Assertions; + +public final class PoliceRateConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoliceRateConfigurationProperties model = BinaryData.fromString( + "{\"bitRate\":{\"rate\":4362170512677950731,\"unit\":\"Mbps\"},\"burstSize\":{\"size\":6394819715524557964,\"unit\":\"GBytes\"}}") + .toObject(PoliceRateConfigurationProperties.class); + Assertions.assertEquals(4362170512677950731L, model.bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.bitRate().unit()); + Assertions.assertEquals(6394819715524557964L, model.burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, model.burstSize().unit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoliceRateConfigurationProperties model = new PoliceRateConfigurationProperties() + .withBitRate(new BitRate().withRate(4362170512677950731L).withUnit(BitRateUnit.MBPS)) + .withBurstSize(new BurstSize().withSize(6394819715524557964L).withUnit(BurstSizeUnit.GBYTES)); + model = BinaryData.fromObject(model).toObject(PoliceRateConfigurationProperties.class); + Assertions.assertEquals(4362170512677950731L, model.bitRate().rate()); + Assertions.assertEquals(BitRateUnit.MBPS, model.bitRate().unit()); + Assertions.assertEquals(6394819715524557964L, model.burstSize().size()); + Assertions.assertEquals(BurstSizeUnit.GBYTES, model.burstSize().unit()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java new file mode 100644 index 000000000000..9a64fcd9428c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionPatchTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortConditionPatch; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PortConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PortConditionPatch model = BinaryData.fromString( + "{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"SCTP\",\"ports\":[\"pdwzjggkwdep\"],\"portGroupNames\":[\"iayfiqiidxco\",\"jvudyhgtrttcuayi\",\"ylnkmmxzifbqg\",\"exo\"]}") + .toObject(PortConditionPatch.class); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.layer4Protocol()); + Assertions.assertEquals("pdwzjggkwdep", model.ports().get(0)); + Assertions.assertEquals("iayfiqiidxco", model.portGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PortConditionPatch model = new PortConditionPatch().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.SCTP) + .withPorts(Arrays.asList("pdwzjggkwdep")) + .withPortGroupNames(Arrays.asList("iayfiqiidxco", "jvudyhgtrttcuayi", "ylnkmmxzifbqg", "exo")); + model = BinaryData.fromObject(model).toObject(PortConditionPatch.class); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.SCTP, model.layer4Protocol()); + Assertions.assertEquals("pdwzjggkwdep", model.ports().get(0)); + Assertions.assertEquals("iayfiqiidxco", model.portGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java index 810afcb0400a..8e8b22cb362b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -15,24 +15,24 @@ public final class PortConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PortCondition model = BinaryData.fromString( - "{\"portType\":\"DestinationPort\",\"layer4Protocol\":\"UDP\",\"ports\":[\"xitmmqtgqqq\",\"hrnxrxc\",\"juisavokqdzf\",\"azivjlfrqttbajl\"],\"portGroupNames\":[\"nwxyiop\",\"dkqqfkuvscxkd\"]}") + "{\"portType\":\"Bidirectional\",\"layer4Protocol\":\"TCP\",\"ports\":[\"ortclnhbjcyuzly\",\"qs\",\"ibvylkv\"],\"portGroupNames\":[\"afnwqh\"]}") .toObject(PortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("xitmmqtgqqq", model.ports().get(0)); - Assertions.assertEquals("nwxyiop", model.portGroupNames().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("ortclnhbjcyuzly", model.ports().get(0)); + Assertions.assertEquals("afnwqh", model.portGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PortCondition model = new PortCondition().withPortType(PortType.DESTINATION_PORT) - .withLayer4Protocol(Layer4Protocol.UDP) - .withPorts(Arrays.asList("xitmmqtgqqq", "hrnxrxc", "juisavokqdzf", "azivjlfrqttbajl")) - .withPortGroupNames(Arrays.asList("nwxyiop", "dkqqfkuvscxkd")); + PortCondition model = new PortCondition().withPortType(PortType.BIDIRECTIONAL) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("ortclnhbjcyuzly", "qs", "ibvylkv")) + .withPortGroupNames(Arrays.asList("afnwqh")); model = BinaryData.fromObject(model).toObject(PortCondition.class); - Assertions.assertEquals(PortType.DESTINATION_PORT, model.portType()); - Assertions.assertEquals(Layer4Protocol.UDP, model.layer4Protocol()); - Assertions.assertEquals("xitmmqtgqqq", model.ports().get(0)); - Assertions.assertEquals("nwxyiop", model.portGroupNames().get(0)); + Assertions.assertEquals(PortType.BIDIRECTIONAL, model.portType()); + Assertions.assertEquals(Layer4Protocol.TCP, model.layer4Protocol()); + Assertions.assertEquals("ortclnhbjcyuzly", model.ports().get(0)); + Assertions.assertEquals("afnwqh", model.portGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java new file mode 100644 index 000000000000..27f94de7be49 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPatchPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PortGroupPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PortGroupPatchProperties model = BinaryData.fromString( + "{\"name\":\"wslmiiiovgqcg\",\"ports\":[\"gqkctotiowlxte\",\"dptjgwdtgukranb\",\"wphqlkccuzgygqw\",\"hoi\"]}") + .toObject(PortGroupPatchProperties.class); + Assertions.assertEquals("wslmiiiovgqcg", model.name()); + Assertions.assertEquals("gqkctotiowlxte", model.ports().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PortGroupPatchProperties model = new PortGroupPatchProperties().withName("wslmiiiovgqcg") + .withPorts(Arrays.asList("gqkctotiowlxte", "dptjgwdtgukranb", "wphqlkccuzgygqw", "hoi")); + model = BinaryData.fromObject(model).toObject(PortGroupPatchProperties.class); + Assertions.assertEquals("wslmiiiovgqcg", model.name()); + Assertions.assertEquals("gqkctotiowlxte", model.ports().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java index 482eb5cdc565..5be706efc0cc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PortGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,19 @@ public final class PortGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PortGroupProperties model = BinaryData.fromString("{\"name\":\"yuvvfonkp\",\"ports\":[\"yik\",\"y\"]}") - .toObject(PortGroupProperties.class); - Assertions.assertEquals("yuvvfonkp", model.name()); - Assertions.assertEquals("yik", model.ports().get(0)); + PortGroupProperties model + = BinaryData.fromString("{\"name\":\"ukuv\",\"ports\":[\"swsmys\",\"uluqypfc\",\"lerchpq\"]}") + .toObject(PortGroupProperties.class); + Assertions.assertEquals("ukuv", model.name()); + Assertions.assertEquals("swsmys", model.ports().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PortGroupProperties model - = new PortGroupProperties().withName("yuvvfonkp").withPorts(Arrays.asList("yik", "y")); + = new PortGroupProperties().withName("ukuv").withPorts(Arrays.asList("swsmys", "uluqypfc", "lerchpq")); model = BinaryData.fromObject(model).toObject(PortGroupProperties.class); - Assertions.assertEquals("yuvvfonkp", model.name()); - Assertions.assertEquals("yik", model.ports().get(0)); + Assertions.assertEquals("ukuv", model.name()); + Assertions.assertEquals("swsmys", model.ports().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..9af8d8043745 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPatchPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrefixLimitPatchProperties model = BinaryData + .fromString("{\"maximumRoutes\":2136648935,\"threshold\":739674460,\"idleTimeExpiry\":87270931}") + .toObject(PrefixLimitPatchProperties.class); + Assertions.assertEquals(2136648935, model.maximumRoutes()); + Assertions.assertEquals(739674460, model.threshold()); + Assertions.assertEquals(87270931, model.idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrefixLimitPatchProperties model = new PrefixLimitPatchProperties().withMaximumRoutes(2136648935) + .withThreshold(739674460) + .withIdleTimeExpiry(87270931); + model = BinaryData.fromObject(model).toObject(PrefixLimitPatchProperties.class); + Assertions.assertEquals(2136648935, model.maximumRoutes()); + Assertions.assertEquals(739674460, model.threshold()); + Assertions.assertEquals(87270931, model.idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..7faa1a2fa618 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/PrefixLimitPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixLimitProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrefixLimitProperties model = BinaryData + .fromString("{\"maximumRoutes\":561158106,\"threshold\":1446277117,\"idleTimeExpiry\":1698760010}") + .toObject(PrefixLimitProperties.class); + Assertions.assertEquals(561158106, model.maximumRoutes()); + Assertions.assertEquals(1446277117, model.threshold()); + Assertions.assertEquals(1698760010, model.idleTimeExpiry()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrefixLimitProperties model = new PrefixLimitProperties().withMaximumRoutes(561158106) + .withThreshold(1446277117) + .withIdleTimeExpiry(1698760010); + model = BinaryData.fromObject(model).toObject(PrefixLimitProperties.class); + Assertions.assertEquals(561158106, model.maximumRoutes()); + Assertions.assertEquals(1446277117, model.threshold()); + Assertions.assertEquals(1698760010, model.idleTimeExpiry()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java index 974e3cd80d29..9ff5dcc3b014 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RebootPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; 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 index 46307a090bef..d766c3856ec2 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; @@ -17,6 +17,7 @@ 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.RoutePolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -33,89 +34,57 @@ public final class RoutePoliciesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"qeonyizqdwvg\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"RMA\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":2421775876641234866,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"rfuzedud\",\"ipExtendedCommunityIds\":[\"dv\",\"a\"],\"ipCommunityIds\":[\"jvumimbcf\",\"hycluounvrqvxno\"]},\"action\":{\"localPreference\":4590405392307652745,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"ezeewcrblksdd\"},{\"sequenceNumber\":4132120253192181163,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"hoezjikw\",\"ipExtendedCommunityIds\":[\"rsoxtxuuypdcgx\",\"kbwv\"],\"ipCommunityIds\":[\"bzcmpbymsgcl\"]},\"action\":{\"localPreference\":2915333026435586464,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"fmjckct\"}],\"annotation\":\"hs\"},\"location\":\"iumktslmeyon\",\"tags\":{\"rgwtynqbhhfhi\":\"evmaw\",\"yihpsrjzpvojwjan\":\"wwkhiyubykxzcvut\"},\"id\":\"olqqpa\",\"name\":\"zpzmojupqlus\",\"type\":\"kzdnotgyowis\"}"; + = "{\"properties\":{\"annotation\":\"tjjfecxv\",\"defaultAction\":\"Deny\",\"statements\":[{\"annotation\":\"vjvvxpsn\",\"sequenceNumber\":4588433028681402133,\"condition\":{\"ipCommunityIds\":[\"mhjmqf\",\"qwqcxyiqppacj\"],\"ipExtendedCommunityIds\":[\"llacylbtkxeij\",\"gnlaaxt\",\"exaug\"],\"type\":\"And\",\"ipPrefixId\":\"jezr\"},\"action\":{\"localPreference\":313258780501286741,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"tenhnq\",\"sequenceNumber\":3083810413128855211,\"condition\":{\"ipCommunityIds\":[\"behhe\",\"otqorrvwlce\",\"jlyugzl\",\"gjir\"],\"ipExtendedCommunityIds\":[\"rsyfdsgrtke\",\"imrupgevjma\"],\"type\":\"Or\",\"ipPrefixId\":\"vjoklb\"},\"action\":{\"localPreference\":576421373812041859,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}}],\"networkFabricId\":\"xfjlpkocrexfmqf\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"uvwlfzjrjgla\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Disabled\"},\"location\":\"slwujkeyt\",\"tags\":{\"tqt\":\"rjnnbmods\"},\"id\":\"atujphqvfxvv\",\"name\":\"gwghxoxwpiqkkm\",\"type\":\"fnwdrmzwmtsmeac\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RoutePolicy response - = manager.routePolicies() - .define("uiuvkcnqonj") - .withRegion("z") - .withExistingResourceGroup("vpdjytme") - .withNetworkFabricId("b") - .withTags(mapOf("cmeyxypxlzcr", "l", "vetpdezebvtkg", "mfvjz", "cxuounzzckogcv", "jnadfhheilnh")) - .withAddressFamilyType(AddressFamilyType.IPV6) - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements( - Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("sdqnqqzqdvg") - .withSequenceNumber(2097893229649830526L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds( - Arrays.asList("ttqils", "abqtjchxsfwe", "leiyemjips", "ekdqqwcspfhrndq")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("yejsgbpjjnblbkak") - .withIpExtendedCommunityIds(Arrays.asList("wbddnddctkjcqhx"))) - .withAction(new StatementActionProperties().withLocalPreference(5478096301196384502L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())), - new RoutePolicyStatementProperties().withAnnotation("wjfkmnjtkswmyjd") - .withSequenceNumber(1967239015461212501L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("kctpaiw", "rjwyxduwimwnuv")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("oynya") - .withIpExtendedCommunityIds(Arrays.asList("ph", "uzmv", "iltl"))) - .withAction(new StatementActionProperties().withLocalPreference(7266690499667397309L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())), - new RoutePolicyStatementProperties().withAnnotation("fwugo") - .withSequenceNumber(4942587917021188500L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("ctnpp")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("jtmpdkcbpkiguv") - .withIpExtendedCommunityIds(Arrays.asList("tkcen", "wg"))) - .withAction(new StatementActionProperties() - .withLocalPreference(6704049784410967385L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())), - new RoutePolicyStatementProperties().withAnnotation("nkrarjii") - .withSequenceNumber(1443615554749895796L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("jxocmmv", "amorhkneu")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("nvzmvnbck") - .withIpExtendedCommunityIds( - Arrays.asList("xuuksvfsukpkieal", "ckpnnenrcez", "or", "zwk"))) - .withAction(new StatementActionProperties().withLocalPreference(4056003480349765622L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())))) - .withAnnotation("bychcwhl") - .create(); + RoutePolicy response = manager.routePolicies() + .define("wzsipkhqh") + .withRegion("okkkgiecjyf") + .withExistingResourceGroup("lwfqrfy") + .withProperties(new RoutePolicyProperties().withAnnotation("tcztmqdkhohspkgx") + .withDefaultAction(CommunityActionTypes.DENY) + .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("a") + .withSequenceNumber(7731839957866013454L) + .withCondition(new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("xxxqfrntzbhmx", "pxfauvgtoino")) + .withIpExtendedCommunityIds( + Arrays.asList("yvvfapfbmrwhkn", "fcooptmdspdd", "gupiosibg", "laxuybxjwny")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("rttnri")) + .withAction(new StatementActionProperties().withLocalPreference(3705898237117184985L) + .withActionType(RoutePolicyActionType.DENY) + .withIpCommunityProperties(new ActionIpCommunityProperties()) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())))) + .withNetworkFabricId("sjpkign") + .withAddressFamilyType(AddressFamilyType.IPV4)) + .withTags(mapOf("b", "eftzetjclaqx", "agpdsuyywnaqgo", "q", "zwlhufsgc", "xuhhvgddfzcny")) + .create(); - Assertions.assertEquals("iumktslmeyon", response.location()); - Assertions.assertEquals("evmaw", response.tags().get("rgwtynqbhhfhi")); - Assertions.assertEquals("qeonyizqdwvg", response.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, response.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.defaultAction()); - Assertions.assertEquals("ezeewcrblksdd", response.statements().get(0).annotation()); - Assertions.assertEquals(2421775876641234866L, response.statements().get(0).sequenceNumber()); - Assertions.assertEquals("jvumimbcf", response.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, response.statements().get(0).condition().type()); - Assertions.assertEquals("rfuzedud", response.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("dv", response.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(4590405392307652745L, response.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, response.statements().get(0).action().actionType()); - Assertions.assertEquals("hs", response.annotation()); + Assertions.assertEquals("slwujkeyt", response.location()); + Assertions.assertEquals("rjnnbmods", response.tags().get("tqt")); + Assertions.assertEquals("tjjfecxv", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.properties().defaultAction()); + Assertions.assertEquals("vjvvxpsn", response.properties().statements().get(0).annotation()); + Assertions.assertEquals(4588433028681402133L, response.properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("mhjmqf", + response.properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("llacylbtkxeij", + response.properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, + response.properties().statements().get(0).condition().type()); + Assertions.assertEquals("jezr", response.properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(313258780501286741L, + response.properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, + response.properties().statements().get(0).action().actionType()); + Assertions.assertEquals("xfjlpkocrexfmqf", response.properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, response.properties().addressFamilyType()); } // Use "Map.of" if available 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 index eb2f118b4ebf..5a7a98641030 100644 --- 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; @@ -25,32 +25,37 @@ public final class RoutePoliciesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"networkFabricId\":\"in\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Disabled\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":335872430827651416,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"qtkrjucazwedm\",\"ipExtendedCommunityIds\":[\"lx\",\"cem\",\"oanudvqannenxgo\"],\"ipCommunityIds\":[\"gblqyf\",\"zbfpqifsgzfgxw\",\"xjiqpdsohw\"]},\"action\":{\"localPreference\":7185211741376169644,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"jxhpppnksqiwlmeg\"}],\"annotation\":\"oseohoygowdzizzu\"},\"location\":\"orcppqvovsir\",\"tags\":{\"e\":\"epiplpexhhjjat\",\"c\":\"zbiroxamnv\",\"nsihdzxeufj\":\"jpba\"},\"id\":\"b\",\"name\":\"zm\",\"type\":\"xdmppib\"}"; + = "{\"properties\":{\"annotation\":\"wip\",\"defaultAction\":\"Deny\",\"statements\":[{\"annotation\":\"pezzyrpdxyg\",\"sequenceNumber\":8792015391308639654,\"condition\":{\"ipCommunityIds\":[\"emezkpdmmow\"],\"ipExtendedCommunityIds\":[\"rqe\",\"rjopotefekfxmgj\",\"wwidnrds\",\"kvhuiadyh\"],\"type\":\"Or\",\"ipPrefixId\":\"ypgapfdwhwbead\"},\"action\":{\"localPreference\":6812371769339919856,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"kflnjaysrjeevm\",\"sequenceNumber\":6696592669798308474,\"condition\":{\"ipCommunityIds\":[\"hbzetss\"],\"ipExtendedCommunityIds\":[\"exbotbrep\",\"frli\",\"eocyarvs\"],\"type\":\"Or\",\"ipPrefixId\":\"scootfsgilwis\"},\"action\":{\"localPreference\":4010213913447340159,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"strtrfv\",\"sequenceNumber\":8622532176208915801,\"condition\":{\"ipCommunityIds\":[\"csh\",\"pcjqtuzbir\",\"rvzhfjqpxydpamc\"],\"ipExtendedCommunityIds\":[\"wrhccdgunsjs\"],\"type\":\"And\",\"ipPrefixId\":\"jsgkouenpgkxyr\"},\"action\":{\"localPreference\":97548719110522950,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}}],\"networkFabricId\":\"ek\",\"addressFamilyType\":\"IPv4\",\"lastOperation\":{\"details\":\"lqvuwsqmwqsg\"},\"configurationState\":\"DeferredControl\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\"},\"location\":\"gxvrpki\",\"tags\":{\"psv\":\"kgdsursumbcirkbk\",\"lrufvmgblbq\":\"xshxumuuybl\"},\"id\":\"ls\",\"name\":\"mxyjqhwsojnbbbgv\",\"type\":\"owyzx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RoutePolicy response = manager.routePolicies() - .getByResourceGroupWithResponse("rinvfcds", "j", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("xtkghrrxau", "hdkhkizyxoyxnhu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("orcppqvovsir", response.location()); - Assertions.assertEquals("epiplpexhhjjat", response.tags().get("e")); - Assertions.assertEquals("in", response.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, response.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, response.defaultAction()); - Assertions.assertEquals("jxhpppnksqiwlmeg", response.statements().get(0).annotation()); - Assertions.assertEquals(335872430827651416L, response.statements().get(0).sequenceNumber()); - Assertions.assertEquals("gblqyf", response.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, response.statements().get(0).condition().type()); - Assertions.assertEquals("qtkrjucazwedm", response.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("lx", response.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(7185211741376169644L, response.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, response.statements().get(0).action().actionType()); - Assertions.assertEquals("oseohoygowdzizzu", response.annotation()); + Assertions.assertEquals("gxvrpki", response.location()); + Assertions.assertEquals("kgdsursumbcirkbk", response.tags().get("psv")); + Assertions.assertEquals("wip", response.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.properties().defaultAction()); + Assertions.assertEquals("pezzyrpdxyg", response.properties().statements().get(0).annotation()); + Assertions.assertEquals(8792015391308639654L, response.properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("emezkpdmmow", + response.properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("rqe", + response.properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, + response.properties().statements().get(0).condition().type()); + Assertions.assertEquals("ypgapfdwhwbead", response.properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(6812371769339919856L, + response.properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, + response.properties().statements().get(0).action().actionType()); + Assertions.assertEquals("ek", response.properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, response.properties().addressFamilyType()); } } 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 index 687e85297c3a..49b15c86b37a 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; @@ -26,36 +26,39 @@ public final class RoutePoliciesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"wplx\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":95459084041814942,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"xls\",\"ipExtendedCommunityIds\":[\"kjrqdt\",\"kcaocjuuxqnki\",\"wmrwc\",\"ynjcvewl\"],\"ipCommunityIds\":[\"naktjopiglah\",\"eqjchhrrx\",\"cztrqnuahh\"]},\"action\":{\"localPreference\":4040197137610560802,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"ujpshisziv\"},{\"sequenceNumber\":2369172499266349672,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"wzjorv\",\"ipExtendedCommunityIds\":[\"kkelesbjck\"],\"ipCommunityIds\":[\"ybrlwdm\",\"sdfslaektn\"]},\"action\":{\"localPreference\":8543860576467248968,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"pqumexnpoaeruy\"}],\"annotation\":\"hltwlzlm\"},\"location\":\"prlcgqewm\",\"tags\":{\"papepwpbnjckow\":\"hqlybmkmxusm\"},\"id\":\"uniu\",\"name\":\"ysvnddllbwnmvh\",\"type\":\"zypmmyr\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"uchotdztqhq\",\"defaultAction\":\"Deny\",\"statements\":[{\"annotation\":\"ermawwlnsdaz\",\"sequenceNumber\":1941435429151624717,\"condition\":{\"ipCommunityIds\":[\"otwfu\",\"thisxzhik\",\"dfszxbups\"],\"ipExtendedCommunityIds\":[\"jpgxcgqkhy\"],\"type\":\"Or\",\"ipPrefixId\":\"wkr\"},\"action\":{\"localPreference\":4560784714584352747,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"cwl\",\"sequenceNumber\":7003346322442441621,\"condition\":{\"ipCommunityIds\":[\"bomjby\",\"sprkbzraljwfncs\",\"aylcpgzmx\",\"gppqajdm\"],\"ipExtendedCommunityIds\":[\"ntqqguhvnwr\",\"iminetbzfwfuxdt\"],\"type\":\"And\",\"ipPrefixId\":\"qkedlclxxquyff\"},\"action\":{\"localPreference\":820065888736689553,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"qxac\",\"sequenceNumber\":3099415738266704991,\"condition\":{\"ipCommunityIds\":[\"zzhdjbyfdfu\"],\"ipExtendedCommunityIds\":[\"hpyylekubiwv\",\"vzznyjqbwxpwjvf\"],\"type\":\"Or\",\"ipPrefixId\":\"q\"},\"action\":{\"localPreference\":7238958718819477559,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"jupjbdqmnki\",\"sequenceNumber\":6229275916839311871,\"condition\":{\"ipCommunityIds\":[\"hupx\",\"ttnurkm\",\"rqza\"],\"ipExtendedCommunityIds\":[\"om\",\"vqvvtjwdlduvimg\"],\"type\":\"Or\",\"ipPrefixId\":\"rmxoxtap\"},\"action\":{\"localPreference\":3480386970149675774,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}}],\"networkFabricId\":\"jt\",\"addressFamilyType\":\"IPv4\",\"lastOperation\":{\"details\":\"tavcipydnujgblsk\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"RMA\"},\"location\":\"cajxdrgx\",\"tags\":{\"pzrycchqz\":\"pzslmfr\",\"dzgszjhekbmd\":\"fge\"},\"id\":\"ch\",\"name\":\"ojsrhgpitye\",\"type\":\"vwysbme\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.routePolicies().listByResourceGroup("wqjcphofyoqfvm", com.azure.core.util.Context.NONE); + = manager.routePolicies().listByResourceGroup("huhmldhnzsckf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("prlcgqewm", response.iterator().next().location()); - Assertions.assertEquals("hqlybmkmxusm", response.iterator().next().tags().get("papepwpbnjckow")); - Assertions.assertEquals("wplx", response.iterator().next().networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().defaultAction()); - Assertions.assertEquals("ujpshisziv", response.iterator().next().statements().get(0).annotation()); - Assertions.assertEquals(95459084041814942L, response.iterator().next().statements().get(0).sequenceNumber()); - Assertions.assertEquals("naktjopiglah", - response.iterator().next().statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, - response.iterator().next().statements().get(0).condition().type()); - Assertions.assertEquals("xls", response.iterator().next().statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kjrqdt", - response.iterator().next().statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(4040197137610560802L, - response.iterator().next().statements().get(0).action().localPreference()); + Assertions.assertEquals("cajxdrgx", response.iterator().next().location()); + Assertions.assertEquals("pzslmfr", response.iterator().next().tags().get("pzrycchqz")); + Assertions.assertEquals("uchotdztqhq", response.iterator().next().properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, response.iterator().next().properties().defaultAction()); + Assertions.assertEquals("ermawwlnsdaz", + response.iterator().next().properties().statements().get(0).annotation()); + Assertions.assertEquals(1941435429151624717L, + response.iterator().next().properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("otwfu", + response.iterator().next().properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("jpgxcgqkhy", + response.iterator().next().properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, + response.iterator().next().properties().statements().get(0).condition().type()); + Assertions.assertEquals("wkr", + response.iterator().next().properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(4560784714584352747L, + response.iterator().next().properties().statements().get(0).action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.PERMIT, - response.iterator().next().statements().get(0).action().actionType()); - Assertions.assertEquals("hltwlzlm", response.iterator().next().annotation()); + response.iterator().next().properties().statements().get(0).action().actionType()); + Assertions.assertEquals("jt", response.iterator().next().properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().properties().addressFamilyType()); } } 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 index 8d64fd0516d3..14e0ba367469 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; +import com.azure.resourcemanager.managednetworkfabric.FilesharesManager; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; @@ -26,36 +26,37 @@ public final class RoutePoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"networkFabricId\":\"gsdo\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":8892366462938685872,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"lmczcxouaneu\",\"ipExtendedCommunityIds\":[\"qztakov\",\"lvwpvdmtfcstucmi\"],\"ipCommunityIds\":[\"snu\",\"q\",\"sqitiuttkasxjkcl\"]},\"action\":{\"localPreference\":5014050499766158651,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"etbhlbhkijqgcvqe\"},{\"sequenceNumber\":8806210245617066019,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"x\",\"ipExtendedCommunityIds\":[\"uh\",\"izoak\"],\"ipCommunityIds\":[\"yvobevfbmxz\"]},\"action\":{\"localPreference\":8738446998224680215,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"kp\"},{\"sequenceNumber\":5054072910955069059,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"byil\",\"ipExtendedCommunityIds\":[\"b\",\"meuyxhcwu\",\"t\",\"go\"],\"ipCommunityIds\":[\"oji\"]},\"action\":{\"localPreference\":2708035609660166820,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"iplxrifbsb\"},{\"sequenceNumber\":7442335067660473618,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"bbpoijs\",\"ipExtendedCommunityIds\":[\"utjit\"],\"ipCommunityIds\":[\"knarscxnk\",\"pjinz\",\"sxrsmvnn\"]},\"action\":{\"localPreference\":5504107041706044506,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"zwwqchxow\"}],\"annotation\":\"vuxqactoqqehnqi\"},\"location\":\"gnvuolv\",\"tags\":{\"eq\":\"nlbkizebbrwl\"},\"id\":\"isoiqgetzgwywy\",\"name\":\"bwuamo\",\"type\":\"opqqiyjrehe\"}]}"; + = "{\"value\":[{\"properties\":{\"annotation\":\"g\",\"defaultAction\":\"Permit\",\"statements\":[{\"annotation\":\"hbkup\",\"sequenceNumber\":8459516089588082748,\"condition\":{\"ipCommunityIds\":[\"ftvyzuyqzjfvb\",\"yyjvzlscyz\",\"vsxmyzss\",\"bs\"],\"ipExtendedCommunityIds\":[\"eixazebmmjaigax\",\"qiparctshe\",\"gtdvhokx\",\"fawhoosrsol\"],\"type\":\"Or\",\"ipPrefixId\":\"foej\"},\"action\":{\"localPreference\":1545884777511248120,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"lnudif\",\"sequenceNumber\":8782757251838021189,\"condition\":{\"ipCommunityIds\":[\"orsdvuirqfk\",\"jllfgmdoaihl\"],\"ipExtendedCommunityIds\":[\"qcivmirybwgac\",\"vwkynemazgtbynx\"],\"type\":\"Or\",\"ipPrefixId\":\"we\"},\"action\":{\"localPreference\":2293588253798003084,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"uzxxkojjphbo\",\"sequenceNumber\":4972464433517856113,\"condition\":{\"ipCommunityIds\":[\"vwnpcxd\"],\"ipExtendedCommunityIds\":[\"vparyub\",\"yhmlp\"],\"type\":\"And\",\"ipPrefixId\":\"otu\"},\"action\":{\"localPreference\":6379737696049419623,\"actionType\":\"Deny\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}},{\"annotation\":\"mqz\",\"sequenceNumber\":574326321228160534,\"condition\":{\"ipCommunityIds\":[\"mzdnvno\",\"klgrenuqsgertxic\",\"mgsncbbdokp\",\"aedbsl\"],\"ipExtendedCommunityIds\":[\"npxswmccyk\"],\"type\":\"And\",\"ipPrefixId\":\"a\"},\"action\":{\"localPreference\":1573491036355787203,\"actionType\":\"Continue\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}}}],\"networkFabricId\":\"fdchboa\",\"addressFamilyType\":\"IPv4\",\"lastOperation\":{\"details\":\"wesetutqjsojwoi\"},\"configurationState\":\"PendingCommit\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"MAT\"},\"location\":\"zcmagvsljkaar\",\"tags\":{\"gvygmtywivbuit\":\"xwqhzsxg\",\"wbhzsdud\":\"edjnklvbrsxy\",\"xhgdns\":\"itlqxpsnn\"},\"id\":\"xyl\",\"name\":\"dbg\",\"type\":\"icjkq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ManagedNetworkFabricManager manager = ManagedNetworkFabricManager.configure() + FilesharesManager manager = FilesharesManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.routePolicies().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("gnvuolv", response.iterator().next().location()); - Assertions.assertEquals("nlbkizebbrwl", response.iterator().next().tags().get("eq")); - Assertions.assertEquals("gsdo", response.iterator().next().networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().defaultAction()); - Assertions.assertEquals("etbhlbhkijqgcvqe", response.iterator().next().statements().get(0).annotation()); - Assertions.assertEquals(8892366462938685872L, response.iterator().next().statements().get(0).sequenceNumber()); - Assertions.assertEquals("snu", - response.iterator().next().statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, - response.iterator().next().statements().get(0).condition().type()); - Assertions.assertEquals("lmczcxouaneu", - response.iterator().next().statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("qztakov", - response.iterator().next().statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(5014050499766158651L, - response.iterator().next().statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, - response.iterator().next().statements().get(0).action().actionType()); - Assertions.assertEquals("vuxqactoqqehnqi", response.iterator().next().annotation()); + Assertions.assertEquals("zcmagvsljkaar", response.iterator().next().location()); + Assertions.assertEquals("xwqhzsxg", response.iterator().next().tags().get("gvygmtywivbuit")); + Assertions.assertEquals("g", response.iterator().next().properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().properties().defaultAction()); + Assertions.assertEquals("hbkup", response.iterator().next().properties().statements().get(0).annotation()); + Assertions.assertEquals(8459516089588082748L, + response.iterator().next().properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("ftvyzuyqzjfvb", + response.iterator().next().properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("eixazebmmjaigax", + response.iterator().next().properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, + response.iterator().next().properties().statements().get(0).condition().type()); + Assertions.assertEquals("foej", + response.iterator().next().properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(1545884777511248120L, + response.iterator().next().properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, + response.iterator().next().properties().statements().get(0).action().actionType()); + Assertions.assertEquals("fdchboa", response.iterator().next().properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, response.iterator().next().properties().addressFamilyType()); } } 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 f325b4803da6..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 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.AddressFamilyType; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePoliciesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; -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; -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\":{\"networkFabricId\":\"kmpwyvlhnh\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"RMA\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":3554896702556402412,\"condition\":{},\"action\":{\"actionType\":\"Permit\"},\"annotation\":\"giflr\"}],\"annotation\":\"got\"},\"location\":\"zwtoidhbxi\",\"tags\":{\"zhlutjsjzels\":\"p\"},\"id\":\"iemv\",\"name\":\"pmeakosysycv\",\"type\":\"de\"},{\"properties\":{\"networkFabricId\":\"hcbsaipusuo\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Provisioned\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":4239327806826104427,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"sluazz\"},{\"sequenceNumber\":149979462311042814,\"condition\":{},\"action\":{\"actionType\":\"Continue\"},\"annotation\":\"ugpxzeempup\"},{\"sequenceNumber\":7582568444217997281,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"xr\"}],\"annotation\":\"dczmrjgobekx\"},\"location\":\"eowse\",\"tags\":{\"bmseesacuicnvq\":\"drzzbskiwrjsb\"},\"id\":\"qsuivmrfaptndrmm\",\"name\":\"lh\",\"type\":\"k\"},{\"properties\":{\"networkFabricId\":\"xrqkekcdavi\",\"addressFamilyType\":\"IPv6\",\"configurationState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Canceled\",\"administrativeState\":\"Disabled\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":1290612405435899521,\"condition\":{},\"action\":{\"actionType\":\"Deny\"},\"annotation\":\"iuceplbrzgk\"}],\"annotation\":\"rwpqbstweobptsc\"},\"location\":\"ykk\",\"tags\":{\"flsmsbnlyoifg\":\"ayynoyj\",\"cvoevcwfz\":\"fzjqthy\",\"xgbsdzcgcvypj\":\"tkxxlwwo\"},\"id\":\"ubdmg\",\"name\":\"bxehujcqgzwvx\",\"type\":\"iuaoibmjklqrljd\"}],\"nextLink\":\"kylaxrjiqoqovqhg\"}") - .toObject(RoutePoliciesListResult.class); - Assertions.assertEquals("zwtoidhbxi", model.value().get(0).location()); - Assertions.assertEquals("p", model.value().get(0).tags().get("zhlutjsjzels")); - Assertions.assertEquals("kmpwyvlhnh", model.value().get(0).networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, model.value().get(0).addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).defaultAction()); - Assertions.assertEquals("giflr", model.value().get(0).statements().get(0).annotation()); - Assertions.assertEquals(3554896702556402412L, model.value().get(0).statements().get(0).sequenceNumber()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, - model.value().get(0).statements().get(0).action().actionType()); - Assertions.assertEquals("got", model.value().get(0).annotation()); - Assertions.assertEquals("kylaxrjiqoqovqhg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePoliciesListResult model = new RoutePoliciesListResult().withValue(Arrays.asList( - new RoutePolicyInner().withLocation("zwtoidhbxi") - .withTags(mapOf("zhlutjsjzels", "p")) - .withNetworkFabricId("kmpwyvlhnh") - .withAddressFamilyType(AddressFamilyType.IPV6) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("giflr") - .withSequenceNumber(3554896702556402412L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.PERMIT)))) - .withAnnotation("got"), - new RoutePolicyInner().withLocation("eowse") - .withTags(mapOf("bmseesacuicnvq", "drzzbskiwrjsb")) - .withNetworkFabricId("hcbsaipusuo") - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("sluazz") - .withSequenceNumber(4239327806826104427L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.DENY)), - new RoutePolicyStatementProperties().withAnnotation("ugpxzeempup") - .withSequenceNumber(149979462311042814L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.CONTINUE)), - new RoutePolicyStatementProperties().withAnnotation("xr") - .withSequenceNumber(7582568444217997281L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.DENY)))) - .withAnnotation("dczmrjgobekx"), - new RoutePolicyInner().withLocation("ykk") - .withTags(mapOf("flsmsbnlyoifg", "ayynoyj", "cvoevcwfz", "fzjqthy", "xgbsdzcgcvypj", "tkxxlwwo")) - .withNetworkFabricId("xrqkekcdavi") - .withAddressFamilyType(AddressFamilyType.IPV6) - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements(Arrays.asList(new RoutePolicyStatementProperties().withAnnotation("iuceplbrzgk") - .withSequenceNumber(1290612405435899521L) - .withCondition(new StatementConditionProperties()) - .withAction(new StatementActionProperties().withActionType(RoutePolicyActionType.DENY)))) - .withAnnotation("rwpqbstweobptsc"))) - .withNextLink("kylaxrjiqoqovqhg"); - model = BinaryData.fromObject(model).toObject(RoutePoliciesListResult.class); - Assertions.assertEquals("zwtoidhbxi", model.value().get(0).location()); - Assertions.assertEquals("p", model.value().get(0).tags().get("zhlutjsjzels")); - Assertions.assertEquals("kmpwyvlhnh", model.value().get(0).networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV6, model.value().get(0).addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).defaultAction()); - Assertions.assertEquals("giflr", model.value().get(0).statements().get(0).annotation()); - Assertions.assertEquals(3554896702556402412L, model.value().get(0).statements().get(0).sequenceNumber()); - Assertions.assertEquals(RoutePolicyActionType.PERMIT, - model.value().get(0).statements().get(0).action().actionType()); - Assertions.assertEquals("got", model.value().get(0).annotation()); - Assertions.assertEquals("kylaxrjiqoqovqhg", model.nextLink()); - } - - // Use "Map.of" if available - @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 index 76ac8a4b9545..475698c7ea92 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,6 +14,7 @@ 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.RoutePolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -26,61 +27,42 @@ public final class RoutePolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyInner model = BinaryData.fromString( - "{\"properties\":{\"networkFabricId\":\"jf\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Deleting\",\"administrativeState\":\"Enabled\",\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":4448738498634238178,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"ztirjvqxvwkiocxo\",\"ipExtendedCommunityIds\":[\"wbuocqflmnlrlqx\"],\"ipCommunityIds\":[\"ate\",\"yozdbc\",\"qnl\"]},\"action\":{\"localPreference\":2247099392682138883,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"hjjidodnvltc\"},{\"sequenceNumber\":9175709040224729929,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"wkupbbnhic\",\"ipExtendedCommunityIds\":[\"zhrcqdfwbif\",\"nhlsforsimtfcqm\",\"ynb\",\"pelpfijtezgxmpe\"],\"ipCommunityIds\":[\"madlerzinfuivcz\",\"tllxsw\",\"dapsmir\"]},\"action\":{\"localPreference\":2955918462156050023,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"vdsp\"},{\"sequenceNumber\":2451432701721525303,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"wtblgmkokqoi\",\"ipExtendedCommunityIds\":[\"efwlnm\",\"kffcnuestbsl\"],\"ipCommunityIds\":[\"dnccotelik\",\"iytehhxtzxqdwbym\"]},\"action\":{\"localPreference\":1174159606945652119,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"s\"},{\"sequenceNumber\":804072634972443064,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"xdbyhq\",\"ipExtendedCommunityIds\":[\"vimmwc\",\"ozvlfymt\"],\"ipCommunityIds\":[\"v\",\"upqtzckj\"]},\"action\":{\"localPreference\":5472309175848968118,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"xncqz\"}],\"annotation\":\"gt\"},\"location\":\"gdobimor\",\"tags\":{\"bmxqfgvz\":\"xosgihtrxue\",\"osecxlngouf\":\"jqswshesgcs\"},\"id\":\"izp\",\"name\":\"mfxzspf\",\"type\":\"vsl\"}") + "{\"properties\":{\"annotation\":\"tvvqtmvifgcvsim\",\"defaultAction\":\"Deny\",\"statements\":[{\"annotation\":\"icxgosnx\",\"sequenceNumber\":5762882342956883834,\"condition\":{\"ipCommunityIds\":[\"dfmzxao\",\"lhm\",\"jcnn\",\"sbnuc\"],\"ipExtendedCommunityIds\":[\"paqoqbvejo\"],\"type\":\"Or\",\"ipPrefixId\":\"ovlznklel\"},\"action\":{\"localPreference\":8931367816214973160,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}}},{\"annotation\":\"kxakruuptiicgvp\",\"sequenceNumber\":5890618214927776636,\"condition\":{\"ipCommunityIds\":[\"cnpxiema\",\"mztjekxsnnbrysg\",\"tfmocn\",\"bblrtbofz\"],\"ipExtendedCommunityIds\":[\"uifwxudynoh\",\"cqxu\",\"jxug\",\"crrfbplvhmh\"],\"type\":\"Or\",\"ipPrefixId\":\"djlz\"},\"action\":{\"localPreference\":462446323547379284,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}}}],\"networkFabricId\":\"rservpvesors\",\"addressFamilyType\":\"IPv4\",\"lastOperation\":{\"details\":\"mex\"},\"configurationState\":\"Failed\",\"provisioningState\":\"Accepted\",\"administrativeState\":\"MAT\"},\"location\":\"ydyvt\",\"tags\":{\"t\":\"irlunsskydi\",\"ocsvjekejchxzj\":\"jx\",\"yfyixecmasjnfgng\":\"cwuzs\"},\"id\":\"aojeeyvfxb\",\"name\":\"ckmoaljaxvwxt\",\"type\":\"uzhvojyffwflbk\"}") .toObject(RoutePolicyInner.class); - Assertions.assertEquals("gdobimor", model.location()); - Assertions.assertEquals("xosgihtrxue", model.tags().get("bmxqfgvz")); - Assertions.assertEquals("jf", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("hjjidodnvltc", model.statements().get(0).annotation()); - Assertions.assertEquals(4448738498634238178L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ate", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("ztirjvqxvwkiocxo", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("wbuocqflmnlrlqx", - model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(2247099392682138883L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("gt", model.annotation()); + Assertions.assertEquals("ydyvt", model.location()); + Assertions.assertEquals("irlunsskydi", model.tags().get("t")); + Assertions.assertEquals("tvvqtmvifgcvsim", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.properties().defaultAction()); + Assertions.assertEquals("icxgosnx", model.properties().statements().get(0).annotation()); + Assertions.assertEquals(5762882342956883834L, model.properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("dfmzxao", model.properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("paqoqbvejo", + model.properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, model.properties().statements().get(0).condition().type()); + Assertions.assertEquals("ovlznklel", model.properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(8931367816214973160L, + model.properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, + model.properties().statements().get(0).action().actionType()); + Assertions.assertEquals("rservpvesors", model.properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, model.properties().addressFamilyType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyInner model - = new RoutePolicyInner().withLocation("gdobimor") - .withTags(mapOf("bmxqfgvz", "xosgihtrxue", "osecxlngouf", "jqswshesgcs")) - .withNetworkFabricId("jf") - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.PERMIT) + RoutePolicyInner model = new RoutePolicyInner().withLocation("ydyvt") + .withTags(mapOf("t", "irlunsskydi", "ocsvjekejchxzj", "jx", "yfyixecmasjnfgng", "cwuzs")) + .withProperties(new RoutePolicyProperties().withAnnotation("tvvqtmvifgcvsim") + .withDefaultAction(CommunityActionTypes.DENY) .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("hjjidodnvltc") - .withSequenceNumber(4448738498634238178L) + new RoutePolicyStatementProperties().withAnnotation("icxgosnx") + .withSequenceNumber(5762882342956883834L) .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("ate", "yozdbc", "qnl")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("ztirjvqxvwkiocxo") - .withIpExtendedCommunityIds(Arrays.asList("wbuocqflmnlrlqx"))) - .withAction(new StatementActionProperties() - .withLocalPreference(2247099392682138883L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties( - new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("vdsp") - .withSequenceNumber(9175709040224729929L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("madlerzinfuivcz", "tllxsw", "dapsmir")) + .withIpCommunityIds(Arrays.asList("dfmzxao", "lhm", "jcnn", "sbnuc")) + .withIpExtendedCommunityIds(Arrays.asList("paqoqbvejo")) .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("wkupbbnhic") - .withIpExtendedCommunityIds( - Arrays.asList("zhrcqdfwbif", "nhlsforsimtfcqm", "ynb", "pelpfijtezgxmpe"))) - .withAction(new StatementActionProperties().withLocalPreference(2955918462156050023L) + .withIpPrefixId("ovlznklel")) + .withAction(new StatementActionProperties().withLocalPreference(8931367816214973160L) .withActionType(RoutePolicyActionType.CONTINUE) .withIpCommunityProperties( new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) @@ -90,33 +72,15 @@ public void testSerialize() throws Exception { new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) .withDelete(new IpExtendedCommunityIdList()) .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("s") - .withSequenceNumber(2451432701721525303L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("dnccotelik", "iytehhxtzxqdwbym")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("wtblgmkokqoi") - .withIpExtendedCommunityIds(Arrays.asList("efwlnm", "kffcnuestbsl"))) - .withAction(new StatementActionProperties() - .withLocalPreference(1174159606945652119L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties( - new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("xncqz") - .withSequenceNumber(804072634972443064L) + new RoutePolicyStatementProperties().withAnnotation("kxakruuptiicgvp") + .withSequenceNumber(5890618214927776636L) .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("v", "upqtzckj")) + .withIpCommunityIds(Arrays.asList("cnpxiema", "mztjekxsnnbrysg", "tfmocn", "bblrtbofz")) + .withIpExtendedCommunityIds(Arrays.asList("uifwxudynoh", "cqxu", "jxug", "crrfbplvhmh")) .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("xdbyhq") - .withIpExtendedCommunityIds(Arrays.asList("vimmwc", "ozvlfymt"))) - .withAction(new StatementActionProperties().withLocalPreference(5472309175848968118L) - .withActionType(RoutePolicyActionType.DENY) + .withIpPrefixId("djlz")) + .withAction(new StatementActionProperties().withLocalPreference(462446323547379284L) + .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties( new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) .withDelete(new IpCommunityIdList()) @@ -125,23 +89,26 @@ public void testSerialize() throws Exception { new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) .withDelete(new IpExtendedCommunityIdList()) .withSet(new IpExtendedCommunityIdList()))))) - .withAnnotation("gt"); + .withNetworkFabricId("rservpvesors") + .withAddressFamilyType(AddressFamilyType.IPV4)); model = BinaryData.fromObject(model).toObject(RoutePolicyInner.class); - Assertions.assertEquals("gdobimor", model.location()); - Assertions.assertEquals("xosgihtrxue", model.tags().get("bmxqfgvz")); - Assertions.assertEquals("jf", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("hjjidodnvltc", model.statements().get(0).annotation()); - Assertions.assertEquals(4448738498634238178L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ate", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("ztirjvqxvwkiocxo", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("wbuocqflmnlrlqx", - model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(2247099392682138883L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("gt", model.annotation()); + Assertions.assertEquals("ydyvt", model.location()); + Assertions.assertEquals("irlunsskydi", model.tags().get("t")); + Assertions.assertEquals("tvvqtmvifgcvsim", model.properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.DENY, model.properties().defaultAction()); + Assertions.assertEquals("icxgosnx", model.properties().statements().get(0).annotation()); + Assertions.assertEquals(5762882342956883834L, model.properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("dfmzxao", model.properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("paqoqbvejo", + model.properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, model.properties().statements().get(0).condition().type()); + Assertions.assertEquals("ovlznklel", model.properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(8931367816214973160L, + model.properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, + model.properties().statements().get(0).action().actionType()); + Assertions.assertEquals("rservpvesors", model.properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV4, model.properties().addressFamilyType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyListResultTests.java new file mode 100644 index 000000000000..fb55dc20fb1e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyListResultTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.implementation.models.RoutePolicyListResult; +import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import org.junit.jupiter.api.Assertions; + +public final class RoutePolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"annotation\":\"jhtyzzwqocygoyin\",\"defaultAction\":\"Permit\",\"statements\":[{\"annotation\":\"mezitrguzlweo\",\"sequenceNumber\":3899114383280147579,\"condition\":{},\"action\":{\"actionType\":\"Continue\"}},{\"annotation\":\"fz\",\"sequenceNumber\":2390968295686658085,\"condition\":{},\"action\":{\"actionType\":\"Permit\"}},{\"annotation\":\"xlmndhg\",\"sequenceNumber\":1323445674578520414,\"condition\":{},\"action\":{\"actionType\":\"Permit\"}}],\"networkFabricId\":\"pjuajz\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"itnwlyhbujysv\"},\"configurationState\":\"ErrorProvisioning\",\"provisioningState\":\"Failed\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"atmabtpgnqtjtnnr\",\"tags\":{\"gaahmdfsp\":\"ihc\",\"z\":\"dnxq\"},\"id\":\"tertnzrrwsc\",\"name\":\"clhdwienvtol\",\"type\":\"jy\"},{\"properties\":{\"annotation\":\"ryxsg\",\"defaultAction\":\"Permit\",\"statements\":[{\"annotation\":\"lt\",\"sequenceNumber\":1855068524768850068,\"condition\":{},\"action\":{\"actionType\":\"Deny\"}},{\"annotation\":\"vihbmwrv\",\"sequenceNumber\":6668419886285815087,\"condition\":{},\"action\":{\"actionType\":\"Deny\"}}],\"networkFabricId\":\"ohulobkabhvxjuai\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"rnygti\"},\"configurationState\":\"Succeeded\",\"provisioningState\":\"Updating\",\"administrativeState\":\"UnderMaintenance\"},\"location\":\"phvd\",\"tags\":{\"ieileemw\":\"xzpqditudcltf\",\"kkmibnmdp\":\"kehldopjsxvbbwsg\",\"pwtgzwmzhcmrloqa\":\"d\"},\"id\":\"styzavkyjjlu\",\"name\":\"nmbj\",\"type\":\"bngzldvvd\"}],\"nextLink\":\"pty\"}") + .toObject(RoutePolicyListResult.class); + Assertions.assertEquals("atmabtpgnqtjtnnr", model.value().get(0).location()); + Assertions.assertEquals("ihc", model.value().get(0).tags().get("gaahmdfsp")); + Assertions.assertEquals("jhtyzzwqocygoyin", model.value().get(0).properties().annotation()); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.value().get(0).properties().defaultAction()); + Assertions.assertEquals("mezitrguzlweo", model.value().get(0).properties().statements().get(0).annotation()); + Assertions.assertEquals(3899114383280147579L, + model.value().get(0).properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, + model.value().get(0).properties().statements().get(0).action().actionType()); + Assertions.assertEquals("pjuajz", model.value().get(0).properties().networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, model.value().get(0).properties().addressFamilyType()); + Assertions.assertEquals("pty", model.nextLink()); + } +} 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 index d5fb6b147346..9065a567bab9 100644 --- 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 @@ -1,21 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; 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.RoutePolicyActionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -25,100 +26,106 @@ public final class RoutePolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyPatch model = BinaryData.fromString( - "{\"properties\":{\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":5960291481089340541,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"hjcwwva\",\"ipExtendedCommunityIds\":[\"kfavhkhpsp\",\"weifdyfa\"],\"ipCommunityIds\":[\"ng\",\"wnrdp\"]},\"action\":{\"localPreference\":5849652728940512099,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"szamijxejpd\"},{\"sequenceNumber\":7302281233372122767,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"utiye\",\"ipExtendedCommunityIds\":[\"hhjtvh\",\"sznsyovqmqcud\",\"toqwrnfc\"],\"ipCommunityIds\":[\"hlokmxwawfubk\",\"gejjxum\",\"wynjmoozm\"]},\"action\":{\"localPreference\":5927456601729899613,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"o\"},{\"sequenceNumber\":125614563308320468,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"dtstia\",\"ipExtendedCommunityIds\":[\"rnuhcfhepisqbc\",\"lr\",\"i\",\"mmemsoqgblcye\"],\"ipCommunityIds\":[\"bobaqca\",\"ebckcesrsixwnlpj\"]},\"action\":{\"localPreference\":1096091315863363994,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"idzfpsfy\"},{\"sequenceNumber\":7384396009518029284,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"mlxrqkekn\",\"ipExtendedCommunityIds\":[\"qafz\",\"ptriysjrgtruwpu\",\"p\",\"rcek\"],\"ipCommunityIds\":[\"oyd\",\"edggwgclvbwatza\",\"rjbjngoarsr\"]},\"action\":{\"localPreference\":9662774513548733,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}},\"ipExtendedCommunityProperties\":{\"delete\":{},\"set\":{},\"add\":{}}},\"annotation\":\"pimrxirqwipzes\"}]},\"tags\":{\"vzjoyxjgahxue\":\"inytkmlfupjzcx\",\"cerfcvcpvf\":\"rdaktnytk\"}}") + "{\"tags\":{\"c\":\"unknsgvxhxrmeatr\",\"oytrcoufkqmbh\":\"yfjvifbmojtehq\",\"knvki\":\"kdf\"},\"properties\":{\"defaultAction\":\"Permit\",\"statements\":[{\"annotation\":\"hmeo\",\"sequenceNumber\":5731981849412269806,\"condition\":{\"ipCommunityIds\":[\"rkn\",\"kkfxm\",\"qeqk\"],\"ipExtendedCommunityIds\":[\"hfvsf\",\"sstw\",\"p\",\"cachdtezgfctu\"],\"type\":\"And\",\"ipPrefixId\":\"qrzvuxnx\"},\"action\":{\"localPreference\":2051429802928639549,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}}},{\"annotation\":\"jdhypngocbdx\",\"sequenceNumber\":1740378967842023975,\"condition\":{\"ipCommunityIds\":[\"tbc\",\"suzg\",\"zukekytkzvt\"],\"ipExtendedCommunityIds\":[\"atvogpycein\",\"arhbdx\",\"byp\",\"s\"],\"type\":\"Or\",\"ipPrefixId\":\"ju\"},\"action\":{\"localPreference\":4195833178441997127,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}}},{\"annotation\":\"ftfcbrtsrdplqdy\",\"sequenceNumber\":1470543456248495144,\"condition\":{\"ipCommunityIds\":[\"sfzrguzliyvsbfsi\",\"vabd\",\"uljgxotu\",\"a\"],\"ipExtendedCommunityIds\":[\"yaosthulzu\"],\"type\":\"And\",\"ipPrefixId\":\"spxldlnocscy\"},\"action\":{\"localPreference\":1722677613066839320,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}},\"ipExtendedCommunityProperties\":{\"add\":{},\"delete\":{},\"set\":{}}}}]}}") .toObject(RoutePolicyPatch.class); - Assertions.assertEquals("inytkmlfupjzcx", model.tags().get("vzjoyxjgahxue")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("szamijxejpd", model.statements().get(0).annotation()); - Assertions.assertEquals(5960291481089340541L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ng", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("hjcwwva", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kfavhkhpsp", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(5849652728940512099L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); + Assertions.assertEquals("unknsgvxhxrmeatr", model.tags().get("c")); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().defaultAction()); + Assertions.assertEquals("hmeo", model.properties().statements().get(0).annotation()); + Assertions.assertEquals(5731981849412269806L, model.properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("rkn", model.properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("hfvsf", + model.properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, + model.properties().statements().get(0).condition().type()); + Assertions.assertEquals("qrzvuxnx", model.properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(2051429802928639549L, + model.properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, + model.properties().statements().get(0).action().actionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyPatch model = new RoutePolicyPatch() - .withTags(mapOf("vzjoyxjgahxue", "inytkmlfupjzcx", "cerfcvcpvf", "rdaktnytk")) - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("szamijxejpd") - .withSequenceNumber(5960291481089340541L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("ng", "wnrdp")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("hjcwwva") - .withIpExtendedCommunityIds(Arrays.asList("kfavhkhpsp", "weifdyfa"))) - .withAction(new StatementActionProperties().withLocalPreference(5849652728940512099L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("o") - .withSequenceNumber(7302281233372122767L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("hlokmxwawfubk", "gejjxum", "wynjmoozm")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("utiye") - .withIpExtendedCommunityIds(Arrays.asList("hhjtvh", "sznsyovqmqcud", "toqwrnfc"))) - .withAction(new StatementActionProperties().withLocalPreference(5927456601729899613L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("idzfpsfy") - .withSequenceNumber(125614563308320468L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("bobaqca", "ebckcesrsixwnlpj")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("dtstia") - .withIpExtendedCommunityIds(Arrays.asList("rnuhcfhepisqbc", "lr", "i", "mmemsoqgblcye"))) - .withAction(new StatementActionProperties().withLocalPreference(1096091315863363994L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))), - new RoutePolicyStatementProperties().withAnnotation("pimrxirqwipzes") - .withSequenceNumber(7384396009518029284L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("oyd", "edggwgclvbwatza", "rjbjngoarsr")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("mlxrqkekn") - .withIpExtendedCommunityIds(Arrays.asList("qafz", "ptriysjrgtruwpu", "p", "rcek"))) - .withAction(new StatementActionProperties().withLocalPreference(9662774513548733L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties().withAdd(new IpCommunityIdList()) - .withDelete(new IpCommunityIdList()) - .withSet(new IpCommunityIdList())) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties().withAdd(new IpExtendedCommunityIdList()) - .withDelete(new IpExtendedCommunityIdList()) - .withSet(new IpExtendedCommunityIdList()))))); + RoutePolicyPatch model + = new RoutePolicyPatch() + .withTags(mapOf("c", "unknsgvxhxrmeatr", "oytrcoufkqmbh", "yfjvifbmojtehq", "knvki", "kdf")) + .withProperties( + new RoutePolicyPatchableProperties().withDefaultAction(CommunityActionTypes.PERMIT) + .withStatements( + Arrays.asList( + new RoutePolicyStatementPatchProperties().withAnnotation("hmeo") + .withSequenceNumber(5731981849412269806L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("rkn", "kkfxm", "qeqk")) + .withIpExtendedCommunityIds( + Arrays.asList("hfvsf", "sstw", "p", "cachdtezgfctu")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("qrzvuxnx")) + .withAction(new StatementActionPatchProperties() + .withLocalPreference(2051429802928639549L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList()))), + new RoutePolicyStatementPatchProperties().withAnnotation("jdhypngocbdx") + .withSequenceNumber(1740378967842023975L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("tbc", "suzg", "zukekytkzvt")) + .withIpExtendedCommunityIds(Arrays.asList("atvogpycein", "arhbdx", "byp", "s")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("ju")) + .withAction( + new StatementActionPatchProperties().withLocalPreference(4195833178441997127L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties( + new ActionIpCommunityPatchProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList()))), + new RoutePolicyStatementPatchProperties().withAnnotation("ftfcbrtsrdplqdy") + .withSequenceNumber(1470543456248495144L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("sfzrguzliyvsbfsi", "vabd", "uljgxotu", "a")) + .withIpExtendedCommunityIds(Arrays.asList("yaosthulzu")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("spxldlnocscy")) + .withAction( + new StatementActionPatchProperties().withLocalPreference(1722677613066839320L) + .withActionType(RoutePolicyActionType.DENY) + .withIpCommunityProperties( + new ActionIpCommunityPatchProperties().withAdd(new IpCommunityIdList()) + .withDelete(new IpCommunityIdList()) + .withSet(new IpCommunityIdList())) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList()) + .withDelete(new IpExtendedCommunityIdList()) + .withSet(new IpExtendedCommunityIdList())))))); model = BinaryData.fromObject(model).toObject(RoutePolicyPatch.class); - Assertions.assertEquals("inytkmlfupjzcx", model.tags().get("vzjoyxjgahxue")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("szamijxejpd", model.statements().get(0).annotation()); - Assertions.assertEquals(5960291481089340541L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("ng", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("hjcwwva", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kfavhkhpsp", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(5849652728940512099L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); + Assertions.assertEquals("unknsgvxhxrmeatr", model.tags().get("c")); + Assertions.assertEquals(CommunityActionTypes.PERMIT, model.properties().defaultAction()); + Assertions.assertEquals("hmeo", model.properties().statements().get(0).annotation()); + Assertions.assertEquals(5731981849412269806L, model.properties().statements().get(0).sequenceNumber()); + Assertions.assertEquals("rkn", model.properties().statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("hfvsf", + model.properties().statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, + model.properties().statements().get(0).condition().type()); + Assertions.assertEquals("qrzvuxnx", model.properties().statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(2051429802928639549L, + model.properties().statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, + model.properties().statements().get(0).action().actionType()); } // Use "Map.of" if available diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java index fc6f60361a10..3ac458fc71ba 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchablePropertiesTests.java @@ -1,21 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; 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.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 com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -23,26 +23,26 @@ public final class RoutePolicyPatchablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyPatchableProperties model = BinaryData.fromString( - "{\"defaultAction\":\"Permit\",\"statements\":[{\"sequenceNumber\":449688958623242350,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"fgi\",\"ipExtendedCommunityIds\":[\"gg\",\"wdqbxexfyznv\",\"ssuqksl\",\"sfx\"],\"ipCommunityIds\":[\"qbyeywpmoh\",\"rtlikff\",\"dzt\",\"qrf\"]},\"action\":{\"localPreference\":8955635498046885793,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"dteqjmyqxuhg\",\"axnyprijyoxxjxbs\",\"wrrlccklyf\",\"jmspauemqomxoa\"]},\"set\":{\"ipCommunityIds\":[\"yapvibzic\",\"vic\",\"captkhjxnrkbnvf\",\"cklzhznfgvlxy\"]},\"add\":{\"ipCommunityIds\":[\"tigpksywicklktg\",\"dprtqjytdcfe\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"wbvjsbgmlamoa\",\"caytnpkvbpbltcws\",\"xheeocnqo\",\"bvepvlryszfhd\"]},\"set\":{\"ipExtendedCommunityIds\":[\"xohzb\",\"hhavzfuxnvk\",\"slcof\",\"vtf\"]},\"add\":{\"ipExtendedCommunityIds\":[\"uisaklhjfddxqfu\",\"subzsspmj\"]}}},\"annotation\":\"ilfauyvxpq\"},{\"sequenceNumber\":3891325791370492170,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"wbztrt\",\"ipExtendedCommunityIds\":[\"wvoglff\",\"dhg\"],\"ipCommunityIds\":[\"rmhbtofcv\"]},\"action\":{\"localPreference\":2118422597275895008,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"ylmnqunkygb\",\"tmsgkwedwl\"]},\"set\":{\"ipCommunityIds\":[\"gbg\",\"hudhrpj\",\"mvrrqfibpk\"]},\"add\":{\"ipCommunityIds\":[\"rlfizju\",\"dndihupngy\",\"ylqya\",\"ewcmodxwuuytxnxr\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"eargvfvkhbjh\",\"vpjxsdhweignybff\",\"cwwynepktvmw\"]},\"set\":{\"ipExtendedCommunityIds\":[\"ny\",\"eb\",\"ijfhpxnikouoxfal\",\"kbskkypo\"]},\"add\":{\"ipExtendedCommunityIds\":[\"ieunbydlgfaphwuu\"]}}},\"annotation\":\"tsaynr\"}]}") + "{\"defaultAction\":\"Permit\",\"statements\":[{\"annotation\":\"spppoeszthj\",\"sequenceNumber\":5380302875311471526,\"condition\":{\"ipCommunityIds\":[\"kdiylgzzuqixpsyb\",\"owgvm\"],\"ipExtendedCommunityIds\":[\"o\",\"xdhkoex\",\"rhgnakajwscmneev\"],\"type\":\"And\",\"ipPrefixId\":\"eumzyyhmgqae\"},\"action\":{\"localPreference\":5330209006834090870,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"gbzgfhzdzahktxv\",\"bicfecthotbkjwhz\",\"pxjvtwk\",\"jdpayx\"]},\"delete\":{\"ipCommunityIds\":[\"wuzrgqztjfk\",\"btqqjobsyn\",\"en\",\"onjqhdheosx\"]},\"set\":{\"ipCommunityIds\":[\"dmpfhw\",\"pphtjtntcwgpdb\",\"glaecctokfspv\",\"rd\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"mprft\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"jwiyyeohg\",\"cmdjmvphwfnugsl\",\"fzzi\",\"xbgomvuep\"]},\"set\":{\"ipExtendedCommunityIds\":[\"fxnwcgzuoxixtxxx\",\"jsehbknnrnk\",\"jfawpcbsogz\"]}}}},{\"annotation\":\"czbnivcohsxvppkj\",\"sequenceNumber\":4509721129640706476,\"condition\":{\"ipCommunityIds\":[\"bewhotvbmyzuqf\",\"qdkt\"],\"ipExtendedCommunityIds\":[\"o\"],\"type\":\"Or\",\"ipPrefixId\":\"hqngjndkvz\"},\"action\":{\"localPreference\":962411286646335743,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"dnkqyipgkmjt\",\"azmdzesimeftg\",\"rfzjlflzagvdavab\",\"iefcorzbida\"]},\"delete\":{\"ipCommunityIds\":[\"nicewd\"]},\"set\":{\"ipCommunityIds\":[\"iyl\",\"i\",\"bb\",\"wwsr\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"ecuuuex\",\"mnteevfg\",\"xfezraqsddko\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"q\",\"kyrxgmzzeglwd\",\"fsspfegaoksd\",\"kkraj\"]},\"set\":{\"ipExtendedCommunityIds\":[\"lxkelmzpyq\"]}}}}]}") .toObject(RoutePolicyPatchableProperties.class); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("ilfauyvxpq", model.statements().get(0).annotation()); - Assertions.assertEquals(449688958623242350L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("qbyeywpmoh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); - Assertions.assertEquals("fgi", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("gg", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(8955635498046885793L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals("spppoeszthj", model.statements().get(0).annotation()); + Assertions.assertEquals(5380302875311471526L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("kdiylgzzuqixpsyb", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("o", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); + Assertions.assertEquals("eumzyyhmgqae", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(5330209006834090870L, model.statements().get(0).action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("tigpksywicklktg", + Assertions.assertEquals("gbzgfhzdzahktxv", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dteqjmyqxuhg", + Assertions.assertEquals("wuzrgqztjfk", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("yapvibzic", + Assertions.assertEquals("dmpfhw", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("uisaklhjfddxqfu", + Assertions.assertEquals("mprft", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("wbvjsbgmlamoa", + Assertions.assertEquals("jwiyyeohg", model.statements() .get(0) .action() @@ -50,79 +50,80 @@ public void testDeserialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("xohzb", + Assertions.assertEquals("fxnwcgzuoxixtxxx", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyPatchableProperties model = new RoutePolicyPatchableProperties() - .withDefaultAction(CommunityActionTypes.PERMIT) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("ilfauyvxpq") - .withSequenceNumber(449688958623242350L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("qbyeywpmoh", "rtlikff", "dzt", "qrf")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("fgi") - .withIpExtendedCommunityIds(Arrays.asList("gg", "wdqbxexfyznv", "ssuqksl", "sfx"))) - .withAction(new StatementActionProperties().withLocalPreference(8955635498046885793L) - .withActionType(RoutePolicyActionType.DENY) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("tigpksywicklktg", "dprtqjytdcfe"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds( - Arrays.asList("dteqjmyqxuhg", "axnyprijyoxxjxbs", "wrrlccklyf", "jmspauemqomxoa"))) - .withSet(new IpCommunityIdList().withIpCommunityIds( - Arrays.asList("yapvibzic", "vic", "captkhjxnrkbnvf", "cklzhznfgvlxy")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("uisaklhjfddxqfu", "subzsspmj"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("wbvjsbgmlamoa", "caytnpkvbpbltcws", "xheeocnqo", "bvepvlryszfhd"))) - .withSet(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("xohzb", "hhavzfuxnvk", "slcof", "vtf"))))), - new RoutePolicyStatementProperties().withAnnotation("tsaynr") - .withSequenceNumber(3891325791370492170L) - .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("rmhbtofcv")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("wbztrt") - .withIpExtendedCommunityIds(Arrays.asList("wvoglff", "dhg"))) - .withAction(new StatementActionProperties().withLocalPreference(2118422597275895008L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds( - Arrays.asList("rlfizju", "dndihupngy", "ylqya", "ewcmodxwuuytxnxr"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ylmnqunkygb", "tmsgkwedwl"))) - .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("gbg", "hudhrpj", "mvrrqfibpk")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ieunbydlgfaphwuu"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("eargvfvkhbjh", "vpjxsdhweignybff", "cwwynepktvmw"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("ny", "eb", "ijfhpxnikouoxfal", "kbskkypo"))))))); + RoutePolicyPatchableProperties model + = new RoutePolicyPatchableProperties().withDefaultAction(CommunityActionTypes.PERMIT) + .withStatements(Arrays.asList( + new RoutePolicyStatementPatchProperties().withAnnotation("spppoeszthj") + .withSequenceNumber(5380302875311471526L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("kdiylgzzuqixpsyb", "owgvm")) + .withIpExtendedCommunityIds(Arrays.asList("o", "xdhkoex", "rhgnakajwscmneev")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("eumzyyhmgqae")) + .withAction(new StatementActionPatchProperties().withLocalPreference(5330209006834090870L) + .withActionType(RoutePolicyActionType.DENY) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("gbzgfhzdzahktxv", "bicfecthotbkjwhz", "pxjvtwk", "jdpayx"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("wuzrgqztjfk", "btqqjobsyn", "en", "onjqhdheosx"))) + .withSet( + new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("dmpfhw", "pphtjtntcwgpdb", "glaecctokfspv", "rd")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("mprft"))) + .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("jwiyyeohg", "cmdjmvphwfnugsl", "fzzi", "xbgomvuep"))) + .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("fxnwcgzuoxixtxxx", "jsehbknnrnk", "jfawpcbsogz"))))), + new RoutePolicyStatementPatchProperties().withAnnotation("czbnivcohsxvppkj") + .withSequenceNumber(4509721129640706476L) + .withCondition(new StatementConditionPatchProperties() + .withIpCommunityIds(Arrays.asList("bewhotvbmyzuqf", "qdkt")) + .withIpExtendedCommunityIds(Arrays.asList("o")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("hqngjndkvz")) + .withAction(new StatementActionPatchProperties().withLocalPreference(962411286646335743L) + .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("dnkqyipgkmjt", "azmdzesimeftg", "rfzjlflzagvdavab", "iefcorzbida"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("nicewd"))) + .withSet(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("iyl", "i", "bb", "wwsr")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("ecuuuex", "mnteevfg", "xfezraqsddko"))) + .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("q", "kyrxgmzzeglwd", "fsspfegaoksd", "kkraj"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("lxkelmzpyq"))))))); model = BinaryData.fromObject(model).toObject(RoutePolicyPatchableProperties.class); Assertions.assertEquals(CommunityActionTypes.PERMIT, model.defaultAction()); - Assertions.assertEquals("ilfauyvxpq", model.statements().get(0).annotation()); - Assertions.assertEquals(449688958623242350L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("qbyeywpmoh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); - Assertions.assertEquals("fgi", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("gg", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(8955635498046885793L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals("spppoeszthj", model.statements().get(0).annotation()); + Assertions.assertEquals(5380302875311471526L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("kdiylgzzuqixpsyb", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("o", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); + Assertions.assertEquals("eumzyyhmgqae", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(5330209006834090870L, model.statements().get(0).action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.DENY, model.statements().get(0).action().actionType()); - Assertions.assertEquals("tigpksywicklktg", + Assertions.assertEquals("gbzgfhzdzahktxv", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dteqjmyqxuhg", + Assertions.assertEquals("wuzrgqztjfk", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("yapvibzic", + Assertions.assertEquals("dmpfhw", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("uisaklhjfddxqfu", + Assertions.assertEquals("mprft", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("wbvjsbgmlamoa", + Assertions.assertEquals("jwiyyeohg", model.statements() .get(0) .action() @@ -130,7 +131,7 @@ public void testSerialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("xohzb", + Assertions.assertEquals("fxnwcgzuoxixtxxx", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } } 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 index aa22bfd60781..7b7900c23db4 100644 --- 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ActionIpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; @@ -14,6 +13,7 @@ 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.RoutePolicyProperties; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -24,29 +24,27 @@ public final class RoutePolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyProperties model = BinaryData.fromString( - "{\"networkFabricId\":\"zipplxg\",\"addressFamilyType\":\"IPv4\",\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Succeeded\",\"administrativeState\":\"Enabled\",\"defaultAction\":\"Deny\",\"statements\":[{\"sequenceNumber\":244241643935550643,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"z\",\"ipExtendedCommunityIds\":[\"kwxfugfzizyxd\",\"yjnqzbrqcakmfckv\",\"yjucamnsb\"],\"ipCommunityIds\":[\"twhmucjiuhcxyveh\",\"klely\",\"dvpqfbxgy\"]},\"action\":{\"localPreference\":535781383491737294,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"qlefnohey\"]},\"set\":{\"ipCommunityIds\":[\"pkyll\",\"ey\",\"nj\",\"w\"]},\"add\":{\"ipCommunityIds\":[\"w\",\"wrsvevcn\",\"qswxhqhgkhtbzvul\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"ncpmyh\",\"xgdmvghcmixmlwkf\"]},\"set\":{\"ipExtendedCommunityIds\":[\"yjrtalqeebu\",\"fyim\",\"oaezktomsgoihlq\"]},\"add\":{\"ipExtendedCommunityIds\":[\"aazbaeeekfzt\",\"n\",\"bfb\"]}}},\"annotation\":\"ow\"},{\"sequenceNumber\":1344289763375947200,\"condition\":{\"type\":\"And\",\"ipPrefixId\":\"xhmewyaol\",\"ipExtendedCommunityIds\":[\"x\",\"rdpuyytbpkrp\",\"hqetp\",\"enefnoafpcnrx\"],\"ipCommunityIds\":[\"xowvhufcmuaj\",\"blx\",\"htozfrfaw\",\"nnsvrfajynihti\"]},\"action\":{\"localPreference\":7910534423394817555,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"uctblfehbgcgyoh\",\"cmeqljxdum\"]},\"set\":{\"ipCommunityIds\":[\"onebldxa\",\"mdfjwcngkwxjsj\",\"uvohufzdtsrp\"]},\"add\":{\"ipCommunityIds\":[\"zacrzhnsbylgmgbh\",\"qczouanbfulvcxgl\",\"oqwb\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"bzbwbgwzhbhfljey\",\"dpiov\",\"lhrwyakzuafapwx\"]},\"set\":{\"ipExtendedCommunityIds\":[\"atjiobnirgoextqd\",\"wtgntimznupb\",\"tbsetko\"]},\"add\":{\"ipExtendedCommunityIds\":[\"hedaakghcrzmm\"]}}},\"annotation\":\"yvdhdgdiwmlg\"},{\"sequenceNumber\":8604498652692523406,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"qjisjmolzcaqf\",\"ipExtendedCommunityIds\":[\"hgkrv\"],\"ipCommunityIds\":[\"cvytv\",\"ejqaw\"]},\"action\":{\"localPreference\":5965499479787157061,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"czbdypbbimh\",\"bozvo\"]},\"set\":{\"ipCommunityIds\":[\"lnh\"]},\"add\":{\"ipCommunityIds\":[\"uzlybqs\",\"ibvylkv\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"nwqhawvcnvi\",\"lbylmgjzrycwpbgu\",\"whm\"]},\"set\":{\"ipExtendedCommunityIds\":[\"knsastlpsmgomi\",\"ttrvlvvjmxokxxa\",\"qecjrzvlcivqx\",\"emklphx\"]},\"add\":{\"ipExtendedCommunityIds\":[\"ojk\",\"gnfbrzj\",\"fsunh\"]}}},\"annotation\":\"vlahxczywy\"}],\"annotation\":\"ahwcorewcnn\"}") + "{\"annotation\":\"dzuiygtcyzcjef\",\"defaultAction\":\"Deny\",\"statements\":[{\"annotation\":\"djcgldry\",\"sequenceNumber\":6401023467843697483,\"condition\":{\"ipCommunityIds\":[\"bhzirmx\",\"aujbfomfbozpj\"],\"ipExtendedCommunityIds\":[\"fppqcwdnnj\"],\"type\":\"Or\",\"ipPrefixId\":\"snxeby\"},\"action\":{\"localPreference\":8123674357224095412,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"nnp\",\"sebcxno\",\"spdyzssj\",\"mykdy\"]},\"delete\":{\"ipCommunityIds\":[\"spjlfzh\",\"ngwqxcrbcrgyoim\"]},\"set\":{\"ipCommunityIds\":[\"zcctvkogn\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"wnnwc\",\"vpnyldjd\",\"jvdry\",\"nkxioxhnrjlq\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"jexfdl\",\"uhdk\",\"bgywadrklpdye\"]},\"set\":{\"ipExtendedCommunityIds\":[\"cflvxbocaywmfvuh\"]}}}},{\"annotation\":\"olhve\",\"sequenceNumber\":7497570241950176398,\"condition\":{\"ipCommunityIds\":[\"fm\"],\"ipExtendedCommunityIds\":[\"xqupymlhklmnjq\",\"mqynhitrnwqg\"],\"type\":\"Or\",\"ipPrefixId\":\"hbfpiqnrjocogw\"},\"action\":{\"localPreference\":1867827188648740125,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"iadd\",\"khuvnl\",\"dcnutiexmizun\",\"bqvioyn\"]},\"delete\":{\"ipCommunityIds\":[\"hhv\",\"wzpr\"]},\"set\":{\"ipCommunityIds\":[\"ia\",\"btvavlya\",\"tlocnwmefzvzuzq\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"rvbzgyhenfsfy\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"wmh\",\"ozf\",\"ywjiaaosla\"]},\"set\":{\"ipExtendedCommunityIds\":[\"aakktbjor\"]}}}},{\"annotation\":\"tkajqhsnsej\",\"sequenceNumber\":4162585948154562606,\"condition\":{\"ipCommunityIds\":[\"xyljzbkdw\"],\"ipExtendedCommunityIds\":[\"wxgv\",\"k\",\"ctvrpeawzzkvf\"],\"type\":\"And\",\"ipPrefixId\":\"vq\"},\"action\":{\"localPreference\":2023566646887622398,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"rmsukx\",\"uytgcptctxpo\"]},\"delete\":{\"ipCommunityIds\":[\"kmemfvrcc\"]},\"set\":{\"ipCommunityIds\":[\"kfvyj\",\"mmw\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"pjylxtebvsewf\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"aysqwh\",\"dcyandblkb\"]},\"set\":{\"ipExtendedCommunityIds\":[\"pvdfmoqqc\",\"fvxuosqpffapjpj\"]}}}}],\"networkFabricId\":\"s\",\"addressFamilyType\":\"IPv6\",\"lastOperation\":{\"details\":\"nyfowyj\"},\"configurationState\":\"Deprovisioning\",\"provisioningState\":\"Updating\",\"administrativeState\":\"Enabled\"}") .toObject(RoutePolicyProperties.class); - Assertions.assertEquals("ahwcorewcnn", model.annotation()); - Assertions.assertEquals("zipplxg", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); + Assertions.assertEquals("dzuiygtcyzcjef", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("ow", model.statements().get(0).annotation()); - Assertions.assertEquals(244241643935550643L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("twhmucjiuhcxyveh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("z", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kwxfugfzizyxd", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(535781383491737294L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.statements().get(0).action().actionType()); - Assertions.assertEquals("w", + Assertions.assertEquals("djcgldry", model.statements().get(0).annotation()); + Assertions.assertEquals(6401023467843697483L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("bhzirmx", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("fppqcwdnnj", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); + Assertions.assertEquals("snxeby", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(8123674357224095412L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.statements().get(0).action().actionType()); + Assertions.assertEquals("nnp", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("qlefnohey", + Assertions.assertEquals("spjlfzh", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("pkyll", + Assertions.assertEquals("zcctvkogn", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("aazbaeeekfzt", + Assertions.assertEquals("wnnwc", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ncpmyh", + Assertions.assertEquals("jexfdl", model.statements() .get(0) .action() @@ -54,106 +52,103 @@ public void testDeserialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("yjrtalqeebu", + Assertions.assertEquals("cflvxbocaywmfvuh", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("s", model.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, model.addressFamilyType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyProperties model = new RoutePolicyProperties().withAnnotation("ahwcorewcnn") - .withNetworkFabricId("zipplxg") - .withAddressFamilyType(AddressFamilyType.IPV4) - .withDefaultAction(CommunityActionTypes.DENY) - .withStatements(Arrays.asList( - new RoutePolicyStatementProperties().withAnnotation("ow") - .withSequenceNumber(244241643935550643L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("twhmucjiuhcxyveh", "klely", "dvpqfbxgy")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("z") - .withIpExtendedCommunityIds(Arrays.asList("kwxfugfzizyxd", "yjnqzbrqcakmfckv", "yjucamnsb"))) - .withAction( - new StatementActionProperties().withLocalPreference(535781383491737294L) - .withActionType(RoutePolicyActionType.CONTINUE) + RoutePolicyProperties model + = new RoutePolicyProperties().withAnnotation("dzuiygtcyzcjef") + .withDefaultAction(CommunityActionTypes.DENY) + .withStatements(Arrays.asList( + new RoutePolicyStatementProperties().withAnnotation("djcgldry") + .withSequenceNumber(6401023467843697483L) + .withCondition(new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("bhzirmx", "aujbfomfbozpj")) + .withIpExtendedCommunityIds(Arrays.asList("fppqcwdnnj")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("snxeby")) + .withAction(new StatementActionProperties().withLocalPreference(8123674357224095412L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties(new ActionIpCommunityProperties() + .withAdd(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("nnp", "sebcxno", "spdyzssj", "mykdy"))) + .withDelete(new IpCommunityIdList() + .withIpCommunityIds(Arrays.asList("spjlfzh", "ngwqxcrbcrgyoim"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("zcctvkogn")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( + Arrays.asList("wnnwc", "vpnyldjd", "jvdry", "nkxioxhnrjlq"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("jexfdl", "uhdk", "bgywadrklpdye"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("cflvxbocaywmfvuh"))))), + new RoutePolicyStatementProperties().withAnnotation("olhve") + .withSequenceNumber(7497570241950176398L) + .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("fm")) + .withIpExtendedCommunityIds(Arrays.asList("xqupymlhklmnjq", "mqynhitrnwqg")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId("hbfpiqnrjocogw")) + .withAction(new StatementActionProperties().withLocalPreference(1867827188648740125L) + .withActionType(RoutePolicyActionType.DENY) .withIpCommunityProperties(new ActionIpCommunityProperties() .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("w", "wrsvevcn", "qswxhqhgkhtbzvul"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("qlefnohey"))) + .withIpCommunityIds(Arrays.asList("iadd", "khuvnl", "dcnutiexmizun", "bqvioyn"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("hhv", "wzpr"))) .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("pkyll", "ey", "nj", "w")))) + .withIpCommunityIds(Arrays.asList("ia", "btvavlya", "tlocnwmefzvzuzq")))) .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("aazbaeeekfzt", "n", "bfb"))) + .withIpExtendedCommunityIds(Arrays.asList("rvbzgyhenfsfy"))) .withDelete(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ncpmyh", "xgdmvghcmixmlwkf"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("yjrtalqeebu", "fyim", "oaezktomsgoihlq"))))), - new RoutePolicyStatementProperties().withAnnotation("yvdhdgdiwmlg") - .withSequenceNumber(1344289763375947200L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("xowvhufcmuaj", "blx", "htozfrfaw", "nnsvrfajynihti")) - .withType(RoutePolicyConditionType.AND) - .withIpPrefixId("xhmewyaol") - .withIpExtendedCommunityIds(Arrays.asList("x", "rdpuyytbpkrp", "hqetp", "enefnoafpcnrx"))) - .withAction(new StatementActionProperties().withLocalPreference(7910534423394817555L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("zacrzhnsbylgmgbh", "qczouanbfulvcxgl", "oqwb"))) - .withDelete(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("uctblfehbgcgyoh", "cmeqljxdum"))) - .withSet(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("onebldxa", "mdfjwcngkwxjsj", "uvohufzdtsrp")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("hedaakghcrzmm"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("bzbwbgwzhbhfljey", "dpiov", "lhrwyakzuafapwx"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("atjiobnirgoextqd", "wtgntimznupb", "tbsetko"))))), - new RoutePolicyStatementProperties().withAnnotation("vlahxczywy") - .withSequenceNumber(8604498652692523406L) - .withCondition( - new StatementConditionProperties().withIpCommunityIds(Arrays.asList("cvytv", "ejqaw")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("qjisjmolzcaqf") - .withIpExtendedCommunityIds(Arrays.asList("hgkrv"))) - .withAction(new StatementActionProperties().withLocalPreference(5965499479787157061L) - .withActionType(RoutePolicyActionType.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("uzlybqs", "ibvylkv"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("czbdypbbimh", "bozvo"))) - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("lnh")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ojk", "gnfbrzj", "fsunh"))) - .withDelete(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("nwqhawvcnvi", "lbylmgjzrycwpbgu", "whm"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("knsastlpsmgomi", "ttrvlvvjmxokxxa", "qecjrzvlcivqx", "emklphx"))))))); + .withIpExtendedCommunityIds(Arrays.asList("wmh", "ozf", "ywjiaaosla"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("aakktbjor"))))), + new RoutePolicyStatementProperties().withAnnotation("tkajqhsnsej") + .withSequenceNumber(4162585948154562606L) + .withCondition(new StatementConditionProperties().withIpCommunityIds(Arrays.asList("xyljzbkdw")) + .withIpExtendedCommunityIds(Arrays.asList("wxgv", "k", "ctvrpeawzzkvf")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("vq")) + .withAction(new StatementActionProperties().withLocalPreference(2023566646887622398L) + .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityProperties(new ActionIpCommunityProperties() + .withAdd( + new IpCommunityIdList().withIpCommunityIds(Arrays.asList("rmsukx", "uytgcptctxpo"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("kmemfvrcc"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("kfvyj", "mmw")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("pjylxtebvsewf"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("aysqwh", "dcyandblkb"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("pvdfmoqqc", "fvxuosqpffapjpj"))))))) + .withNetworkFabricId("s") + .withAddressFamilyType(AddressFamilyType.IPV6); model = BinaryData.fromObject(model).toObject(RoutePolicyProperties.class); - Assertions.assertEquals("ahwcorewcnn", model.annotation()); - Assertions.assertEquals("zipplxg", model.networkFabricId()); - Assertions.assertEquals(AddressFamilyType.IPV4, model.addressFamilyType()); + Assertions.assertEquals("dzuiygtcyzcjef", model.annotation()); Assertions.assertEquals(CommunityActionTypes.DENY, model.defaultAction()); - Assertions.assertEquals("ow", model.statements().get(0).annotation()); - Assertions.assertEquals(244241643935550643L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("twhmucjiuhcxyveh", model.statements().get(0).condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.AND, model.statements().get(0).condition().type()); - Assertions.assertEquals("z", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals("kwxfugfzizyxd", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(535781383491737294L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.statements().get(0).action().actionType()); - Assertions.assertEquals("w", + Assertions.assertEquals("djcgldry", model.statements().get(0).annotation()); + Assertions.assertEquals(6401023467843697483L, model.statements().get(0).sequenceNumber()); + Assertions.assertEquals("bhzirmx", model.statements().get(0).condition().ipCommunityIds().get(0)); + Assertions.assertEquals("fppqcwdnnj", model.statements().get(0).condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.OR, model.statements().get(0).condition().type()); + Assertions.assertEquals("snxeby", model.statements().get(0).condition().ipPrefixId()); + Assertions.assertEquals(8123674357224095412L, model.statements().get(0).action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.PERMIT, model.statements().get(0).action().actionType()); + Assertions.assertEquals("nnp", model.statements().get(0).action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("qlefnohey", + Assertions.assertEquals("spjlfzh", model.statements().get(0).action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("pkyll", + Assertions.assertEquals("zcctvkogn", model.statements().get(0).action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("aazbaeeekfzt", + Assertions.assertEquals("wnnwc", model.statements().get(0).action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ncpmyh", + Assertions.assertEquals("jexfdl", model.statements() .get(0) .action() @@ -161,7 +156,9 @@ public void testSerialize() throws Exception { .delete() .ipExtendedCommunityIds() .get(0)); - Assertions.assertEquals("yjrtalqeebu", + Assertions.assertEquals("cflvxbocaywmfvuh", model.statements().get(0).action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("s", model.networkFabricId()); + Assertions.assertEquals(AddressFamilyType.IPV6, model.addressFamilyType()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java new file mode 100644 index 000000000000..bc79b09df1d4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPatchPropertiesTests.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; +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.RoutePolicyStatementPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RoutePolicyStatementPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePolicyStatementPatchProperties model = BinaryData.fromString( + "{\"annotation\":\"huecxhgs\",\"sequenceNumber\":7443427515990293734,\"condition\":{\"ipCommunityIds\":[\"pavsfgvrvqrww\"],\"ipExtendedCommunityIds\":[\"wroqkljnzpqhqq\",\"arkyulfamea\",\"sjqenh\"],\"type\":\"And\",\"ipPrefixId\":\"zvgeytlplslfc\"},\"action\":{\"localPreference\":4957704029937860631,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"olkyqfnj\",\"crhnx\",\"mfv\"]},\"delete\":{\"ipCommunityIds\":[\"rtcsrawwhyxfshm\"]},\"set\":{\"ipCommunityIds\":[\"vwnbu\",\"sodtevzshqyke\",\"mpshaezcldkckrn\",\"vqdmhcejstfsm\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"gkq\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"soq\",\"hxwdjoxwkbdh\",\"obvcnsbioez\",\"lfhn\"]},\"set\":{\"ipExtendedCommunityIds\":[\"fzqyugtkxnc\"]}}}}") + .toObject(RoutePolicyStatementPatchProperties.class); + Assertions.assertEquals("huecxhgs", model.annotation()); + Assertions.assertEquals(7443427515990293734L, model.sequenceNumber()); + Assertions.assertEquals("pavsfgvrvqrww", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("wroqkljnzpqhqq", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("zvgeytlplslfc", model.condition().ipPrefixId()); + Assertions.assertEquals(4957704029937860631L, model.action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.action().actionType()); + Assertions.assertEquals("olkyqfnj", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("rtcsrawwhyxfshm", + model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("vwnbu", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("gkq", + model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("soq", + model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("fzqyugtkxnc", + model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutePolicyStatementPatchProperties model = new RoutePolicyStatementPatchProperties().withAnnotation("huecxhgs") + .withSequenceNumber(7443427515990293734L) + .withCondition(new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList("pavsfgvrvqrww")) + .withIpExtendedCommunityIds(Arrays.asList("wroqkljnzpqhqq", "arkyulfamea", "sjqenh")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("zvgeytlplslfc")) + .withAction(new StatementActionPatchProperties().withLocalPreference(4957704029937860631L) + .withActionType(RoutePolicyActionType.DENY) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("olkyqfnj", "crhnx", "mfv"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("rtcsrawwhyxfshm"))) + .withSet(new IpCommunityIdList().withIpCommunityIds( + Arrays.asList("vwnbu", "sodtevzshqyke", "mpshaezcldkckrn", "vqdmhcejstfsm")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("gkq"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("soq", "hxwdjoxwkbdh", "obvcnsbioez", "lfhn"))) + .withSet( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("fzqyugtkxnc"))))); + model = BinaryData.fromObject(model).toObject(RoutePolicyStatementPatchProperties.class); + Assertions.assertEquals("huecxhgs", model.annotation()); + Assertions.assertEquals(7443427515990293734L, model.sequenceNumber()); + Assertions.assertEquals("pavsfgvrvqrww", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("wroqkljnzpqhqq", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("zvgeytlplslfc", model.condition().ipPrefixId()); + Assertions.assertEquals(4957704029937860631L, model.action().localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.action().actionType()); + Assertions.assertEquals("olkyqfnj", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("rtcsrawwhyxfshm", + model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("vwnbu", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("gkq", + model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("soq", + model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("fzqyugtkxnc", + model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } +} 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 index 04f666ee172c..eabc372a9846 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -21,70 +21,66 @@ public final class RoutePolicyStatementPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RoutePolicyStatementProperties model = BinaryData.fromString( - "{\"sequenceNumber\":7155823942423502567,\"condition\":{\"type\":\"Or\",\"ipPrefixId\":\"eeoxvqjmrnbl\",\"ipExtendedCommunityIds\":[\"dbfbmdiv\",\"xzhpjgqzmiaoawea\",\"fxaubuhruetcnx\"],\"ipCommunityIds\":[\"zzdckhs\",\"drrjsu\",\"nowobwx\"]},\"action\":{\"localPreference\":836975660473857424,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"sfjfouqjpzheahu\",\"kqxqkva\"]},\"set\":{\"ipCommunityIds\":[\"ymudj\",\"aajzdebhsermcl\"]},\"add\":{\"ipCommunityIds\":[\"uhyqkaaptbssv\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"twybloccuhplxzbn\",\"shvqnpszbeuyb\",\"tc\",\"zjfjtvpey\"]},\"set\":{\"ipExtendedCommunityIds\":[\"xurxrltqmmijgp\",\"fkwnaeikczscymqf\"]},\"add\":{\"ipExtendedCommunityIds\":[\"pqnyumzapdok\"]}}},\"annotation\":\"vpezknfzqnzbflbq\"}") + "{\"annotation\":\"eqkittlrgl\",\"sequenceNumber\":7170541939379551083,\"condition\":{\"ipCommunityIds\":[\"nguhbnhogsezre\",\"eggpdtyzpxlit\",\"kejmgemudupehsk\"],\"ipExtendedCommunityIds\":[\"fvhrypez\"],\"type\":\"And\",\"ipPrefixId\":\"kapvnpeukgn\"},\"action\":{\"localPreference\":3889456529246346448,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"romlcs\",\"kt\",\"psrowshvf\"]},\"delete\":{\"ipCommunityIds\":[\"law\",\"vdyqabjropxfqdm\",\"lznyjyuw\"]},\"set\":{\"ipCommunityIds\":[\"gdpvhwirilam\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"doxdegacdedpkw\",\"to\",\"pgdcidp\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"rm\"]},\"set\":{\"ipExtendedCommunityIds\":[\"irqqclsaqife\",\"dureevivk\"]}}}}") .toObject(RoutePolicyStatementProperties.class); - Assertions.assertEquals("vpezknfzqnzbflbq", model.annotation()); - Assertions.assertEquals(7155823942423502567L, model.sequenceNumber()); - Assertions.assertEquals("zzdckhs", model.condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.condition().type()); - Assertions.assertEquals("eeoxvqjmrnbl", model.condition().ipPrefixId()); - Assertions.assertEquals("dbfbmdiv", model.condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(836975660473857424L, model.action().localPreference()); + Assertions.assertEquals("eqkittlrgl", model.annotation()); + Assertions.assertEquals(7170541939379551083L, model.sequenceNumber()); + Assertions.assertEquals("nguhbnhogsezre", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("fvhrypez", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("kapvnpeukgn", model.condition().ipPrefixId()); + Assertions.assertEquals(3889456529246346448L, model.action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.action().actionType()); - Assertions.assertEquals("uhyqkaaptbssv", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("sfjfouqjpzheahu", - model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("ymudj", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("pqnyumzapdok", + Assertions.assertEquals("romlcs", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("law", model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("gdpvhwirilam", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("doxdegacdedpkw", model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("twybloccuhplxzbn", + Assertions.assertEquals("rm", model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("xurxrltqmmijgp", + Assertions.assertEquals("irqqclsaqife", model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RoutePolicyStatementProperties model - = new RoutePolicyStatementProperties().withAnnotation("vpezknfzqnzbflbq") - .withSequenceNumber(7155823942423502567L) - .withCondition(new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("zzdckhs", "drrjsu", "nowobwx")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("eeoxvqjmrnbl") - .withIpExtendedCommunityIds(Arrays.asList("dbfbmdiv", "xzhpjgqzmiaoawea", "fxaubuhruetcnx"))) - .withAction(new StatementActionProperties().withLocalPreference(836975660473857424L) - .withActionType(RoutePolicyActionType.CONTINUE) - .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("uhyqkaaptbssv"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("sfjfouqjpzheahu", "kqxqkva"))) - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("ymudj", "aajzdebhsermcl")))) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd( - new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("pqnyumzapdok"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds( - Arrays.asList("twybloccuhplxzbn", "shvqnpszbeuyb", "tc", "zjfjtvpey"))) - .withSet(new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("xurxrltqmmijgp", "fkwnaeikczscymqf"))))); + RoutePolicyStatementProperties model = new RoutePolicyStatementProperties().withAnnotation("eqkittlrgl") + .withSequenceNumber(7170541939379551083L) + .withCondition(new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("nguhbnhogsezre", "eggpdtyzpxlit", "kejmgemudupehsk")) + .withIpExtendedCommunityIds(Arrays.asList("fvhrypez")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("kapvnpeukgn")) + .withAction(new StatementActionProperties().withLocalPreference(3889456529246346448L) + .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityProperties(new ActionIpCommunityProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("romlcs", "kt", "psrowshvf"))) + .withDelete( + new IpCommunityIdList().withIpCommunityIds(Arrays.asList("law", "vdyqabjropxfqdm", "lznyjyuw"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("gdpvhwirilam")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() + .withAdd(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("doxdegacdedpkw", "to", "pgdcidp"))) + .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("rm"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("irqqclsaqife", "dureevivk"))))); model = BinaryData.fromObject(model).toObject(RoutePolicyStatementProperties.class); - Assertions.assertEquals("vpezknfzqnzbflbq", model.annotation()); - Assertions.assertEquals(7155823942423502567L, model.sequenceNumber()); - Assertions.assertEquals("zzdckhs", model.condition().ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.condition().type()); - Assertions.assertEquals("eeoxvqjmrnbl", model.condition().ipPrefixId()); - Assertions.assertEquals("dbfbmdiv", model.condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(836975660473857424L, model.action().localPreference()); + Assertions.assertEquals("eqkittlrgl", model.annotation()); + Assertions.assertEquals(7170541939379551083L, model.sequenceNumber()); + Assertions.assertEquals("nguhbnhogsezre", model.condition().ipCommunityIds().get(0)); + Assertions.assertEquals("fvhrypez", model.condition().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.condition().type()); + Assertions.assertEquals("kapvnpeukgn", model.condition().ipPrefixId()); + Assertions.assertEquals(3889456529246346448L, model.action().localPreference()); Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.action().actionType()); - Assertions.assertEquals("uhyqkaaptbssv", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("sfjfouqjpzheahu", - model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("ymudj", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("pqnyumzapdok", + Assertions.assertEquals("romlcs", model.action().ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("law", model.action().ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("gdpvhwirilam", model.action().ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("doxdegacdedpkw", model.action().ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("twybloccuhplxzbn", + Assertions.assertEquals("rm", model.action().ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("xurxrltqmmijgp", + Assertions.assertEquals("irqqclsaqife", model.action().ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java new file mode 100644 index 000000000000..bfd40a7044b5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPatchPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class RoutePrefixLimitPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePrefixLimitPatchProperties model + = BinaryData.fromString("{\"hardLimit\":1106054303,\"threshold\":382669435}") + .toObject(RoutePrefixLimitPatchProperties.class); + Assertions.assertEquals(1106054303, model.hardLimit()); + Assertions.assertEquals(382669435, model.threshold()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutePrefixLimitPatchProperties model + = new RoutePrefixLimitPatchProperties().withHardLimit(1106054303).withThreshold(382669435); + model = BinaryData.fromObject(model).toObject(RoutePrefixLimitPatchProperties.class); + Assertions.assertEquals(1106054303, model.hardLimit()); + Assertions.assertEquals(382669435, model.threshold()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java new file mode 100644 index 000000000000..3cf2e4dd86b8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePrefixLimitPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePrefixLimitProperties; +import org.junit.jupiter.api.Assertions; + +public final class RoutePrefixLimitPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RoutePrefixLimitProperties model = BinaryData.fromString("{\"hardLimit\":1912910979,\"threshold\":1824216847}") + .toObject(RoutePrefixLimitProperties.class); + Assertions.assertEquals(1912910979, model.hardLimit()); + Assertions.assertEquals(1824216847, model.threshold()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RoutePrefixLimitProperties model + = new RoutePrefixLimitProperties().withHardLimit(1912910979).withThreshold(1824216847); + model = BinaryData.fromObject(model).toObject(RoutePrefixLimitProperties.class); + Assertions.assertEquals(1912910979, model.hardLimit()); + Assertions.assertEquals(1824216847, model.threshold()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java index 7db04fe30785..b7455700fb65 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,25 +13,24 @@ public final class RouteTargetInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RouteTargetInformation model = BinaryData.fromString( - "{\"importIpv4RouteTargets\":[\"cmh\",\"dfjeceho\",\"wcpqtwl\"],\"importIpv6RouteTargets\":[\"qrg\",\"vrbnyrukoil\",\"ciduwjle\",\"pjlh\"],\"exportIpv4RouteTargets\":[\"p\",\"ruzythqkkwhbg\",\"vellvulnxdmnitm\"],\"exportIpv6RouteTargets\":[\"tvmcly\"]}") + "{\"importIpv4RouteTargets\":[\"vhuw\"],\"importIpv6RouteTargets\":[\"pcqzg\"],\"exportIpv4RouteTargets\":[\"tjecohm\",\"vvlrrskapbxwiee\",\"uyader\"],\"exportIpv6RouteTargets\":[\"okyk\",\"yimyccgrvk\"]}") .toObject(RouteTargetInformation.class); - Assertions.assertEquals("cmh", model.importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qrg", model.importIpv6RouteTargets().get(0)); - Assertions.assertEquals("p", model.exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("tvmcly", model.exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("vhuw", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("pcqzg", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("tjecohm", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("okyk", model.exportIpv6RouteTargets().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RouteTargetInformation model - = new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("cmh", "dfjeceho", "wcpqtwl")) - .withImportIpv6RouteTargets(Arrays.asList("qrg", "vrbnyrukoil", "ciduwjle", "pjlh")) - .withExportIpv4RouteTargets(Arrays.asList("p", "ruzythqkkwhbg", "vellvulnxdmnitm")) - .withExportIpv6RouteTargets(Arrays.asList("tvmcly")); + RouteTargetInformation model = new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("vhuw")) + .withImportIpv6RouteTargets(Arrays.asList("pcqzg")) + .withExportIpv4RouteTargets(Arrays.asList("tjecohm", "vvlrrskapbxwiee", "uyader")) + .withExportIpv6RouteTargets(Arrays.asList("okyk", "yimyccgrvk")); model = BinaryData.fromObject(model).toObject(RouteTargetInformation.class); - Assertions.assertEquals("cmh", model.importIpv4RouteTargets().get(0)); - Assertions.assertEquals("qrg", model.importIpv6RouteTargets().get(0)); - Assertions.assertEquals("p", model.exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("tvmcly", model.exportIpv6RouteTargets().get(0)); + Assertions.assertEquals("vhuw", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("pcqzg", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("tjecohm", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("okyk", model.exportIpv6RouteTargets().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java new file mode 100644 index 000000000000..d916817fdde9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RouteTargetPatchInformationTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RouteTargetPatchInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RouteTargetPatchInformation model = BinaryData.fromString( + "{\"importIpv4RouteTargets\":[\"chg\"],\"importIpv6RouteTargets\":[\"smvxodgw\",\"f\",\"zsifcuvbdujgcwx\"],\"exportIpv4RouteTargets\":[\"bbwjtrdxrizagb\",\"giarksykpgdqxw\",\"b\"],\"exportIpv6RouteTargets\":[\"iqrxhaclcdosq\",\"ptjq\",\"kifmmainw\",\"edxkpbqwuntob\"]}") + .toObject(RouteTargetPatchInformation.class); + Assertions.assertEquals("chg", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("smvxodgw", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("bbwjtrdxrizagb", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("iqrxhaclcdosq", model.exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RouteTargetPatchInformation model + = new RouteTargetPatchInformation().withImportIpv4RouteTargets(Arrays.asList("chg")) + .withImportIpv6RouteTargets(Arrays.asList("smvxodgw", "f", "zsifcuvbdujgcwx")) + .withExportIpv4RouteTargets(Arrays.asList("bbwjtrdxrizagb", "giarksykpgdqxw", "b")) + .withExportIpv6RouteTargets(Arrays.asList("iqrxhaclcdosq", "ptjq", "kifmmainw", "edxkpbqwuntob")); + model = BinaryData.fromObject(model).toObject(RouteTargetPatchInformation.class); + Assertions.assertEquals("chg", model.importIpv4RouteTargets().get(0)); + Assertions.assertEquals("smvxodgw", model.importIpv6RouteTargets().get(0)); + Assertions.assertEquals("bbwjtrdxrizagb", model.exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("iqrxhaclcdosq", model.exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java index 70c9a321e859..925eaa34e7db 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RulePropertiesTests.java @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.HeaderAddressProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RuleCondition; import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -13,18 +15,39 @@ public final class RulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RuleProperties model = BinaryData.fromString("{\"action\":\"Deny\",\"addressList\":[\"mozusgzvlnsnnjz\"]}") + RuleProperties model = BinaryData.fromString( + "{\"action\":\"Deny\",\"addressList\":[\"ctwwgzw\",\"jlmec\"],\"condition\":\"And\",\"destinationAddressList\":[\"zyvneezaifghtmo\",\"qtlffhzbk\"],\"sourceAddressList\":[\"jjavfq\",\"vhnqo\",\"wdogiyetesyp\"],\"headerAddressList\":[{\"headerName\":\"ztjhqtfbovnynkbw\",\"addressList\":[\"juhpsprkzyau\",\"ia\",\"cxnafbwqrooh\"]},{\"headerName\":\"ovmaonurjtum\",\"addressList\":[\"hpv\",\"cmslclblyjxltbs\",\"uscv\",\"f\"]},{\"headerName\":\"gctmgxuupbezq\",\"addressList\":[\"drtc\",\"ukdqkkyihztg\"]}]}") .toObject(RuleProperties.class); Assertions.assertEquals(Action.DENY, model.action()); - Assertions.assertEquals("mozusgzvlnsnnjz", model.addressList().get(0)); + Assertions.assertEquals("ctwwgzw", model.addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.condition()); + Assertions.assertEquals("zyvneezaifghtmo", model.destinationAddressList().get(0)); + Assertions.assertEquals("jjavfq", model.sourceAddressList().get(0)); + Assertions.assertEquals("ztjhqtfbovnynkbw", model.headerAddressList().get(0).headerName()); + Assertions.assertEquals("juhpsprkzyau", model.headerAddressList().get(0).addressList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RuleProperties model - = new RuleProperties().withAction(Action.DENY).withAddressList(Arrays.asList("mozusgzvlnsnnjz")); + RuleProperties model = new RuleProperties().withAction(Action.DENY) + .withAddressList(Arrays.asList("ctwwgzw", "jlmec")) + .withCondition(RuleCondition.AND) + .withDestinationAddressList(Arrays.asList("zyvneezaifghtmo", "qtlffhzbk")) + .withSourceAddressList(Arrays.asList("jjavfq", "vhnqo", "wdogiyetesyp")) + .withHeaderAddressList(Arrays.asList( + new HeaderAddressProperties().withHeaderName("ztjhqtfbovnynkbw") + .withAddressList(Arrays.asList("juhpsprkzyau", "ia", "cxnafbwqrooh")), + new HeaderAddressProperties().withHeaderName("ovmaonurjtum") + .withAddressList(Arrays.asList("hpv", "cmslclblyjxltbs", "uscv", "f")), + new HeaderAddressProperties().withHeaderName("gctmgxuupbezq") + .withAddressList(Arrays.asList("drtc", "ukdqkkyihztg")))); model = BinaryData.fromObject(model).toObject(RuleProperties.class); Assertions.assertEquals(Action.DENY, model.action()); - Assertions.assertEquals("mozusgzvlnsnnjz", model.addressList().get(0)); + Assertions.assertEquals("ctwwgzw", model.addressList().get(0)); + Assertions.assertEquals(RuleCondition.AND, model.condition()); + Assertions.assertEquals("zyvneezaifghtmo", model.destinationAddressList().get(0)); + Assertions.assertEquals("jjavfq", model.sourceAddressList().get(0)); + Assertions.assertEquals("ztjhqtfbovnynkbw", model.headerAddressList().get(0).headerName()); + Assertions.assertEquals("juhpsprkzyau", model.headerAddressList().get(0).addressList().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java new file mode 100644 index 000000000000..5884f3752fa6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPatchPropertiesTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties; +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.StatementActionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StatementActionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StatementActionPatchProperties model = BinaryData.fromString( + "{\"localPreference\":7521649642249029012,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"brdcvoloxtvqcb\",\"ryhmmglv\",\"b\"]},\"delete\":{\"ipCommunityIds\":[\"svok\"]},\"set\":{\"ipCommunityIds\":[\"kxvcptfgfbhnkxas\",\"mafe\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"rdxpcpautfzptr\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"trtffvpkdxcyuwe\",\"bqvprawvoqatd\",\"kaldpmecs\"]},\"set\":{\"ipExtendedCommunityIds\":[\"ynfemqyqkkpg\"]}}}") + .toObject(StatementActionPatchProperties.class); + Assertions.assertEquals(7521649642249029012L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.actionType()); + Assertions.assertEquals("brdcvoloxtvqcb", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("svok", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("kxvcptfgfbhnkxas", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("rdxpcpautfzptr", + model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("trtffvpkdxcyuwe", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("ynfemqyqkkpg", + model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StatementActionPatchProperties model = new StatementActionPatchProperties() + .withLocalPreference(7521649642249029012L) + .withActionType(RoutePolicyActionType.CONTINUE) + .withIpCommunityProperties(new ActionIpCommunityPatchProperties() + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("brdcvoloxtvqcb", "ryhmmglv", "b"))) + .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("svok"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("kxvcptfgfbhnkxas", "mafe")))) + .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityPatchProperties() + .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("rdxpcpautfzptr"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("trtffvpkdxcyuwe", "bqvprawvoqatd", "kaldpmecs"))) + .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ynfemqyqkkpg")))); + model = BinaryData.fromObject(model).toObject(StatementActionPatchProperties.class); + Assertions.assertEquals(7521649642249029012L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.actionType()); + Assertions.assertEquals("brdcvoloxtvqcb", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("svok", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("kxvcptfgfbhnkxas", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("rdxpcpautfzptr", + model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("trtffvpkdxcyuwe", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("ynfemqyqkkpg", + model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + } +} 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 index 43fdbec3618f..179c4ecd3597 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -18,43 +18,44 @@ public final class StatementActionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatementActionProperties model = BinaryData.fromString( - "{\"localPreference\":9104169219578934391,\"actionType\":\"Continue\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"dwdsoqtbfkvuozbz\",\"hn\",\"ekwanklp\",\"rlcydjht\"]},\"set\":{\"ipCommunityIds\":[\"rwiyndurdonkgobx\"]},\"add\":{\"ipCommunityIds\":[\"olenrswknpdr\",\"nmzaofro\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"ie\",\"yr\"]},\"set\":{\"ipExtendedCommunityIds\":[\"ybkqftus\"]},\"add\":{\"ipExtendedCommunityIds\":[\"rtvvbucn\"]}}}") + "{\"localPreference\":7379276183073967468,\"actionType\":\"Deny\",\"ipCommunityProperties\":{\"add\":{\"ipCommunityIds\":[\"pgbbzdsluo\",\"ce\"]},\"delete\":{\"ipCommunityIds\":[\"ddpwmgw\",\"wukfjvqglaxseisv\",\"vg\",\"phheove\"]},\"set\":{\"ipCommunityIds\":[\"lecztl\",\"h\"]}},\"ipExtendedCommunityProperties\":{\"add\":{\"ipExtendedCommunityIds\":[\"vfssrg\",\"qefnquoll\"]},\"delete\":{\"ipExtendedCommunityIds\":[\"muzembqqiehdhjof\",\"wwnaxoxlo\"]},\"set\":{\"ipExtendedCommunityIds\":[\"lqcxut\",\"vpaglyyh\",\"g\"]}}}") .toObject(StatementActionProperties.class); - Assertions.assertEquals(9104169219578934391L, model.localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.actionType()); - Assertions.assertEquals("olenrswknpdr", model.ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dwdsoqtbfkvuozbz", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("rwiyndurdonkgobx", model.ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("rtvvbucn", - model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ie", model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ybkqftus", - model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(7379276183073967468L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.actionType()); + Assertions.assertEquals("pgbbzdsluo", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("ddpwmgw", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("lecztl", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("vfssrg", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("muzembqqiehdhjof", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("lqcxut", model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatementActionProperties model = new StatementActionProperties().withLocalPreference(9104169219578934391L) - .withActionType(RoutePolicyActionType.CONTINUE) + StatementActionProperties model = new StatementActionProperties().withLocalPreference(7379276183073967468L) + .withActionType(RoutePolicyActionType.DENY) .withIpCommunityProperties(new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("olenrswknpdr", "nmzaofro"))) + .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("pgbbzdsluo", "ce"))) .withDelete(new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("dwdsoqtbfkvuozbz", "hn", "ekwanklp", "rlcydjht"))) - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("rwiyndurdonkgobx")))) + .withIpCommunityIds(Arrays.asList("ddpwmgw", "wukfjvqglaxseisv", "vg", "phheove"))) + .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("lecztl", "h")))) .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties() - .withAdd(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("rtvvbucn"))) - .withDelete(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ie", "yr"))) - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("ybkqftus")))); + .withAdd( + new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("vfssrg", "qefnquoll"))) + .withDelete(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("muzembqqiehdhjof", "wwnaxoxlo"))) + .withSet(new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds(Arrays.asList("lqcxut", "vpaglyyh", "g")))); model = BinaryData.fromObject(model).toObject(StatementActionProperties.class); - Assertions.assertEquals(9104169219578934391L, model.localPreference()); - Assertions.assertEquals(RoutePolicyActionType.CONTINUE, model.actionType()); - Assertions.assertEquals("olenrswknpdr", model.ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("dwdsoqtbfkvuozbz", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("rwiyndurdonkgobx", model.ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions.assertEquals("rtvvbucn", - model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ie", model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("ybkqftus", - model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(7379276183073967468L, model.localPreference()); + Assertions.assertEquals(RoutePolicyActionType.DENY, model.actionType()); + Assertions.assertEquals("pgbbzdsluo", model.ipCommunityProperties().add().ipCommunityIds().get(0)); + Assertions.assertEquals("ddpwmgw", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); + Assertions.assertEquals("lecztl", model.ipCommunityProperties().set().ipCommunityIds().get(0)); + Assertions.assertEquals("vfssrg", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("muzembqqiehdhjof", + model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("lqcxut", model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java new file mode 100644 index 000000000000..1eddc3dae689 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPatchPropertiesTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StatementConditionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StatementConditionPatchProperties model = BinaryData.fromString( + "{\"ipCommunityIds\":[\"tnlrlcmwbejyw\"],\"ipExtendedCommunityIds\":[\"nhw\",\"krmqevrhhafqf\",\"dfyziruqvgnjxi\"],\"type\":\"And\",\"ipPrefixId\":\"jmzbmxg\"}") + .toObject(StatementConditionPatchProperties.class); + Assertions.assertEquals("tnlrlcmwbejyw", model.ipCommunityIds().get(0)); + Assertions.assertEquals("nhw", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.type()); + Assertions.assertEquals("jmzbmxg", model.ipPrefixId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StatementConditionPatchProperties model + = new StatementConditionPatchProperties().withIpCommunityIds(Arrays.asList("tnlrlcmwbejyw")) + .withIpExtendedCommunityIds(Arrays.asList("nhw", "krmqevrhhafqf", "dfyziruqvgnjxi")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("jmzbmxg"); + model = BinaryData.fromObject(model).toObject(StatementConditionPatchProperties.class); + Assertions.assertEquals("tnlrlcmwbejyw", model.ipCommunityIds().get(0)); + Assertions.assertEquals("nhw", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.type()); + Assertions.assertEquals("jmzbmxg", model.ipPrefixId()); + } +} 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 index 5371bb138721..411646ef352b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -14,25 +14,25 @@ public final class StatementConditionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatementConditionProperties model = BinaryData.fromString( - "{\"type\":\"Or\",\"ipPrefixId\":\"yxxvwedhagqbbse\",\"ipExtendedCommunityIds\":[\"yuflmsyzzdcrolrz\",\"sb\",\"mphzkymunw\"],\"ipCommunityIds\":[\"tbuszbd\",\"rdf\"]}") + "{\"ipCommunityIds\":[\"ioklsuffp\",\"eswc\",\"lfytbltytvnpbgce\"],\"ipExtendedCommunityIds\":[\"dfclmowurofofkbc\",\"zzwweoblb\",\"dq\"],\"type\":\"And\",\"ipPrefixId\":\"ccnkfsogvy\"}") .toObject(StatementConditionProperties.class); - Assertions.assertEquals("tbuszbd", model.ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.type()); - Assertions.assertEquals("yxxvwedhagqbbse", model.ipPrefixId()); - Assertions.assertEquals("yuflmsyzzdcrolrz", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("ioklsuffp", model.ipCommunityIds().get(0)); + Assertions.assertEquals("dfclmowurofofkbc", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.type()); + Assertions.assertEquals("ccnkfsogvy", model.ipPrefixId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatementConditionProperties model - = new StatementConditionProperties().withIpCommunityIds(Arrays.asList("tbuszbd", "rdf")) - .withType(RoutePolicyConditionType.OR) - .withIpPrefixId("yxxvwedhagqbbse") - .withIpExtendedCommunityIds(Arrays.asList("yuflmsyzzdcrolrz", "sb", "mphzkymunw")); + StatementConditionProperties model = new StatementConditionProperties() + .withIpCommunityIds(Arrays.asList("ioklsuffp", "eswc", "lfytbltytvnpbgce")) + .withIpExtendedCommunityIds(Arrays.asList("dfclmowurofofkbc", "zzwweoblb", "dq")) + .withType(RoutePolicyConditionType.AND) + .withIpPrefixId("ccnkfsogvy"); model = BinaryData.fromObject(model).toObject(StatementConditionProperties.class); - Assertions.assertEquals("tbuszbd", model.ipCommunityIds().get(0)); - Assertions.assertEquals(RoutePolicyConditionType.OR, model.type()); - Assertions.assertEquals("yxxvwedhagqbbse", model.ipPrefixId()); - Assertions.assertEquals("yuflmsyzzdcrolrz", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals("ioklsuffp", model.ipCommunityIds().get(0)); + Assertions.assertEquals("dfclmowurofofkbc", model.ipExtendedCommunityIds().get(0)); + Assertions.assertEquals(RoutePolicyConditionType.AND, model.type()); + Assertions.assertEquals("ccnkfsogvy", model.ipPrefixId()); } } 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 index afd948e6c4cb..84cb7254a954 100644 --- 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.Extension; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; @@ -15,39 +16,36 @@ public final class StaticRouteConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StaticRouteConfiguration model = BinaryData.fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":311792360,\"multiplier\":1817187769},\"ipv4Routes\":[{\"prefix\":\"tyvkunmignohi\",\"nextHop\":[\"gqogjwpindedva\",\"bxbhmedeilbj\"]},{\"prefix\":\"wfcfxzirzz\",\"nextHop\":[\"vwypusuvjsl\",\"zwci\"]},{\"prefix\":\"djsllfr\",\"nextHop\":[\"dmvxadq\",\"cfrgnawbabgfbkt\",\"jmfczlfsyqkf\"]},{\"prefix\":\"bzgowoxqmje\",\"nextHop\":[\"cxn\"]}],\"ipv6Routes\":[{\"prefix\":\"xhlusrvxis\",\"nextHop\":[\"jceagb\",\"qvlsumywzas\",\"xgo\"]},{\"prefix\":\"oyjfqipu\",\"nextHop\":[\"znclkfkeebgv\",\"pemtuoqu\",\"l\"]}]}") + "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":418707975,\"multiplier\":1871850026},\"ipv4Routes\":[{\"prefix\":\"pq\",\"nextHop\":[\"vh\",\"mfowgwbtmkek\",\"pkzwa\"]},{\"prefix\":\"xofqovchi\",\"nextHop\":[\"p\",\"vf\"]},{\"prefix\":\"dusztekxby\",\"nextHop\":[\"msfe\",\"x\",\"ihpq\"]}],\"ipv6Routes\":[{\"prefix\":\"grhrdic\",\"nextHop\":[\"wyjfowxwyovcxjs\"]}],\"extension\":\"NPB\"}") .toObject(StaticRouteConfiguration.class); - Assertions.assertEquals(311792360, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1817187769, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("tyvkunmignohi", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gqogjwpindedva", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("xhlusrvxis", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jceagb", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(418707975, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1871850026, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("pq", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("vh", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("grhrdic", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("wyjfowxwyovcxjs", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, model.extension()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StaticRouteConfiguration model = new StaticRouteConfiguration() .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(311792360).withMultiplier(1817187769)) + new BfdConfiguration().withIntervalInMilliSeconds(418707975).withMultiplier(1871850026)) .withIpv4Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("tyvkunmignohi") - .withNextHop(Arrays.asList("gqogjwpindedva", "bxbhmedeilbj")), - new StaticRouteProperties().withPrefix("wfcfxzirzz").withNextHop(Arrays.asList("vwypusuvjsl", "zwci")), - new StaticRouteProperties().withPrefix("djsllfr") - .withNextHop(Arrays.asList("dmvxadq", "cfrgnawbabgfbkt", "jmfczlfsyqkf")), - new StaticRouteProperties().withPrefix("bzgowoxqmje").withNextHop(Arrays.asList("cxn")))) + new StaticRouteProperties().withPrefix("pq").withNextHop(Arrays.asList("vh", "mfowgwbtmkek", "pkzwa")), + new StaticRouteProperties().withPrefix("xofqovchi").withNextHop(Arrays.asList("p", "vf")), + new StaticRouteProperties().withPrefix("dusztekxby").withNextHop(Arrays.asList("msfe", "x", "ihpq")))) .withIpv6Routes(Arrays.asList( - new StaticRouteProperties().withPrefix("xhlusrvxis") - .withNextHop(Arrays.asList("jceagb", "qvlsumywzas", "xgo")), - new StaticRouteProperties().withPrefix("oyjfqipu") - .withNextHop(Arrays.asList("znclkfkeebgv", "pemtuoqu", "l")))); + new StaticRouteProperties().withPrefix("grhrdic").withNextHop(Arrays.asList("wyjfowxwyovcxjs")))) + .withExtension(Extension.NPB); model = BinaryData.fromObject(model).toObject(StaticRouteConfiguration.class); - Assertions.assertEquals(311792360, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1817187769, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("tyvkunmignohi", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("gqogjwpindedva", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("xhlusrvxis", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jceagb", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(418707975, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1871850026, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("pq", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("vh", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("grhrdic", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("wyjfowxwyovcxjs", model.ipv6Routes().get(0).nextHop().get(0)); + Assertions.assertEquals(Extension.NPB, model.extension()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java new file mode 100644 index 000000000000..20d1c59ea65a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchConfigurationTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StaticRoutePatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRoutePatchConfiguration model = BinaryData.fromString( + "{\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":902630998,\"multiplier\":838065856},\"ipv4Routes\":[{\"prefix\":\"kwbpjxljtxbusq\",\"nextHop\":[\"xxniuisdzhgbd\"]},{\"prefix\":\"zpa\",\"nextHop\":[\"ecnad\",\"u\",\"qrgxf\",\"lmqiynezoel\"]}],\"ipv6Routes\":[{\"prefix\":\"kiiwvmtu\",\"nextHop\":[\"pymdjfuax\",\"oqvqpilr\",\"uncanlduwzorx\"]}]}") + .toObject(StaticRoutePatchConfiguration.class); + Assertions.assertEquals(902630998, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(838065856, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("kwbpjxljtxbusq", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xxniuisdzhgbd", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("kiiwvmtu", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pymdjfuax", model.ipv6Routes().get(0).nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRoutePatchConfiguration model = new StaticRoutePatchConfiguration() + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(902630998).withMultiplier(838065856)) + .withIpv4Routes(Arrays.asList( + new StaticRoutePatchProperties().withPrefix("kwbpjxljtxbusq") + .withNextHop(Arrays.asList("xxniuisdzhgbd")), + new StaticRoutePatchProperties().withPrefix("zpa") + .withNextHop(Arrays.asList("ecnad", "u", "qrgxf", "lmqiynezoel")))) + .withIpv6Routes(Arrays.asList(new StaticRoutePatchProperties().withPrefix("kiiwvmtu") + .withNextHop(Arrays.asList("pymdjfuax", "oqvqpilr", "uncanlduwzorx")))); + model = BinaryData.fromObject(model).toObject(StaticRoutePatchConfiguration.class); + Assertions.assertEquals(902630998, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(838065856, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("kwbpjxljtxbusq", model.ipv4Routes().get(0).prefix()); + Assertions.assertEquals("xxniuisdzhgbd", model.ipv4Routes().get(0).nextHop().get(0)); + Assertions.assertEquals("kiiwvmtu", model.ipv6Routes().get(0).prefix()); + Assertions.assertEquals("pymdjfuax", model.ipv6Routes().get(0).nextHop().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java new file mode 100644 index 000000000000..b1b4e6bdeee8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePatchPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRoutePatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StaticRoutePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRoutePatchProperties model = BinaryData.fromString("{\"prefix\":\"bm\",\"nextHop\":[\"qk\",\"xym\"]}") + .toObject(StaticRoutePatchProperties.class); + Assertions.assertEquals("bm", model.prefix()); + Assertions.assertEquals("qk", model.nextHop().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRoutePatchProperties model + = new StaticRoutePatchProperties().withPrefix("bm").withNextHop(Arrays.asList("qk", "xym")); + model = BinaryData.fromObject(model).toObject(StaticRoutePatchProperties.class); + Assertions.assertEquals("bm", model.prefix()); + Assertions.assertEquals("qk", model.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 index 778bdd77447b..091b6bca73c3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,19 +12,19 @@ public final class StaticRoutePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StaticRouteProperties model = BinaryData - .fromString("{\"prefix\":\"egqavnigflqqb\",\"nextHop\":[\"yjpylxdbfva\",\"mvmsxbae\",\"wjcnkottl\"]}") - .toObject(StaticRouteProperties.class); - Assertions.assertEquals("egqavnigflqqb", model.prefix()); - Assertions.assertEquals("yjpylxdbfva", model.nextHop().get(0)); + StaticRouteProperties model + = BinaryData.fromString("{\"prefix\":\"pcukd\",\"nextHop\":[\"ksbuhoduchvlsc\",\"d\",\"ib\",\"dyjdussp\"]}") + .toObject(StaticRouteProperties.class); + Assertions.assertEquals("pcukd", model.prefix()); + Assertions.assertEquals("ksbuhoduchvlsc", model.nextHop().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StaticRouteProperties model = new StaticRouteProperties().withPrefix("egqavnigflqqb") - .withNextHop(Arrays.asList("yjpylxdbfva", "mvmsxbae", "wjcnkottl")); + StaticRouteProperties model = new StaticRouteProperties().withPrefix("pcukd") + .withNextHop(Arrays.asList("ksbuhoduchvlsc", "d", "ib", "dyjdussp")); model = BinaryData.fromObject(model).toObject(StaticRouteProperties.class); - Assertions.assertEquals("egqavnigflqqb", model.prefix()); - Assertions.assertEquals("yjpylxdbfva", model.nextHop().get(0)); + Assertions.assertEquals("pcukd", model.prefix()); + Assertions.assertEquals("ksbuhoduchvlsc", model.nextHop().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java new file mode 100644 index 000000000000..e137a0300ca9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyPatchTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicyPatch; +import org.junit.jupiter.api.Assertions; + +public final class StaticRouteRoutePolicyPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRouteRoutePolicyPatch model = BinaryData.fromString( + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"eqnkbrupobehdml\",\"exportIpv6RoutePolicyId\":\"acvumepj\"}}") + .toObject(StaticRouteRoutePolicyPatch.class); + Assertions.assertEquals("eqnkbrupobehdml", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("acvumepj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRouteRoutePolicyPatch model = new StaticRouteRoutePolicyPatch() + .withExportRoutePolicy(new L3ExportRoutePolicyPatch().withExportIpv4RoutePolicyId("eqnkbrupobehdml") + .withExportIpv6RoutePolicyId("acvumepj")); + model = BinaryData.fromObject(model).toObject(StaticRouteRoutePolicyPatch.class); + Assertions.assertEquals("eqnkbrupobehdml", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("acvumepj", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java new file mode 100644 index 000000000000..fc68b0890ff1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteRoutePolicyTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteRoutePolicy; +import org.junit.jupiter.api.Assertions; + +public final class StaticRouteRoutePolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StaticRouteRoutePolicy model = BinaryData.fromString( + "{\"exportRoutePolicy\":{\"exportIpv4RoutePolicyId\":\"dwq\",\"exportIpv6RoutePolicyId\":\"sfzygleexahv\"}}") + .toObject(StaticRouteRoutePolicy.class); + Assertions.assertEquals("dwq", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("sfzygleexahv", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StaticRouteRoutePolicy model = new StaticRouteRoutePolicy().withExportRoutePolicy( + new L3ExportRoutePolicy().withExportIpv4RoutePolicyId("dwq").withExportIpv6RoutePolicyId("sfzygleexahv")); + model = BinaryData.fromObject(model).toObject(StaticRouteRoutePolicy.class); + Assertions.assertEquals("dwq", model.exportRoutePolicy().exportIpv4RoutePolicyId()); + Assertions.assertEquals("sfzygleexahv", model.exportRoutePolicy().exportIpv6RoutePolicyId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java new file mode 100644 index 000000000000..e5383883e50c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPatchPropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class StationConnectionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StationConnectionPatchProperties model = BinaryData + .fromString("{\"keepaliveIdleTime\":1720297893,\"probeInterval\":461323934,\"probeCount\":823911898}") + .toObject(StationConnectionPatchProperties.class); + Assertions.assertEquals(1720297893, model.keepaliveIdleTime()); + Assertions.assertEquals(461323934, model.probeInterval()); + Assertions.assertEquals(823911898, model.probeCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StationConnectionPatchProperties model + = new StationConnectionPatchProperties().withKeepaliveIdleTime(1720297893) + .withProbeInterval(461323934) + .withProbeCount(823911898); + model = BinaryData.fromObject(model).toObject(StationConnectionPatchProperties.class); + Assertions.assertEquals(1720297893, model.keepaliveIdleTime()); + Assertions.assertEquals(461323934, model.probeInterval()); + Assertions.assertEquals(823911898, model.probeCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java new file mode 100644 index 000000000000..14d0cee92aef --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StationConnectionPropertiesTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.StationConnectionProperties; +import org.junit.jupiter.api.Assertions; + +public final class StationConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StationConnectionProperties model = BinaryData + .fromString("{\"keepaliveIdleTime\":1763835283,\"probeInterval\":628545070,\"probeCount\":574024594}") + .toObject(StationConnectionProperties.class); + Assertions.assertEquals(1763835283, model.keepaliveIdleTime()); + Assertions.assertEquals(628545070, model.probeInterval()); + Assertions.assertEquals(574024594, model.probeCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StationConnectionProperties model = new StationConnectionProperties().withKeepaliveIdleTime(1763835283) + .withProbeInterval(628545070) + .withProbeCount(574024594); + model = BinaryData.fromObject(model).toObject(StationConnectionProperties.class); + Assertions.assertEquals(1763835283, model.keepaliveIdleTime()); + Assertions.assertEquals(628545070, model.probeInterval()); + Assertions.assertEquals(574024594, model.probeCount()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java new file mode 100644 index 000000000000..0bfcfc13f296 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountConfigurationTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelector; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class StorageAccountConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageAccountConfiguration model = BinaryData.fromString( + "{\"storageAccountId\":\"putmgvmuyakm\",\"storageAccountIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"fowzkroyr\"}}") + .toObject(StorageAccountConfiguration.class); + Assertions.assertEquals("putmgvmuyakm", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("fowzkroyr", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageAccountConfiguration model = new StorageAccountConfiguration().withStorageAccountId("putmgvmuyakm") + .withStorageAccountIdentity( + new IdentitySelector().withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("fowzkroyr")); + model = BinaryData.fromObject(model).toObject(StorageAccountConfiguration.class); + Assertions.assertEquals("putmgvmuyakm", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("fowzkroyr", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java new file mode 100644 index 000000000000..872192ecd23e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StorageAccountPatchConfigurationTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.IdentitySelectorPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedServiceIdentitySelectorType; +import com.azure.resourcemanager.managednetworkfabric.models.StorageAccountPatchConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class StorageAccountPatchConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageAccountPatchConfiguration model = BinaryData.fromString( + "{\"storageAccountId\":\"ayspzvriet\",\"storageAccountIdentity\":{\"identityType\":\"UserAssignedIdentity\",\"userAssignedIdentityResourceId\":\"dzxplgtp\"}}") + .toObject(StorageAccountPatchConfiguration.class); + Assertions.assertEquals("ayspzvriet", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("dzxplgtp", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageAccountPatchConfiguration model + = new StorageAccountPatchConfiguration().withStorageAccountId("ayspzvriet") + .withStorageAccountIdentity(new IdentitySelectorPatch() + .withIdentityType(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY) + .withUserAssignedIdentityResourceId("dzxplgtp")); + model = BinaryData.fromObject(model).toObject(StorageAccountPatchConfiguration.class); + Assertions.assertEquals("ayspzvriet", model.storageAccountId()); + Assertions.assertEquals(ManagedServiceIdentitySelectorType.USER_ASSIGNED_IDENTITY, + model.storageAccountIdentity().identityType()); + Assertions.assertEquals("dzxplgtp", model.storageAccountIdentity().userAssignedIdentityResourceId()); + } +} 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 index 06528b94981f..db298efe7a86 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,9 @@ public final class SupportedConnectorPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedConnectorProperties model - = BinaryData.fromString("{\"connectorType\":\"omv\",\"maxSpeedInMbps\":1816993869}") + = BinaryData.fromString("{\"connectorType\":\"szrbwtdrcwg\",\"maxSpeedInMbps\":359520764}") .toObject(SupportedConnectorProperties.class); - Assertions.assertEquals("omv", model.connectorType()); - Assertions.assertEquals(1816993869, model.maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedConnectorProperties model - = new SupportedConnectorProperties().withConnectorType("omv").withMaxSpeedInMbps(1816993869); - model = BinaryData.fromObject(model).toObject(SupportedConnectorProperties.class); - Assertions.assertEquals("omv", model.connectorType()); - Assertions.assertEquals(1816993869, model.maxSpeedInMbps()); + Assertions.assertEquals("szrbwtdrcwg", model.connectorType()); + Assertions.assertEquals(359520764, 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 index 27ffd271ce4b..73428ea7cfc7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,24 +13,11 @@ public final class SupportedVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedVersionProperties model = BinaryData.fromString( - "{\"version\":\"gouarhwvixqq\",\"vendorOsVersion\":\"ljky\",\"vendorFirmwareVersion\":\"jrclrvtzq\",\"isDefault\":\"True\"}") + "{\"version\":\"qhfnkvycqqqds\",\"vendorOsVersion\":\"pnq\",\"vendorFirmwareVersion\":\"zxhrptyodlhkfktl\",\"isDefault\":\"False\"}") .toObject(SupportedVersionProperties.class); - Assertions.assertEquals("gouarhwvixqq", model.version()); - Assertions.assertEquals("ljky", model.vendorOsVersion()); - Assertions.assertEquals("jrclrvtzq", model.vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isDefault()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersionProperties model = new SupportedVersionProperties().withVersion("gouarhwvixqq") - .withVendorOsVersion("ljky") - .withVendorFirmwareVersion("jrclrvtzq") - .withIsDefault(BooleanEnumProperty.TRUE); - model = BinaryData.fromObject(model).toObject(SupportedVersionProperties.class); - Assertions.assertEquals("gouarhwvixqq", model.version()); - Assertions.assertEquals("ljky", model.vendorOsVersion()); - Assertions.assertEquals("jrclrvtzq", model.vendorFirmwareVersion()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isDefault()); + Assertions.assertEquals("qhfnkvycqqqds", model.version()); + Assertions.assertEquals("pnq", model.vendorOsVersion()); + Assertions.assertEquals("zxhrptyodlhkfktl", model.vendorFirmwareVersion()); + Assertions.assertEquals(BooleanEnumProperty.FALSE, model.isDefault()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java new file mode 100644 index 000000000000..de4a1d6222c2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPatchPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class UniqueRouteDistinguisherPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UniqueRouteDistinguisherPatchProperties model = BinaryData + .fromString( + "{\"uniqueRdConfigurationState\":\"Disabled\",\"nniDerivedUniqueRdConfigurationState\":\"Disabled\"}") + .toObject(UniqueRouteDistinguisherPatchProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UniqueRouteDistinguisherPatchProperties model = new UniqueRouteDistinguisherPatchProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.DISABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(UniqueRouteDistinguisherPatchProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java new file mode 100644 index 000000000000..c20b5484d6e2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UniqueRouteDistinguisherPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.UniqueRouteDistinguisherProperties; +import org.junit.jupiter.api.Assertions; + +public final class UniqueRouteDistinguisherPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UniqueRouteDistinguisherProperties model = BinaryData.fromString( + "{\"uniqueRdConfigurationState\":\"Disabled\",\"uniqueRds\":[\"qi\",\"rcltungbsoljckm\"],\"nniDerivedUniqueRdConfigurationState\":\"Disabled\"}") + .toObject(UniqueRouteDistinguisherProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UniqueRouteDistinguisherProperties model = new UniqueRouteDistinguisherProperties() + .withUniqueRdConfigurationState(UniqueRouteDistinguisherConfigurationState.DISABLED) + .withNniDerivedUniqueRdConfigurationState(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED); + model = BinaryData.fromObject(model).toObject(UniqueRouteDistinguisherProperties.class); + Assertions.assertEquals(UniqueRouteDistinguisherConfigurationState.DISABLED, + model.uniqueRdConfigurationState()); + Assertions.assertEquals(NNIDerivedUniqueRouteDistinguisherConfigurationState.DISABLED, + model.nniDerivedUniqueRdConfigurationState()); + } +} 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 index 99c2211c071b..ed0530168e77 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,18 +13,21 @@ public final class UpdateAdministrativeStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateAdministrativeState model = BinaryData.fromString("{\"state\":\"Enable\",\"resourceIds\":[\"vtzn\"]}") + UpdateAdministrativeState model = BinaryData + .fromString( + "{\"resourceIds\":[\"yybxubmdnafcbqw\",\"e\",\"jelaqacigele\",\"hdbvqvwzkjop\"],\"state\":\"Enable\"}") .toObject(UpdateAdministrativeState.class); - Assertions.assertEquals("vtzn", model.resourceIds().get(0)); + Assertions.assertEquals("yybxubmdnafcbqw", model.resourceIds().get(0)); Assertions.assertEquals(EnableDisableState.ENABLE, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateAdministrativeState model = new UpdateAdministrativeState().withResourceIds(Arrays.asList("vtzn")) + UpdateAdministrativeState model = new UpdateAdministrativeState() + .withResourceIds(Arrays.asList("yybxubmdnafcbqw", "e", "jelaqacigele", "hdbvqvwzkjop")) .withState(EnableDisableState.ENABLE); model = BinaryData.fromObject(model).toObject(UpdateAdministrativeState.class); - Assertions.assertEquals("vtzn", model.resourceIds().get(0)); + Assertions.assertEquals("yybxubmdnafcbqw", model.resourceIds().get(0)); Assertions.assertEquals(EnableDisableState.ENABLE, model.state()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java index d1575da4e7dd..f1e77758d8bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateDeviceAdministrativeStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,20 +13,20 @@ public final class UpdateDeviceAdministrativeStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateDeviceAdministrativeState model = BinaryData.fromString( - "{\"state\":\"Resync\",\"resourceIds\":[\"aprhknqiijgencdg\",\"oqueqihkkyowltj\",\"uwhldxwhieproqks\"]}") - .toObject(UpdateDeviceAdministrativeState.class); - Assertions.assertEquals("aprhknqiijgencdg", model.resourceIds().get(0)); - Assertions.assertEquals(DeviceAdministrativeState.RESYNC, model.state()); + UpdateDeviceAdministrativeState model + = BinaryData.fromString("{\"resourceIds\":[\"wdxomrawp\",\"keboo\",\"fly\"],\"state\":\"UngracefulRMA\"}") + .toObject(UpdateDeviceAdministrativeState.class); + Assertions.assertEquals("wdxomrawp", model.resourceIds().get(0)); + Assertions.assertEquals(DeviceAdministrativeState.UNGRACEFUL_RMA, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateDeviceAdministrativeState model = new UpdateDeviceAdministrativeState() - .withResourceIds(Arrays.asList("aprhknqiijgencdg", "oqueqihkkyowltj", "uwhldxwhieproqks")) - .withState(DeviceAdministrativeState.RESYNC); + UpdateDeviceAdministrativeState model + = new UpdateDeviceAdministrativeState().withResourceIds(Arrays.asList("wdxomrawp", "keboo", "fly")) + .withState(DeviceAdministrativeState.UNGRACEFUL_RMA); model = BinaryData.fromObject(model).toObject(UpdateDeviceAdministrativeState.class); - Assertions.assertEquals("aprhknqiijgencdg", model.resourceIds().get(0)); - Assertions.assertEquals(DeviceAdministrativeState.RESYNC, model.state()); + Assertions.assertEquals("wdxomrawp", model.resourceIds().get(0)); + Assertions.assertEquals(DeviceAdministrativeState.UNGRACEFUL_RMA, model.state()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java index d35ebb1b0628..d4251b93353f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -11,14 +11,14 @@ public final class UpdateVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateVersion model = BinaryData.fromString("{\"version\":\"xmcvprstvkitbfjt\"}").toObject(UpdateVersion.class); - Assertions.assertEquals("xmcvprstvkitbfjt", model.version()); + UpdateVersion model = BinaryData.fromString("{\"version\":\"aeda\"}").toObject(UpdateVersion.class); + Assertions.assertEquals("aeda", model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateVersion model = new UpdateVersion().withVersion("xmcvprstvkitbfjt"); + UpdateVersion model = new UpdateVersion().withVersion("aeda"); model = BinaryData.fromObject(model).toObject(UpdateVersion.class); - Assertions.assertEquals("xmcvprstvkitbfjt", model.version()); + Assertions.assertEquals("aeda", model.version()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java index 550316299a8e..54dd92c5a1c9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpgradeNetworkFabricPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class UpgradeNetworkFabricPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpgradeNetworkFabricProperties model = BinaryData.fromString("{\"action\":\"Start\",\"version\":\"lghnysvlp\"}") + UpgradeNetworkFabricProperties model = BinaryData.fromString("{\"version\":\"gtaiywbq\",\"action\":\"Start\"}") .toObject(UpgradeNetworkFabricProperties.class); - Assertions.assertEquals("lghnysvlp", model.version()); + Assertions.assertEquals("gtaiywbq", model.version()); Assertions.assertEquals(NetworkFabricUpgradeAction.START, model.action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpgradeNetworkFabricProperties model = new UpgradeNetworkFabricProperties().withVersion("lghnysvlp") - .withAction(NetworkFabricUpgradeAction.START); + UpgradeNetworkFabricProperties model + = new UpgradeNetworkFabricProperties().withVersion("gtaiywbq").withAction(NetworkFabricUpgradeAction.START); model = BinaryData.fromObject(model).toObject(UpgradeNetworkFabricProperties.class); - Assertions.assertEquals("lghnysvlp", model.version()); + Assertions.assertEquals("gtaiywbq", model.version()); Assertions.assertEquals(NetworkFabricUpgradeAction.START, model.action()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java new file mode 100644 index 000000000000..f770da79e59c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UserAssignedIdentityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.UserAssignedIdentity; + +public final class UserAssignedIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentity model + = BinaryData.fromString("{\"principalId\":\"eiqbcbgvsbts\",\"clientId\":\"toxadhxuvjhxmnr\"}") + .toObject(UserAssignedIdentity.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentity model = new UserAssignedIdentity(); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java index 979013c34695..dbb56b21656e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ValidateConfigurationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,16 +12,16 @@ public final class ValidateConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ValidateConfigurationProperties model = BinaryData.fromString("{\"validateAction\":\"Connectivity\"}") - .toObject(ValidateConfigurationProperties.class); - Assertions.assertEquals(ValidateAction.CONNECTIVITY, model.validateAction()); + ValidateConfigurationProperties model + = BinaryData.fromString("{\"validateAction\":\"Cabling\"}").toObject(ValidateConfigurationProperties.class); + Assertions.assertEquals(ValidateAction.CABLING, model.validateAction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ValidateConfigurationProperties model - = new ValidateConfigurationProperties().withValidateAction(ValidateAction.CONNECTIVITY); + = new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING); model = BinaryData.fromObject(model).toObject(ValidateConfigurationProperties.class); - Assertions.assertEquals(ValidateAction.CONNECTIVITY, model.validateAction()); + Assertions.assertEquals(ValidateAction.CABLING, model.validateAction()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java new file mode 100644 index 000000000000..0488e82be0d9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPatchPropertiesTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VlanGroupPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VlanGroupPatchProperties model = BinaryData + .fromString( + "{\"name\":\"jdjltymkmvgui\",\"vlans\":[\"arts\",\"phkixkykxdssjpe\",\"mucfxhikkf\",\"rmymyincqlhr\"]}") + .toObject(VlanGroupPatchProperties.class); + Assertions.assertEquals("jdjltymkmvgui", model.name()); + Assertions.assertEquals("arts", model.vlans().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VlanGroupPatchProperties model = new VlanGroupPatchProperties().withName("jdjltymkmvgui") + .withVlans(Arrays.asList("arts", "phkixkykxdssjpe", "mucfxhikkf", "rmymyincqlhr")); + model = BinaryData.fromObject(model).toObject(VlanGroupPatchProperties.class); + Assertions.assertEquals("jdjltymkmvgui", model.name()); + Assertions.assertEquals("arts", model.vlans().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java index 5eb93835ab4d..77ffef362139 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -12,18 +12,18 @@ public final class VlanGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VlanGroupProperties model = BinaryData.fromString("{\"name\":\"raauzzpt\",\"vlans\":[\"ysdzhez\",\"wva\"]}") + VlanGroupProperties model = BinaryData.fromString("{\"name\":\"emfnczdwvvbal\",\"vlans\":[\"lchpodbzevwrdn\"]}") .toObject(VlanGroupProperties.class); - Assertions.assertEquals("raauzzpt", model.name()); - Assertions.assertEquals("ysdzhez", model.vlans().get(0)); + Assertions.assertEquals("emfnczdwvvbal", model.name()); + Assertions.assertEquals("lchpodbzevwrdn", model.vlans().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VlanGroupProperties model - = new VlanGroupProperties().withName("raauzzpt").withVlans(Arrays.asList("ysdzhez", "wva")); + = new VlanGroupProperties().withName("emfnczdwvvbal").withVlans(Arrays.asList("lchpodbzevwrdn")); model = BinaryData.fromObject(model).toObject(VlanGroupProperties.class); - Assertions.assertEquals("raauzzpt", model.name()); - Assertions.assertEquals("ysdzhez", model.vlans().get(0)); + Assertions.assertEquals("emfnczdwvvbal", model.name()); + Assertions.assertEquals("lchpodbzevwrdn", model.vlans().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java new file mode 100644 index 000000000000..1651a11af6a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionPatchTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchConditionPatch; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VlanMatchConditionPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VlanMatchConditionPatch model = BinaryData.fromString( + "{\"vlans\":[\"vlgfgg\",\"vkyylizrzbjpsf\",\"sfuztlvtmv\",\"gbwidqlvh\"],\"innerVlans\":[\"veo\",\"i\",\"rvjfnmjmvlw\",\"z\"],\"vlanGroupNames\":[\"lkujrllfojui\",\"jpu\",\"yjucejikzoeo\",\"vtzejetjklnti\"]}") + .toObject(VlanMatchConditionPatch.class); + Assertions.assertEquals("vlgfgg", model.vlans().get(0)); + Assertions.assertEquals("veo", model.innerVlans().get(0)); + Assertions.assertEquals("lkujrllfojui", model.vlanGroupNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VlanMatchConditionPatch model = new VlanMatchConditionPatch() + .withVlans(Arrays.asList("vlgfgg", "vkyylizrzbjpsf", "sfuztlvtmv", "gbwidqlvh")) + .withInnerVlans(Arrays.asList("veo", "i", "rvjfnmjmvlw", "z")) + .withVlanGroupNames(Arrays.asList("lkujrllfojui", "jpu", "yjucejikzoeo", "vtzejetjklnti")); + model = BinaryData.fromObject(model).toObject(VlanMatchConditionPatch.class); + Assertions.assertEquals("vlgfgg", model.vlans().get(0)); + Assertions.assertEquals("veo", model.innerVlans().get(0)); + Assertions.assertEquals("lkujrllfojui", model.vlanGroupNames().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java index 1a9297792603..2e7ab2ca7bb2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VlanMatchConditionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.managednetworkfabric.generated; @@ -13,22 +13,21 @@ public final class VlanMatchConditionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VlanMatchCondition model = BinaryData.fromString( - "{\"vlans\":[\"tfpmvmemfnczdw\",\"vbalxlllc\",\"podbzevwrdnh\"],\"innerVlans\":[\"uvsj\",\"swsmys\",\"uluqypfc\"],\"vlanGroupNames\":[\"rchpqbmfpjbabwid\"]}") + "{\"vlans\":[\"vxwmygd\",\"pgpqchiszepnnb\"],\"innerVlans\":[\"xgibbda\",\"confozauors\"],\"vlanGroupNames\":[\"kwbqplhlvnuu\",\"pzlrphw\"]}") .toObject(VlanMatchCondition.class); - Assertions.assertEquals("tfpmvmemfnczdw", model.vlans().get(0)); - Assertions.assertEquals("uvsj", model.innerVlans().get(0)); - Assertions.assertEquals("rchpqbmfpjbabwid", model.vlanGroupNames().get(0)); + Assertions.assertEquals("vxwmygd", model.vlans().get(0)); + Assertions.assertEquals("xgibbda", model.innerVlans().get(0)); + Assertions.assertEquals("kwbqplhlvnuu", model.vlanGroupNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VlanMatchCondition model - = new VlanMatchCondition().withVlans(Arrays.asList("tfpmvmemfnczdw", "vbalxlllc", "podbzevwrdnh")) - .withInnerVlans(Arrays.asList("uvsj", "swsmys", "uluqypfc")) - .withVlanGroupNames(Arrays.asList("rchpqbmfpjbabwid")); + VlanMatchCondition model = new VlanMatchCondition().withVlans(Arrays.asList("vxwmygd", "pgpqchiszepnnb")) + .withInnerVlans(Arrays.asList("xgibbda", "confozauors")) + .withVlanGroupNames(Arrays.asList("kwbqplhlvnuu", "pzlrphw")); model = BinaryData.fromObject(model).toObject(VlanMatchCondition.class); - Assertions.assertEquals("tfpmvmemfnczdw", model.vlans().get(0)); - Assertions.assertEquals("uvsj", model.innerVlans().get(0)); - Assertions.assertEquals("rchpqbmfpjbabwid", model.vlanGroupNames().get(0)); + Assertions.assertEquals("vxwmygd", model.vlans().get(0)); + Assertions.assertEquals("xgibbda", model.innerVlans().get(0)); + Assertions.assertEquals("kwbqplhlvnuu", model.vlanGroupNames().get(0)); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.java deleted file mode 100644 index f9da9cd3f27c..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesOptionAPropertiesTests.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.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class VpnConfigurationPatchablePropertiesOptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VpnConfigurationPatchablePropertiesOptionAProperties model = BinaryData.fromString( - "{\"primaryIpv4Prefix\":\"lrr\",\"primaryIpv6Prefix\":\"hctsbbibti\",\"secondaryIpv4Prefix\":\"hqvumspbfs\",\"secondaryIpv6Prefix\":\"qbbewfcuqfpyyxm\",\"mtu\":796336279,\"vlanId\":1630264703,\"peerASN\":2293730529266201821,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"intervalInMilliSeconds\":1541863840,\"multiplier\":1931320869}}") - .toObject(VpnConfigurationPatchablePropertiesOptionAProperties.class); - Assertions.assertEquals(796336279, model.mtu()); - Assertions.assertEquals(1630264703, model.vlanId()); - Assertions.assertEquals(2293730529266201821L, model.peerAsn()); - Assertions.assertEquals(1541863840, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1931320869, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("lrr", model.primaryIpv4Prefix()); - Assertions.assertEquals("hctsbbibti", model.primaryIpv6Prefix()); - Assertions.assertEquals("hqvumspbfs", model.secondaryIpv4Prefix()); - Assertions.assertEquals("qbbewfcuqfpyyxm", model.secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VpnConfigurationPatchablePropertiesOptionAProperties model - = new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(796336279) - .withVlanId(1630264703) - .withPeerAsn(2293730529266201821L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1541863840).withMultiplier(1931320869)) - .withPrimaryIpv4Prefix("lrr") - .withPrimaryIpv6Prefix("hctsbbibti") - .withSecondaryIpv4Prefix("hqvumspbfs") - .withSecondaryIpv6Prefix("qbbewfcuqfpyyxm"); - model = BinaryData.fromObject(model).toObject(VpnConfigurationPatchablePropertiesOptionAProperties.class); - Assertions.assertEquals(796336279, model.mtu()); - Assertions.assertEquals(1630264703, model.vlanId()); - Assertions.assertEquals(2293730529266201821L, model.peerAsn()); - Assertions.assertEquals(1541863840, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1931320869, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("lrr", model.primaryIpv4Prefix()); - Assertions.assertEquals("hctsbbibti", model.primaryIpv6Prefix()); - Assertions.assertEquals("hqvumspbfs", model.secondaryIpv4Prefix()); - Assertions.assertEquals("qbbewfcuqfpyyxm", model.secondaryIpv6Prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java index 2d709abc766d..11b2e59a4304 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPatchablePropertiesTests.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,66 +18,68 @@ public final class VpnConfigurationPatchablePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VpnConfigurationPatchableProperties model = BinaryData.fromString( - "{\"networkToNetworkInterconnectId\":\"ylajam\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"tpzcr\",\"yklleynqanhkiggl\",\"lwalhvu\",\"hg\"],\"exportRouteTargets\":[\"etxdqcmyctajqzj\",\"alec\",\"bibiwks\",\"egyxsbfpzvoik\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"czfzwushlc\",\"pblalhhez\",\"fkissaidqzsaa\"],\"importIpv6RouteTargets\":[\"sgptotxjq\",\"ia\"],\"exportIpv4RouteTargets\":[\"lrtbfij\",\"z\",\"aoijolb\"],\"exportIpv6RouteTargets\":[\"ktwieope\",\"e\",\"xq\",\"wrswyiljp\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"gxyxyauxredd\",\"primaryIpv6Prefix\":\"mcnltmwytkujsqyc\",\"secondaryIpv4Prefix\":\"oxfab\",\"secondaryIpv6Prefix\":\"gpwb\",\"mtu\":382092821,\"vlanId\":1878226203,\"peerASN\":1952930394496589738,\"bfdConfiguration\":{\"administrativeState\":\"RMA\",\"intervalInMilliSeconds\":1968581632,\"multiplier\":216296759}}}") + "{\"networkToNetworkInterconnectId\":\"ccxbeuuqutkz\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"uzy\",\"ijcxfno\"],\"exportRouteTargets\":[\"gjdydhqkk\",\"bjuckc\",\"tuqbhp\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"xtpzdlyse\"],\"importIpv6RouteTargets\":[\"oa\",\"atprytgrhzbq\",\"d\",\"fa\"],\"exportIpv4RouteTargets\":[\"tvcshtkutzcttb\",\"gdirda\"],\"exportIpv6RouteTargets\":[\"zjgcfjfx\",\"bwjjirmuydgf\",\"tmdofgeoag\",\"uoft\"]}},\"optionAProperties\":{\"mtu\":1584416889,\"vlanId\":1924483125,\"peerASN\":5713792240765084434,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":190262848,\"multiplier\":1629273800},\"primaryIpv4Prefix\":\"evmdm\",\"primaryIpv6Prefix\":\"nlrstgf\",\"secondaryIpv4Prefix\":\"ljdncidtjvamy\",\"secondaryIpv6Prefix\":\"n\"}}") .toObject(VpnConfigurationPatchableProperties.class); - Assertions.assertEquals("ylajam", model.networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("tpzcr", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("etxdqcmyctajqzj", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("czfzwushlc", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("sgptotxjq", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lrtbfij", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ktwieope", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(382092821, model.optionAProperties().mtu()); - Assertions.assertEquals(1878226203, model.optionAProperties().vlanId()); - Assertions.assertEquals(1952930394496589738L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(1968581632, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(216296759, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("gxyxyauxredd", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("mcnltmwytkujsqyc", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("oxfab", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gpwb", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("ccxbeuuqutkz", model.networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("uzy", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("gjdydhqkk", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("xtpzdlyse", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("oa", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("tvcshtkutzcttb", + model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("zjgcfjfx", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(1584416889, model.optionAProperties().mtu()); + Assertions.assertEquals(1924483125, model.optionAProperties().vlanId()); + Assertions.assertEquals(5713792240765084434L, model.optionAProperties().peerASN()); + Assertions.assertEquals(190262848, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1629273800, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("evmdm", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("nlrstgf", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ljdncidtjvamy", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("n", model.optionAProperties().secondaryIpv6Prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VpnConfigurationPatchableProperties model - = new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("ylajam") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("tpzcr", "yklleynqanhkiggl", "lwalhvu", "hg")) - .withExportRouteTargets(Arrays.asList("etxdqcmyctajqzj", "alec", "bibiwks", "egyxsbfpzvoik")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("czfzwushlc", "pblalhhez", "fkissaidqzsaa")) - .withImportIpv6RouteTargets(Arrays.asList("sgptotxjq", "ia")) - .withExportIpv4RouteTargets(Arrays.asList("lrtbfij", "z", "aoijolb")) - .withExportIpv6RouteTargets(Arrays.asList("ktwieope", "e", "xq", "wrswyiljp")))) - .withOptionAProperties(new VpnConfigurationPatchablePropertiesOptionAProperties().withMtu(382092821) - .withVlanId(1878226203) - .withPeerAsn(1952930394496589738L) + = new VpnConfigurationPatchableProperties().withNetworkToNetworkInterconnectId("ccxbeuuqutkz") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties(new VpnOptionBPatchProperties() + .withImportRouteTargets(Arrays.asList("uzy", "ijcxfno")) + .withExportRouteTargets(Arrays.asList("gjdydhqkk", "bjuckc", "tuqbhp")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("xtpzdlyse")) + .withImportIpv6RouteTargets(Arrays.asList("oa", "atprytgrhzbq", "d", "fa")) + .withExportIpv4RouteTargets(Arrays.asList("tvcshtkutzcttb", "gdirda")) + .withExportIpv6RouteTargets(Arrays.asList("zjgcfjfx", "bwjjirmuydgf", "tmdofgeoag", "uoft")))) + .withOptionAProperties(new VpnOptionAPatchProperties().withMtu(1584416889) + .withVlanId(1924483125) + .withPeerASN(5713792240765084434L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1968581632).withMultiplier(216296759)) - .withPrimaryIpv4Prefix("gxyxyauxredd") - .withPrimaryIpv6Prefix("mcnltmwytkujsqyc") - .withSecondaryIpv4Prefix("oxfab") - .withSecondaryIpv6Prefix("gpwb")); + new BfdPatchConfiguration().withIntervalInMilliSeconds(190262848).withMultiplier(1629273800)) + .withPrimaryIpv4Prefix("evmdm") + .withPrimaryIpv6Prefix("nlrstgf") + .withSecondaryIpv4Prefix("ljdncidtjvamy") + .withSecondaryIpv6Prefix("n")); model = BinaryData.fromObject(model).toObject(VpnConfigurationPatchableProperties.class); - Assertions.assertEquals("ylajam", model.networkToNetworkInterconnectId()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("tpzcr", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("etxdqcmyctajqzj", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("czfzwushlc", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("sgptotxjq", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("lrtbfij", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("ktwieope", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(382092821, model.optionAProperties().mtu()); - Assertions.assertEquals(1878226203, model.optionAProperties().vlanId()); - Assertions.assertEquals(1952930394496589738L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(1968581632, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(216296759, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("gxyxyauxredd", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("mcnltmwytkujsqyc", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("oxfab", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("gpwb", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("ccxbeuuqutkz", model.networkToNetworkInterconnectId()); + Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); + Assertions.assertEquals("uzy", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("gjdydhqkk", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("xtpzdlyse", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("oa", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("tvcshtkutzcttb", + model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("zjgcfjfx", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(1584416889, model.optionAProperties().mtu()); + Assertions.assertEquals(1924483125, model.optionAProperties().vlanId()); + Assertions.assertEquals(5713792240765084434L, model.optionAProperties().peerASN()); + Assertions.assertEquals(190262848, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1629273800, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("evmdm", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("nlrstgf", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("ljdncidtjvamy", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("n", model.optionAProperties().secondaryIpv6Prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.java deleted file mode 100644 index 8efb93d6456b..000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesOptionAPropertiesTests.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.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class VpnConfigurationPropertiesOptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VpnConfigurationPropertiesOptionAProperties model = BinaryData.fromString( - "{\"primaryIpv4Prefix\":\"wly\",\"primaryIpv6Prefix\":\"chpqvctsfaeuhww\",\"secondaryIpv4Prefix\":\"nstvzuzhasup\",\"secondaryIpv6Prefix\":\"p\",\"mtu\":959912911,\"vlanId\":898786188,\"peerASN\":6273140630685430619,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1867491707,\"multiplier\":1083168713}}") - .toObject(VpnConfigurationPropertiesOptionAProperties.class); - Assertions.assertEquals(959912911, model.mtu()); - Assertions.assertEquals(898786188, model.vlanId()); - Assertions.assertEquals(6273140630685430619L, model.peerAsn()); - Assertions.assertEquals(1867491707, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1083168713, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("wly", model.primaryIpv4Prefix()); - Assertions.assertEquals("chpqvctsfaeuhww", model.primaryIpv6Prefix()); - Assertions.assertEquals("nstvzuzhasup", model.secondaryIpv4Prefix()); - Assertions.assertEquals("p", model.secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VpnConfigurationPropertiesOptionAProperties model - = new VpnConfigurationPropertiesOptionAProperties().withMtu(959912911) - .withVlanId(898786188) - .withPeerAsn(6273140630685430619L) - .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(1867491707).withMultiplier(1083168713)) - .withPrimaryIpv4Prefix("wly") - .withPrimaryIpv6Prefix("chpqvctsfaeuhww") - .withSecondaryIpv4Prefix("nstvzuzhasup") - .withSecondaryIpv6Prefix("p"); - model = BinaryData.fromObject(model).toObject(VpnConfigurationPropertiesOptionAProperties.class); - Assertions.assertEquals(959912911, model.mtu()); - Assertions.assertEquals(898786188, model.vlanId()); - Assertions.assertEquals(6273140630685430619L, model.peerAsn()); - Assertions.assertEquals(1867491707, model.bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(1083168713, model.bfdConfiguration().multiplier()); - Assertions.assertEquals("wly", model.primaryIpv4Prefix()); - Assertions.assertEquals("chpqvctsfaeuhww", model.primaryIpv6Prefix()); - Assertions.assertEquals("nstvzuzhasup", model.secondaryIpv4Prefix()); - Assertions.assertEquals("p", model.secondaryIpv6Prefix()); - } -} 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 index f1adcd028db1..2a3eeadc187a 100644 --- 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 @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,67 +18,70 @@ public final class VpnConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VpnConfigurationProperties model = BinaryData.fromString( - "{\"networkToNetworkInterconnectId\":\"lc\",\"administrativeState\":\"RMA\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"tfx\",\"crqmipfjwfoygi\",\"mshxxba\",\"zabulnvgsk\"],\"exportRouteTargets\":[\"xjdzjs\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"hxqqmqip\",\"y\",\"hfnzocx\",\"tfshksnyzm\"],\"importIpv6RouteTargets\":[\"mwbwmbnlslce\",\"iqdktwtkvih\",\"pfliwo\",\"nguuzhwvla\"],\"exportIpv4RouteTargets\":[\"mhjhaus\",\"b\",\"ekymffztsilscvqs\",\"eiihfymko\"],\"exportIpv6RouteTargets\":[\"yese\"]}},\"optionAProperties\":{\"primaryIpv4Prefix\":\"cigzhogsmgbv\",\"primaryIpv6Prefix\":\"dwrqbeb\",\"secondaryIpv4Prefix\":\"fveglabtvkb\",\"secondaryIpv6Prefix\":\"znhtf\",\"mtu\":458206255,\"vlanId\":728176337,\"peerASN\":2002416946820305929,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":2147211144,\"multiplier\":674933767}}}") + "{\"networkToNetworkInterconnectId\":\"zwbxgdebxlayuno\",\"administrativeState\":\"Enabled\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"benqlamwmg\",\"way\",\"f\"],\"exportRouteTargets\":[\"cpjs\",\"bhem\",\"cucsqsnxfbxu\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"drbzyvbsuadu\"],\"importIpv6RouteTargets\":[\"dkaxpfobkzhmhj\",\"qltd\",\"luqrojadhfztlray\",\"rkgzkyhudbkuw\"],\"exportIpv4RouteTargets\":[\"xl\",\"weakfecjvxfa\",\"ufqizjvppw\",\"oajeyyjmjjxizx\"],\"exportIpv6RouteTargets\":[\"nzlslekc\",\"tgzkjtyqpd\",\"adeghztldsvc\"]}},\"optionAProperties\":{\"mtu\":1048824603,\"vlanId\":895776301,\"peerASN\":53213477202701206,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":918403663,\"multiplier\":121397136},\"primaryIpv4Prefix\":\"wmejjqhd\",\"primaryIpv6Prefix\":\"vmqxi\",\"secondaryIpv4Prefix\":\"okyfoz\",\"secondaryIpv6Prefix\":\"nzxbyp\"}}") .toObject(VpnConfigurationProperties.class); - Assertions.assertEquals("lc", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("zwbxgdebxlayuno", model.networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("tfx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("xjdzjs", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("hxqqmqip", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("mwbwmbnlslce", + Assertions.assertEquals("benqlamwmg", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("cpjs", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("drbzyvbsuadu", + model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("dkaxpfobkzhmhj", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("mhjhaus", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("yese", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(458206255, model.optionAProperties().mtu()); - Assertions.assertEquals(728176337, model.optionAProperties().vlanId()); - Assertions.assertEquals(2002416946820305929L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2147211144, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(674933767, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("cigzhogsmgbv", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwrqbeb", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fveglabtvkb", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("znhtf", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("xl", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("nzlslekc", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(1048824603, model.optionAProperties().mtu()); + Assertions.assertEquals(895776301, model.optionAProperties().vlanId()); + Assertions.assertEquals(53213477202701206L, model.optionAProperties().peerASN()); + Assertions.assertEquals(918403663, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(121397136, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("wmejjqhd", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("vmqxi", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("okyfoz", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("nzxbyp", model.optionAProperties().secondaryIpv6Prefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VpnConfigurationProperties model = new VpnConfigurationProperties().withNetworkToNetworkInterconnectId("lc") + VpnConfigurationProperties model = new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId("zwbxgdebxlayuno") .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties(new OptionBProperties() - .withImportRouteTargets(Arrays.asList("tfx", "crqmipfjwfoygi", "mshxxba", "zabulnvgsk")) - .withExportRouteTargets(Arrays.asList("xjdzjs")) - .withRouteTargets(new RouteTargetInformation() - .withImportIpv4RouteTargets(Arrays.asList("hxqqmqip", "y", "hfnzocx", "tfshksnyzm")) - .withImportIpv6RouteTargets(Arrays.asList("mwbwmbnlslce", "iqdktwtkvih", "pfliwo", "nguuzhwvla")) - .withExportIpv4RouteTargets(Arrays.asList("mhjhaus", "b", "ekymffztsilscvqs", "eiihfymko")) - .withExportIpv6RouteTargets(Arrays.asList("yese")))) - .withOptionAProperties(new VpnConfigurationPropertiesOptionAProperties().withMtu(458206255) - .withVlanId(728176337) - .withPeerAsn(2002416946820305929L) + .withOptionBProperties(new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("benqlamwmg", "way", "f")) + .withExportRouteTargets(Arrays.asList("cpjs", "bhem", "cucsqsnxfbxu")) + .withRouteTargets(new RouteTargetInformation().withImportIpv4RouteTargets(Arrays.asList("drbzyvbsuadu")) + .withImportIpv6RouteTargets( + Arrays.asList("dkaxpfobkzhmhj", "qltd", "luqrojadhfztlray", "rkgzkyhudbkuw")) + .withExportIpv4RouteTargets(Arrays.asList("xl", "weakfecjvxfa", "ufqizjvppw", "oajeyyjmjjxizx")) + .withExportIpv6RouteTargets(Arrays.asList("nzlslekc", "tgzkjtyqpd", "adeghztldsvc")))) + .withOptionAProperties(new VpnOptionAProperties().withMtu(1048824603) + .withVlanId(895776301) + .withPeerASN(53213477202701206L) .withBfdConfiguration( - new BfdConfiguration().withIntervalInMilliSeconds(2147211144).withMultiplier(674933767)) - .withPrimaryIpv4Prefix("cigzhogsmgbv") - .withPrimaryIpv6Prefix("dwrqbeb") - .withSecondaryIpv4Prefix("fveglabtvkb") - .withSecondaryIpv6Prefix("znhtf")); + new BfdConfiguration().withIntervalInMilliSeconds(918403663).withMultiplier(121397136)) + .withPrimaryIpv4Prefix("wmejjqhd") + .withPrimaryIpv6Prefix("vmqxi") + .withSecondaryIpv4Prefix("okyfoz") + .withSecondaryIpv6Prefix("nzxbyp")); model = BinaryData.fromObject(model).toObject(VpnConfigurationProperties.class); - Assertions.assertEquals("lc", model.networkToNetworkInterconnectId()); + Assertions.assertEquals("zwbxgdebxlayuno", model.networkToNetworkInterconnectId()); Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("tfx", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("xjdzjs", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("hxqqmqip", model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); - Assertions.assertEquals("mwbwmbnlslce", + Assertions.assertEquals("benqlamwmg", model.optionBProperties().importRouteTargets().get(0)); + Assertions.assertEquals("cpjs", model.optionBProperties().exportRouteTargets().get(0)); + Assertions.assertEquals("drbzyvbsuadu", + model.optionBProperties().routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("dkaxpfobkzhmhj", model.optionBProperties().routeTargets().importIpv6RouteTargets().get(0)); - Assertions.assertEquals("mhjhaus", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); - Assertions.assertEquals("yese", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); - Assertions.assertEquals(458206255, model.optionAProperties().mtu()); - Assertions.assertEquals(728176337, model.optionAProperties().vlanId()); - Assertions.assertEquals(2002416946820305929L, model.optionAProperties().peerAsn()); - Assertions.assertEquals(2147211144, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); - Assertions.assertEquals(674933767, model.optionAProperties().bfdConfiguration().multiplier()); - Assertions.assertEquals("cigzhogsmgbv", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("dwrqbeb", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("fveglabtvkb", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("znhtf", model.optionAProperties().secondaryIpv6Prefix()); + Assertions.assertEquals("xl", model.optionBProperties().routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("nzlslekc", model.optionBProperties().routeTargets().exportIpv6RouteTargets().get(0)); + Assertions.assertEquals(1048824603, model.optionAProperties().mtu()); + Assertions.assertEquals(895776301, model.optionAProperties().vlanId()); + Assertions.assertEquals(53213477202701206L, model.optionAProperties().peerASN()); + Assertions.assertEquals(918403663, model.optionAProperties().bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(121397136, model.optionAProperties().bfdConfiguration().multiplier()); + Assertions.assertEquals("wmejjqhd", model.optionAProperties().primaryIpv4Prefix()); + Assertions.assertEquals("vmqxi", model.optionAProperties().primaryIpv6Prefix()); + Assertions.assertEquals("okyfoz", model.optionAProperties().secondaryIpv4Prefix()); + Assertions.assertEquals("nzxbyp", model.optionAProperties().secondaryIpv6Prefix()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java new file mode 100644 index 000000000000..417cd387f7fe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPatchPropertiesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.BfdPatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionAPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionAPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionAPatchProperties model = BinaryData.fromString( + "{\"mtu\":1598126024,\"vlanId\":18688098,\"peerASN\":1614121598128726995,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"intervalInMilliSeconds\":1272208429,\"multiplier\":1112899430},\"primaryIpv4Prefix\":\"umyd\",\"primaryIpv6Prefix\":\"weqjfyxydgto\",\"secondaryIpv4Prefix\":\"qbvwglgw\",\"secondaryIpv6Prefix\":\"vxakglh\"}") + .toObject(VpnOptionAPatchProperties.class); + Assertions.assertEquals(1598126024, model.mtu()); + Assertions.assertEquals(18688098, model.vlanId()); + Assertions.assertEquals(1614121598128726995L, model.peerASN()); + Assertions.assertEquals(1272208429, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1112899430, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("umyd", model.primaryIpv4Prefix()); + Assertions.assertEquals("weqjfyxydgto", model.primaryIpv6Prefix()); + Assertions.assertEquals("qbvwglgw", model.secondaryIpv4Prefix()); + Assertions.assertEquals("vxakglh", model.secondaryIpv6Prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionAPatchProperties model = new VpnOptionAPatchProperties().withMtu(1598126024) + .withVlanId(18688098) + .withPeerASN(1614121598128726995L) + .withBfdConfiguration( + new BfdPatchConfiguration().withIntervalInMilliSeconds(1272208429).withMultiplier(1112899430)) + .withPrimaryIpv4Prefix("umyd") + .withPrimaryIpv6Prefix("weqjfyxydgto") + .withSecondaryIpv4Prefix("qbvwglgw") + .withSecondaryIpv6Prefix("vxakglh"); + model = BinaryData.fromObject(model).toObject(VpnOptionAPatchProperties.class); + Assertions.assertEquals(1598126024, model.mtu()); + Assertions.assertEquals(18688098, model.vlanId()); + Assertions.assertEquals(1614121598128726995L, model.peerASN()); + Assertions.assertEquals(1272208429, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1112899430, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("umyd", model.primaryIpv4Prefix()); + Assertions.assertEquals("weqjfyxydgto", model.primaryIpv6Prefix()); + Assertions.assertEquals("qbvwglgw", model.secondaryIpv4Prefix()); + Assertions.assertEquals("vxakglh", model.secondaryIpv6Prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java new file mode 100644 index 000000000000..6522ff1f27ad --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionAPropertiesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.VpnOptionAProperties; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionAPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionAProperties model = BinaryData.fromString( + "{\"mtu\":617231855,\"vlanId\":722501870,\"peerASN\":3484522183804519547,\"bfdConfiguration\":{\"administrativeState\":\"MAT\",\"intervalInMilliSeconds\":1270887829,\"multiplier\":1481511711},\"primaryIpv4Prefix\":\"qrxqwqnjx\",\"primaryIpv6Prefix\":\"fddtullygtavczcx\",\"secondaryIpv4Prefix\":\"weapyfmlxrljphra\",\"secondaryIpv6Prefix\":\"ifleimixlmd\"}") + .toObject(VpnOptionAProperties.class); + Assertions.assertEquals(617231855, model.mtu()); + Assertions.assertEquals(722501870, model.vlanId()); + Assertions.assertEquals(3484522183804519547L, model.peerASN()); + Assertions.assertEquals(1270887829, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1481511711, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("qrxqwqnjx", model.primaryIpv4Prefix()); + Assertions.assertEquals("fddtullygtavczcx", model.primaryIpv6Prefix()); + Assertions.assertEquals("weapyfmlxrljphra", model.secondaryIpv4Prefix()); + Assertions.assertEquals("ifleimixlmd", model.secondaryIpv6Prefix()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionAProperties model = new VpnOptionAProperties().withMtu(617231855) + .withVlanId(722501870) + .withPeerASN(3484522183804519547L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(1270887829).withMultiplier(1481511711)) + .withPrimaryIpv4Prefix("qrxqwqnjx") + .withPrimaryIpv6Prefix("fddtullygtavczcx") + .withSecondaryIpv4Prefix("weapyfmlxrljphra") + .withSecondaryIpv6Prefix("ifleimixlmd"); + model = BinaryData.fromObject(model).toObject(VpnOptionAProperties.class); + Assertions.assertEquals(617231855, model.mtu()); + Assertions.assertEquals(722501870, model.vlanId()); + Assertions.assertEquals(3484522183804519547L, model.peerASN()); + Assertions.assertEquals(1270887829, model.bfdConfiguration().intervalInMilliSeconds()); + Assertions.assertEquals(1481511711, model.bfdConfiguration().multiplier()); + Assertions.assertEquals("qrxqwqnjx", model.primaryIpv4Prefix()); + Assertions.assertEquals("fddtullygtavczcx", model.primaryIpv6Prefix()); + Assertions.assertEquals("weapyfmlxrljphra", model.secondaryIpv4Prefix()); + Assertions.assertEquals("ifleimixlmd", model.secondaryIpv6Prefix()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java new file mode 100644 index 000000000000..f16e61b317f7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPatchPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetPatchInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBPatchProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionBPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionBPatchProperties model = BinaryData.fromString( + "{\"importRouteTargets\":[\"cdo\",\"cvucgytoxu\",\"httnzqs\"],\"exportRouteTargets\":[\"ebg\",\"zplusdekpdzzms\",\"gpgvokyejidbdq\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"nycwz\",\"lv\",\"wsnmrkkyjt\",\"epwpwfk\"],\"importIpv6RouteTargets\":[\"xuv\",\"vcp\"],\"exportIpv4RouteTargets\":[\"ofuckc\",\"btxluevsolzwil\",\"ngojfsqebuuxjx\"],\"exportIpv6RouteTargets\":[\"fj\",\"pdkktpmbmxbmbr\"]}}") + .toObject(VpnOptionBPatchProperties.class); + Assertions.assertEquals("cdo", model.importRouteTargets().get(0)); + Assertions.assertEquals("ebg", model.exportRouteTargets().get(0)); + Assertions.assertEquals("nycwz", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xuv", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("ofuckc", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("fj", model.routeTargets().exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionBPatchProperties model + = new VpnOptionBPatchProperties().withImportRouteTargets(Arrays.asList("cdo", "cvucgytoxu", "httnzqs")) + .withExportRouteTargets(Arrays.asList("ebg", "zplusdekpdzzms", "gpgvokyejidbdq")) + .withRouteTargets(new RouteTargetPatchInformation() + .withImportIpv4RouteTargets(Arrays.asList("nycwz", "lv", "wsnmrkkyjt", "epwpwfk")) + .withImportIpv6RouteTargets(Arrays.asList("xuv", "vcp")) + .withExportIpv4RouteTargets(Arrays.asList("ofuckc", "btxluevsolzwil", "ngojfsqebuuxjx")) + .withExportIpv6RouteTargets(Arrays.asList("fj", "pdkktpmbmxbmbr"))); + model = BinaryData.fromObject(model).toObject(VpnOptionBPatchProperties.class); + Assertions.assertEquals("cdo", model.importRouteTargets().get(0)); + Assertions.assertEquals("ebg", model.exportRouteTargets().get(0)); + Assertions.assertEquals("nycwz", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("xuv", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("ofuckc", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("fj", model.routeTargets().exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java new file mode 100644 index 000000000000..ceaab30a81cb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnOptionBPropertiesTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnOptionBProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VpnOptionBPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VpnOptionBProperties model = BinaryData.fromString( + "{\"importRouteTargets\":[\"gaixwrgrkkd\",\"rfrswqikwep\",\"ogggicwnxhtfm\",\"qbsudzpgchzpg\"],\"exportRouteTargets\":[\"mjd\",\"xhzghgodkynr\",\"eqavfdbdfmmxj\"],\"routeTargets\":{\"importIpv4RouteTargets\":[\"u\",\"pjyyqmkwlhvc\",\"loqd\"],\"importIpv6RouteTargets\":[\"luxxrwz\",\"buzm\",\"xga\",\"tdtkwppthuz\"],\"exportIpv4RouteTargets\":[\"mimrljdpoqfxyemh\",\"ftb\",\"ewhtec\",\"oamfmxtllfltymqc\"],\"exportIpv6RouteTargets\":[\"fijhgga\",\"qbgamkli\",\"irw\"]}}") + .toObject(VpnOptionBProperties.class); + Assertions.assertEquals("gaixwrgrkkd", model.importRouteTargets().get(0)); + Assertions.assertEquals("mjd", model.exportRouteTargets().get(0)); + Assertions.assertEquals("u", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("luxxrwz", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("mimrljdpoqfxyemh", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("fijhgga", model.routeTargets().exportIpv6RouteTargets().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VpnOptionBProperties model + = new VpnOptionBProperties() + .withImportRouteTargets(Arrays.asList("gaixwrgrkkd", "rfrswqikwep", "ogggicwnxhtfm", "qbsudzpgchzpg")) + .withExportRouteTargets(Arrays.asList("mjd", "xhzghgodkynr", "eqavfdbdfmmxj")) + .withRouteTargets(new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("u", "pjyyqmkwlhvc", "loqd")) + .withImportIpv6RouteTargets(Arrays.asList("luxxrwz", "buzm", "xga", "tdtkwppthuz")) + .withExportIpv4RouteTargets(Arrays.asList("mimrljdpoqfxyemh", "ftb", "ewhtec", "oamfmxtllfltymqc")) + .withExportIpv6RouteTargets(Arrays.asList("fijhgga", "qbgamkli", "irw"))); + model = BinaryData.fromObject(model).toObject(VpnOptionBProperties.class); + Assertions.assertEquals("gaixwrgrkkd", model.importRouteTargets().get(0)); + Assertions.assertEquals("mjd", model.exportRouteTargets().get(0)); + Assertions.assertEquals("u", model.routeTargets().importIpv4RouteTargets().get(0)); + Assertions.assertEquals("luxxrwz", model.routeTargets().importIpv6RouteTargets().get(0)); + Assertions.assertEquals("mimrljdpoqfxyemh", model.routeTargets().exportIpv4RouteTargets().get(0)); + Assertions.assertEquals("fijhgga", model.routeTargets().exportIpv6RouteTargets().get(0)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml new file mode 100644 index 000000000000..2daa1f995739 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/managednetworkfabric/ManagedNetworkFabric.ResourceManager.Management +commit: ffb44955dd40f9a1826b6d4243678234a7449352 +repo: Azure/azure-rest-api-specs +additionalDirectories: